{
  "components": {
    "schemas": {
      "AggregateDataWire": {
        "description": "The aggregation result payload.",
        "properties": {
          "has_more": {
            "description": "True when groups beyond this page exist (advance with offset).",
            "title": "Has More",
            "type": "boolean"
          },
          "results": {
            "description": "One row per group on this page.",
            "items": {
              "$ref": "#/components/schemas/AggregateRowWire"
            },
            "title": "Results",
            "type": "array"
          },
          "total_groups": {
            "description": "Total number of groups across every page.",
            "title": "Total Groups",
            "type": "integer"
          }
        },
        "required": [
          "total_groups",
          "results",
          "has_more"
        ],
        "title": "AggregateDataWire",
        "type": "object"
      },
      "AggregateEnvelope": {
        "description": "Envelope wrapping an aggregation result.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AggregateDataWire",
            "description": "The aggregation result."
          }
        },
        "required": [
          "data"
        ],
        "title": "AggregateEnvelope",
        "type": "object"
      },
      "AggregateRowWire": {
        "description": "A single row of an aggregation result.",
        "properties": {
          "group_by": {
            "additionalProperties": true,
            "description": "The group key -> value map for this row.",
            "title": "Group By",
            "type": "object"
          },
          "value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/CurrencyAmountWire"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The aggregated value: an integer for count; a decimal string for a number/date property; one {amount, unit} per currency for a currency property; null when no value applies.",
            "title": "Value"
          }
        },
        "required": [
          "group_by",
          "value"
        ],
        "title": "AggregateRowWire",
        "type": "object"
      },
      "AssociationEdgeListEnvelope": {
        "description": "Envelope wrapping a page of association edges.",
        "properties": {
          "data": {
            "description": "Association edges for the record, in stable order.",
            "items": {
              "$ref": "#/components/schemas/AssociationEdgeWire"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationWire",
            "description": "Cursor pagination metadata."
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "title": "AssociationEdgeListEnvelope",
        "type": "object"
      },
      "AssociationEdgeWire": {
        "description": "A single association edge from a queried record to another record.",
        "properties": {
          "association_type": {
            "description": "The association type name",
            "title": "Association Type",
            "type": "string"
          },
          "cardinality": {
            "description": "The association cardinality, source to target",
            "enum": [
              "one_to_one",
              "one_to_many",
              "many_to_one",
              "many_to_many"
            ],
            "title": "Cardinality",
            "type": "string"
          },
          "source_id": {
            "description": "The source record id (the queried record)",
            "title": "Source Id",
            "type": "string"
          },
          "target_id": {
            "description": "The associated target record id",
            "title": "Target Id",
            "type": "string"
          }
        },
        "required": [
          "association_type",
          "source_id",
          "target_id",
          "cardinality"
        ],
        "title": "AssociationEdgeWire",
        "type": "object"
      },
      "AssociationListEnvelope": {
        "description": "Envelope wrapping a list of associations.",
        "properties": {
          "data": {
            "description": "The list of associations",
            "items": {
              "$ref": "#/components/schemas/AssociationWire"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "AssociationListEnvelope",
        "type": "object"
      },
      "AssociationWire": {
        "description": "A defined association between two object types.",
        "properties": {
          "cardinality": {
            "description": "The cardinality of the association, source to target",
            "enum": [
              "one_to_one",
              "one_to_many",
              "many_to_one",
              "many_to_many"
            ],
            "title": "Cardinality",
            "type": "string"
          },
          "description": {
            "default": "",
            "description": "Optional longer description of the association",
            "title": "Description",
            "type": "string"
          },
          "label": {
            "description": "The human-readable label of the association",
            "title": "Label",
            "type": "string"
          },
          "name": {
            "description": "The internal name of the association",
            "title": "Name",
            "type": "string"
          },
          "source": {
            "description": "The internal name of the source object type",
            "title": "Source",
            "type": "string"
          },
          "target": {
            "description": "The internal name of the target object type",
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "name",
          "label",
          "source",
          "target",
          "cardinality"
        ],
        "title": "AssociationWire",
        "type": "object"
      },
      "BatchCreateItemWire": {
        "description": "A single record to create within a batch create or upsert request.",
        "properties": {
          "properties": {
            "additionalProperties": true,
            "description": "Property name -> value map for a record to create.",
            "title": "Properties",
            "type": "object"
          }
        },
        "required": [
          "properties"
        ],
        "title": "BatchCreateItemWire",
        "type": "object"
      },
      "BatchCreateRequestEnvelope": {
        "description": "Envelope wrapping a batch create or batch upsert request.",
        "properties": {
          "data": {
            "description": "Ordered records to create (1-50).",
            "items": {
              "$ref": "#/components/schemas/BatchCreateItemWire"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "BatchCreateRequestEnvelope",
        "type": "object"
      },
      "BatchDeleteItemWire": {
        "description": "A single record to delete within a batch delete request.",
        "properties": {
          "id": {
            "description": "Id of the existing record to delete.",
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "BatchDeleteItemWire",
        "type": "object"
      },
      "BatchDeleteRequestEnvelope": {
        "description": "Envelope wrapping a batch delete request.",
        "properties": {
          "data": {
            "description": "Ordered record deletions (1-50).",
            "items": {
              "$ref": "#/components/schemas/BatchDeleteItemWire"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "BatchDeleteRequestEnvelope",
        "type": "object"
      },
      "BatchItemResultWire": {
        "description": "The result of processing a single item within a batch request.",
        "properties": {
          "index": {
            "description": "The zero-based index of this item within the request's data list.",
            "title": "Index",
            "type": "integer"
          },
          "problem": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProblemWire"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The problem detail, present when this item failed."
          },
          "record": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordRepresentationWire"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The resulting record, present when this item succeeded with a body."
          },
          "status": {
            "description": "The HTTP status code for this item's result.",
            "enum": [
              200,
              201,
              204,
              403,
              404,
              409,
              422,
              500,
              503
            ],
            "title": "Status",
            "type": "integer"
          }
        },
        "required": [
          "index",
          "status"
        ],
        "title": "BatchItemResultWire",
        "type": "object"
      },
      "BatchResponseEnvelope": {
        "description": "Envelope wrapping a batch create, update, upsert, or delete response.",
        "properties": {
          "data": {
            "description": "Per-item results, in request order.",
            "items": {
              "$ref": "#/components/schemas/BatchItemResultWire"
            },
            "title": "Data",
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/BatchSummaryWire",
            "description": "Aggregate counts for the batch."
          }
        },
        "required": [
          "data",
          "summary"
        ],
        "title": "BatchResponseEnvelope",
        "type": "object"
      },
      "BatchSummaryWire": {
        "description": "Aggregate counts for a batch response.",
        "properties": {
          "failed": {
            "description": "The number of items that failed.",
            "title": "Failed",
            "type": "integer"
          },
          "succeeded": {
            "description": "The number of items that succeeded.",
            "title": "Succeeded",
            "type": "integer"
          },
          "total": {
            "description": "The total number of items in the batch request.",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "succeeded",
          "failed"
        ],
        "title": "BatchSummaryWire",
        "type": "object"
      },
      "BatchUpdateItemWire": {
        "description": "A single record update within a batch update request.",
        "properties": {
          "id": {
            "description": "Id of the existing record to update.",
            "title": "Id",
            "type": "string"
          },
          "properties": {
            "additionalProperties": true,
            "description": "Property name -> value map; explicit null clears a property.",
            "title": "Properties",
            "type": "object"
          }
        },
        "required": [
          "id",
          "properties"
        ],
        "title": "BatchUpdateItemWire",
        "type": "object"
      },
      "BatchUpdateRequestEnvelope": {
        "description": "Envelope wrapping a batch update request.",
        "properties": {
          "data": {
            "description": "Ordered record updates (1-50).",
            "items": {
              "$ref": "#/components/schemas/BatchUpdateItemWire"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "BatchUpdateRequestEnvelope",
        "type": "object"
      },
      "CurrencyAmountWire": {
        "description": "A monetary amount in one currency, as returned by a currency aggregation.",
        "properties": {
          "amount": {
            "description": "Decimal amount as a string, to preserve precision.",
            "title": "Amount",
            "type": "string"
          },
          "unit": {
            "description": "ISO 4217 currency code.",
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "unit"
        ],
        "title": "CurrencyAmountWire",
        "type": "object"
      },
      "FieldErrorWire": {
        "description": "One field-level violation inside a 422 problem's ``errors`` extension member.",
        "properties": {
          "detail": {
            "description": "A human-readable explanation of this violation.",
            "title": "Detail",
            "type": "string"
          },
          "field": {
            "description": "RFC 6901 JSON Pointer into the request body identifying the offending field.",
            "title": "Field",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "A documented reason sub-code, when applicable.",
            "title": "Reason"
          }
        },
        "required": [
          "field",
          "detail"
        ],
        "title": "FieldErrorWire",
        "type": "object"
      },
      "FieldTypeListEnvelope": {
        "description": "Envelope wrapping the list of field types.",
        "properties": {
          "data": {
            "description": "The list of field types",
            "items": {
              "$ref": "#/components/schemas/FieldTypeWire"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "FieldTypeListEnvelope",
        "type": "object"
      },
      "FieldTypeWire": {
        "description": "A field type: the value shape, filter operators, and aggregations a property of this type supports.",
        "properties": {
          "aggregations": {
            "description": "The aggregation functions supported by this field type",
            "items": {
              "type": "string"
            },
            "title": "Aggregations",
            "type": "array"
          },
          "description": {
            "default": "",
            "description": "Optional longer description of the field type",
            "title": "Description",
            "type": "string"
          },
          "label": {
            "description": "The human-readable label of the field type",
            "title": "Label",
            "type": "string"
          },
          "name": {
            "description": "The internal name of the field type (as referenced by a property's field_type)",
            "title": "Name",
            "type": "string"
          },
          "operators": {
            "description": "The filter operators supported by this field type",
            "items": {
              "type": "string"
            },
            "title": "Operators",
            "type": "array"
          },
          "sortable": {
            "description": "Whether properties of this field type may be sorted on",
            "title": "Sortable",
            "type": "boolean"
          },
          "units": {
            "description": "The unit codes this field type accepts (e.g. currency codes), if any",
            "items": {
              "type": "string"
            },
            "title": "Units",
            "type": "array"
          },
          "value_type": {
            "description": "The JSON value shape a property of this type carries",
            "title": "Value Type",
            "type": "string"
          }
        },
        "required": [
          "name",
          "label",
          "value_type",
          "operators",
          "aggregations",
          "sortable",
          "units"
        ],
        "title": "FieldTypeWire",
        "type": "object"
      },
      "FilterAndNode": {
        "additionalProperties": false,
        "description": "A conjunction -- every child filter must match.",
        "properties": {
          "$and": {
            "description": "Child filters that must ALL match. Must contain at least one child. Filter trees may nest at most 8 levels deep.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/FilterAndNode"
                },
                {
                  "$ref": "#/components/schemas/FilterOrNode"
                },
                {
                  "$ref": "#/components/schemas/FilterLeafNode"
                }
              ]
            },
            "minItems": 1,
            "title": "$And",
            "type": "array"
          }
        },
        "required": [
          "$and"
        ],
        "title": "FilterAndNode",
        "type": "object"
      },
      "FilterLeafNode": {
        "additionalProperties": false,
        "description": "A single property comparison -- the leaf of a filter tree.",
        "properties": {
          "op": {
            "description": "Comparison operator. Which operators a property accepts depends on its field type; the object schema endpoint lists the supported set per property. `is_null` tests presence and takes a boolean `value`: true matches records where the property has no value, false matches records where it has one. `in`/`not_in` test whole-value membership -- `value` is a list and a record matches when one of its stored values equals a list entry exactly. `contains_any`/`not_contains_any` instead test substring fragments -- `value` is a list and a record matches when one of its stored values *contains* a list entry as a substring. Use `in` for exact set membership and `contains_any` for a fuzzy multi-term search.",
            "enum": [
              "eq",
              "neq",
              "is_null",
              "gt",
              "gte",
              "lt",
              "lte",
              "starts_with",
              "ends_with",
              "contains",
              "not_contains",
              "contains_any",
              "not_contains_any",
              "in",
              "not_in"
            ],
            "title": "Op",
            "type": "string"
          },
          "property": {
            "description": "Name of the property to test, as returned by the object schema endpoint. The property must be readable by the calling principal.",
            "title": "Property",
            "type": "string"
          },
          "value": {
            "description": "The value to compare against. Required for every operator, including `is_null` (pass true or false). Its type must match the property's field type -- a currency property takes an {amount, unit} object, a date property an ISO-8601 date string. `in`, `not_in`, `contains_any` and `not_contains_any` take a list.",
            "title": "Value"
          }
        },
        "required": [
          "property",
          "op",
          "value"
        ],
        "title": "FilterLeafNode",
        "type": "object"
      },
      "FilterOrNode": {
        "additionalProperties": false,
        "description": "A disjunction -- at least one child filter must match.",
        "properties": {
          "$or": {
            "description": "Child filters of which AT LEAST ONE must match. Must contain at least one child. Filter trees may nest at most 8 levels deep.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/FilterAndNode"
                },
                {
                  "$ref": "#/components/schemas/FilterOrNode"
                },
                {
                  "$ref": "#/components/schemas/FilterLeafNode"
                }
              ]
            },
            "minItems": 1,
            "title": "$Or",
            "type": "array"
          }
        },
        "required": [
          "$or"
        ],
        "title": "FilterOrNode",
        "type": "object"
      },
      "ObjectEnvelope": {
        "description": "Envelope wrapping a single object schema.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ObjectSchemaWire",
            "description": "The full schema of the requested object type"
          }
        },
        "required": [
          "data"
        ],
        "title": "ObjectEnvelope",
        "type": "object"
      },
      "ObjectListEnvelope": {
        "description": "Envelope wrapping a list of object summaries.",
        "properties": {
          "data": {
            "description": "The list of object type summaries",
            "items": {
              "$ref": "#/components/schemas/ObjectSummaryWire"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "ObjectListEnvelope",
        "type": "object"
      },
      "ObjectSchemaWire": {
        "description": "The full schema of an object type, including its properties.",
        "properties": {
          "allows_custom_properties": {
            "description": "Whether custom properties may be added to this object type",
            "title": "Allows Custom Properties",
            "type": "boolean"
          },
          "description": {
            "default": "",
            "description": "Optional longer description of the object type",
            "title": "Description",
            "type": "string"
          },
          "icon": {
            "default": "",
            "description": "Optional icon identifier for the object type",
            "title": "Icon",
            "type": "string"
          },
          "is_system": {
            "description": "Whether this object type is a built-in system object",
            "title": "Is System",
            "type": "boolean"
          },
          "kinds": {
            "description": "The entity kinds that this object type maps to",
            "items": {
              "type": "string"
            },
            "title": "Kinds",
            "type": "array"
          },
          "label": {
            "description": "The human-readable singular label of the object type",
            "title": "Label",
            "type": "string"
          },
          "label_plural": {
            "description": "The human-readable plural label of the object type",
            "title": "Label Plural",
            "type": "string"
          },
          "name": {
            "description": "The internal name of the object type",
            "title": "Name",
            "type": "string"
          },
          "properties": {
            "description": "The properties defined on this object type",
            "items": {
              "$ref": "#/components/schemas/PropertyWire"
            },
            "title": "Properties",
            "type": "array"
          },
          "writable_operations": {
            "description": "The write operations this object type accepts on the public API, independent of the caller's grants: any of create, update, delete, associate. Empty for a read-only type (synced data such as meetings, bookings, email threads, files, and web visits). A credential still needs its own write grant for each operation it uses.",
            "items": {
              "enum": [
                "create",
                "update",
                "delete",
                "associate"
              ],
              "type": "string"
            },
            "title": "Writable Operations",
            "type": "array"
          }
        },
        "required": [
          "name",
          "label",
          "label_plural",
          "kinds",
          "is_system",
          "allows_custom_properties",
          "writable_operations",
          "properties"
        ],
        "title": "ObjectSchemaWire",
        "type": "object"
      },
      "ObjectSummaryWire": {
        "description": "A summary of an object schema, as returned in object listings.",
        "properties": {
          "allows_custom_properties": {
            "description": "Whether custom properties may be added to this object type",
            "title": "Allows Custom Properties",
            "type": "boolean"
          },
          "description": {
            "default": "",
            "description": "Optional longer description of the object type",
            "title": "Description",
            "type": "string"
          },
          "icon": {
            "default": "",
            "description": "Optional icon identifier for the object type",
            "title": "Icon",
            "type": "string"
          },
          "is_system": {
            "description": "Whether this object type is a built-in system object",
            "title": "Is System",
            "type": "boolean"
          },
          "kinds": {
            "description": "The entity kinds that this object type maps to",
            "items": {
              "type": "string"
            },
            "title": "Kinds",
            "type": "array"
          },
          "label": {
            "description": "The human-readable singular label of the object type",
            "title": "Label",
            "type": "string"
          },
          "label_plural": {
            "description": "The human-readable plural label of the object type",
            "title": "Label Plural",
            "type": "string"
          },
          "name": {
            "description": "The internal name of the object type",
            "title": "Name",
            "type": "string"
          },
          "writable_operations": {
            "description": "The write operations this object type accepts on the public API, independent of the caller's grants: any of create, update, delete, associate. Empty for a read-only type (synced data such as meetings, bookings, email threads, files, and web visits). A credential still needs its own write grant for each operation it uses.",
            "items": {
              "enum": [
                "create",
                "update",
                "delete",
                "associate"
              ],
              "type": "string"
            },
            "title": "Writable Operations",
            "type": "array"
          }
        },
        "required": [
          "name",
          "label",
          "label_plural",
          "kinds",
          "is_system",
          "allows_custom_properties",
          "writable_operations"
        ],
        "title": "ObjectSummaryWire",
        "type": "object"
      },
      "PaginationWire": {
        "description": "Cursor-based pagination metadata.",
        "properties": {
          "has_more": {
            "description": "True when another page exists; next_cursor is then non-null",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Opaque cursor for fetching the next page; valid for 24 hours, absent on the last page",
            "title": "Next Cursor"
          }
        },
        "required": [
          "has_more"
        ],
        "title": "PaginationWire",
        "type": "object"
      },
      "Problem": {
        "description": "RFC 9457 Problem Details object returned for every non-2xx response.",
        "properties": {
          "code": {
            "description": "Stable, closed public_api error code.",
            "enum": [
              "unauthenticated",
              "request_invalid",
              "not_found",
              "permission_denied",
              "conflict",
              "rate_limited",
              "timeout",
              "service_unavailable",
              "internal_error"
            ],
            "type": "string"
          },
          "detail": {
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "type": "string"
          },
          "errors": {
            "description": "Every field-level violation when more than one was found (422 only).",
            "items": {
              "properties": {
                "detail": {
                  "description": "A human-readable explanation.",
                  "type": "string"
                },
                "field": {
                  "description": "RFC 6901 JSON Pointer to the offending field.",
                  "type": "string"
                },
                "reason": {
                  "description": "A documented reason sub-code, when applicable.",
                  "type": "string"
                }
              },
              "required": [
                "field",
                "detail"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "field": {
            "description": "RFC 6901 JSON Pointer into the request body identifying the offending field, present when applicable.",
            "type": "string"
          },
          "reason": {
            "description": "Machine-readable sub-classification of `code`, present when applicable. New values are additive and never require a version bump.",
            "type": "string"
          },
          "request_id": {
            "description": "Request id for support correlation, echoed in every response.",
            "type": "string"
          },
          "status": {
            "description": "The HTTP status code for this occurrence of the problem.",
            "type": "integer"
          },
          "title": {
            "description": "The HTTP status reason phrase for `status`.",
            "type": "string"
          },
          "type": {
            "description": "The documentation page for this problem's `code` (`<docs>/errors/<code>`).",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ],
        "type": "object"
      },
      "ProblemWire": {
        "description": "An RFC 9457 problem embedded as a single batch item's result.",
        "properties": {
          "code": {
            "description": "The public API error code for this problem (closed set).",
            "enum": [
              "unauthenticated",
              "request_invalid",
              "not_found",
              "permission_denied",
              "conflict",
              "rate_limited",
              "timeout",
              "service_unavailable",
              "internal_error"
            ],
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "title": "Detail",
            "type": "string"
          },
          "errors": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FieldErrorWire"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Every field-level violation when more than one was found, when applicable.",
            "title": "Errors"
          },
          "field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "RFC 6901 JSON Pointer into the request body identifying the offending field, re-rooted at this item (e.g. /data/3/properties/email), when applicable.",
            "title": "Field"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "A documented reason sub-code, when applicable.",
            "title": "Reason"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The request id associated with this occurrence.",
            "title": "Request Id"
          },
          "status": {
            "description": "The HTTP status code for this problem.",
            "enum": [
              200,
              201,
              204,
              403,
              404,
              409,
              422,
              500,
              503
            ],
            "title": "Status",
            "type": "integer"
          },
          "title": {
            "description": "The HTTP status reason phrase for `status`.",
            "title": "Title",
            "type": "string"
          },
          "type": {
            "description": "A URI reference identifying the problem type (the documentation page for `code`).",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail"
        ],
        "title": "ProblemWire",
        "type": "object"
      },
      "PropertyWire": {
        "description": "A single property definition on an object schema.",
        "properties": {
          "default_value": {
            "default": null,
            "description": "The default value assigned to this property",
            "title": "Default Value"
          },
          "description": {
            "default": "",
            "description": "Optional longer description of the property",
            "title": "Description",
            "type": "string"
          },
          "field_type": {
            "description": "The data type of the property (e.g. text, number, select)",
            "title": "Field Type",
            "type": "string"
          },
          "is_multi": {
            "description": "Whether the property supports multiple values",
            "title": "Is Multi",
            "type": "boolean"
          },
          "is_unique": {
            "description": "Whether values of this property must be unique",
            "title": "Is Unique",
            "type": "boolean"
          },
          "label": {
            "description": "The human-readable label of the property",
            "title": "Label",
            "type": "string"
          },
          "name": {
            "description": "The internal name of the property",
            "title": "Name",
            "type": "string"
          },
          "operators": {
            "description": "The filter operators supported by this property",
            "items": {
              "type": "string"
            },
            "title": "Operators",
            "type": "array"
          },
          "options": {
            "description": "The selectable options, if this is a select-type property",
            "items": {
              "$ref": "#/components/schemas/SelectOptionWire"
            },
            "title": "Options",
            "type": "array"
          },
          "writability": {
            "description": "Whether and how the property may be written: writable, create_only (set once), or read_only",
            "enum": [
              "writable",
              "create_only",
              "read_only"
            ],
            "title": "Writability",
            "type": "string"
          }
        },
        "required": [
          "name",
          "label",
          "field_type",
          "writability",
          "operators",
          "is_multi",
          "is_unique",
          "options"
        ],
        "title": "PropertyWire",
        "type": "object"
      },
      "RecordAggregateRequestWire": {
        "description": "Request body for aggregating records of an object type.",
        "properties": {
          "aggregations": {
            "description": "Aggregations to compute (exactly one supported in v1).",
            "items": {
              "$ref": "#/components/schemas/RecordAggregationWire"
            },
            "title": "Aggregations",
            "type": "array"
          },
          "filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FilterAndNode"
              },
              {
                "$ref": "#/components/schemas/FilterOrNode"
              },
              {
                "$ref": "#/components/schemas/FilterLeafNode"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "An $and/$or filter tree constraining the aggregated set.",
            "title": "Filter"
          },
          "group_by": {
            "description": "Property names to group by.",
            "items": {
              "type": "string"
            },
            "title": "Group By",
            "type": "array"
          },
          "limit": {
            "default": 100,
            "description": "Max groups per page (1-100).",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "Number of groups to skip.",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "required": [
          "aggregations"
        ],
        "title": "RecordAggregateRequestWire",
        "type": "object"
      },
      "RecordAggregationWire": {
        "description": "A single aggregation to compute over a set of records.",
        "properties": {
          "op": {
            "description": "Aggregation function",
            "enum": [
              "count",
              "sum",
              "avg",
              "min",
              "max"
            ],
            "title": "Op",
            "type": "string"
          },
          "property": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Property to aggregate; omit for count.",
            "title": "Property"
          }
        },
        "required": [
          "op"
        ],
        "title": "RecordAggregationWire",
        "type": "object"
      },
      "RecordEnvelope": {
        "description": "Envelope wrapping a single record.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RecordRepresentationWire",
            "description": "The requested record."
          }
        },
        "required": [
          "data"
        ],
        "title": "RecordEnvelope",
        "type": "object"
      },
      "RecordListEnvelope": {
        "description": "Envelope wrapping a page of matching records.",
        "properties": {
          "data": {
            "description": "The page of matching records.",
            "items": {
              "$ref": "#/components/schemas/RecordRepresentationWire"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationWire",
            "description": "Cursor pagination metadata."
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "title": "RecordListEnvelope",
        "type": "object"
      },
      "RecordQueryRequestWire": {
        "description": "Request body for querying records of an object type.",
        "properties": {
          "cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Opaque pagination cursor from a prior response's next_cursor.",
            "title": "Cursor"
          },
          "filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FilterAndNode"
              },
              {
                "$ref": "#/components/schemas/FilterOrNode"
              },
              {
                "$ref": "#/components/schemas/FilterLeafNode"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "An $and/$or filter tree; leaves are {property, op, value}. Omit to match all readable records.",
            "title": "Filter"
          },
          "limit": {
            "default": 100,
            "description": "Max records per page (1-100).",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "properties": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Property names to return; omit for every readable property.",
            "title": "Properties"
          },
          "search": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Free-text search across the object type's searchable properties.",
            "title": "Search"
          },
          "sorts": {
            "description": "Sort criteria (at most one key in v1).",
            "items": {
              "$ref": "#/components/schemas/RecordSortWire"
            },
            "maxItems": 1,
            "title": "Sorts",
            "type": "array"
          }
        },
        "title": "RecordQueryRequestWire",
        "type": "object"
      },
      "RecordRepresentationWire": {
        "description": "The wire representation of a single CRM record.",
        "properties": {
          "id": {
            "description": "The unique identifier of the record",
            "title": "Id",
            "type": "string"
          },
          "object_type": {
            "description": "The internal name of the record's object type",
            "title": "Object Type",
            "type": "string"
          },
          "properties": {
            "additionalProperties": true,
            "description": "The record's property values, keyed by property name",
            "title": "Properties",
            "type": "object"
          }
        },
        "required": [
          "id",
          "object_type",
          "properties"
        ],
        "title": "RecordRepresentationWire",
        "type": "object"
      },
      "RecordSortWire": {
        "description": "A single sort criterion for a record query.",
        "properties": {
          "direction": {
            "description": "Sort direction",
            "enum": [
              "asc",
              "desc"
            ],
            "title": "Direction",
            "type": "string"
          },
          "property": {
            "description": "Property to sort by",
            "title": "Property",
            "type": "string"
          }
        },
        "required": [
          "property",
          "direction"
        ],
        "title": "RecordSortWire",
        "type": "object"
      },
      "RecordWriteRequestData": {
        "description": "The properties payload for a record create or update request.",
        "properties": {
          "properties": {
            "additionalProperties": true,
            "description": "Property name -> value map. Explicit null clears a property; absent properties are untouched.",
            "title": "Properties",
            "type": "object"
          }
        },
        "required": [
          "properties"
        ],
        "title": "RecordWriteRequestData",
        "type": "object"
      },
      "RecordWriteRequestEnvelope": {
        "description": "Envelope wrapping a record create or update request.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RecordWriteRequestData",
            "description": "Write request envelope wrapping the record properties."
          }
        },
        "required": [
          "data"
        ],
        "title": "RecordWriteRequestEnvelope",
        "type": "object"
      },
      "SelectOptionWire": {
        "description": "A single selectable option for a select-type property.",
        "properties": {
          "description": {
            "default": "",
            "description": "Optional longer description of the option",
            "title": "Description",
            "type": "string"
          },
          "label": {
            "description": "The human-readable label of the option",
            "title": "Label",
            "type": "string"
          },
          "value": {
            "description": "The stored value of the option",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "value",
          "label"
        ],
        "title": "SelectOptionWire",
        "type": "object"
      },
      "SelfDataWire": {
        "description": "The introspection payload returned by GET /self.",
        "properties": {
          "org_id": {
            "description": "The org id the caller's token is scoped to",
            "title": "Org Id",
            "type": "integer"
          },
          "permissions": {
            "description": "The principal's per-entity-type permissions",
            "items": {
              "$ref": "#/components/schemas/SelfPermissionWire"
            },
            "title": "Permissions",
            "type": "array"
          },
          "principal": {
            "$ref": "#/components/schemas/SelfPrincipalWire",
            "description": "The authenticated principal"
          },
          "reach": {
            "description": "How far the credential's read access extends. `user`: its creator's own access -- org-visible records plus, at most, the creator's private ones. `org`: every user's private records of the granted types (minted by an org admin).",
            "enum": [
              "user",
              "org"
            ],
            "title": "Reach",
            "type": "string"
          }
        },
        "required": [
          "org_id",
          "principal",
          "permissions",
          "reach"
        ],
        "title": "SelfDataWire",
        "type": "object"
      },
      "SelfEnvelope": {
        "description": "Envelope wrapping the GET /self introspection payload.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SelfDataWire",
            "description": "The introspection payload"
          }
        },
        "required": [
          "data"
        ],
        "title": "SelfEnvelope",
        "type": "object"
      },
      "SelfPermissionWire": {
        "description": "A single per-entity-type permission grant, as returned by GET /self.",
        "properties": {
          "entity_type": {
            "description": "The internal name of the entity type",
            "title": "Entity Type",
            "type": "string"
          },
          "read": {
            "description": "Whether the principal may read this entity type",
            "title": "Read",
            "type": "boolean"
          },
          "write": {
            "description": "Whether the principal may write this entity type",
            "title": "Write",
            "type": "boolean"
          }
        },
        "required": [
          "entity_type",
          "read",
          "write"
        ],
        "title": "SelfPermissionWire",
        "type": "object"
      },
      "SelfPrincipalWire": {
        "description": "The authenticated principal, as returned by GET /self.",
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The display name of the principal, if known",
            "title": "Display Name"
          },
          "entity_id": {
            "description": "The unique identifier of the principal's entity",
            "title": "Entity Id",
            "type": "string"
          },
          "entity_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entity type of the principal, if known",
            "title": "Entity Type"
          }
        },
        "required": [
          "entity_id",
          "entity_type",
          "display_name"
        ],
        "title": "SelfPrincipalWire",
        "type": "object"
      },
      "UpsertEnvelope": {
        "description": "Envelope wrapping an upserted record.",
        "properties": {
          "created": {
            "description": "True when the upsert created a new record; false when it updated an existing match.",
            "title": "Created",
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/RecordRepresentationWire",
            "description": "Response envelope wrapping the upserted record."
          }
        },
        "required": [
          "data",
          "created"
        ],
        "title": "UpsertEnvelope",
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "An Ahoy API key, created under Settings > API access.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The Ahoy public REST API. Every request is authenticated with an API key sent as a bearer token\n(`Authorization: Bearer <key>`); a key is scoped to one org and to the object types its grants\nname. Successful responses wrap their payload in `{\"data\": ...}`; every non-2xx response is an\nRFC 9457 `application/problem+json` body with a closed `code` enum, an optional `reason`\nsub-code, and the `Ahoy-Request-Id` that every response carries for support correlation.\nRequests are rate limited per org (`RateLimit-Limit`/`RateLimit-Remaining` on every response,\n`Retry-After` on 429/503). Pagination is cursor-based: follow `pagination.next_cursor` until\n`pagination.has_more` is false. The `v1` path segment is the major version; additive changes\n(new fields, new endpoints, new `reason` values) ship without a version bump.",
    "title": "Ahoy Public API",
    "version": "v1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/rest/v1/field_types/": {
      "get": {
        "operationId": "field_types_list",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldTypeListEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "List field types",
        "tags": [
          "field_types"
        ]
      }
    },
    "/rest/v1/objects/": {
      "get": {
        "operationId": "objects_list",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectListEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "List object types",
        "tags": [
          "objects"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/": {
      "get": {
        "operationId": "objects_get",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Get an object type's schema",
        "tags": [
          "objects"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/associations/": {
      "get": {
        "operationId": "objects_associations_list",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssociationListEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "List an object type's associations",
        "tags": [
          "objects"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/": {
      "get": {
        "operationId": "records_list",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "Max records per page (1-100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max records per page (1-100).",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque pagination cursor from a prior response.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Opaque pagination cursor from a prior response.",
              "title": "Cursor"
            }
          },
          {
            "description": "Comma-separated property names to return; omit for every readable property.",
            "in": "query",
            "name": "properties",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Comma-separated property names to return; omit for every readable property.",
              "title": "Properties"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordListEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "List records",
        "tags": [
          "records"
        ]
      },
      "post": {
        "operationId": "records_create",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordWriteRequestEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordEnvelope"
                }
              }
            },
            "description": "Created",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "Canonical URL of the created record.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Create a record",
        "tags": [
          "records"
        ]
      },
      "put": {
        "operationId": "records_upsert",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "Readable property used to locate an existing record; its value must be present and non-null in the request body's properties.",
            "in": "query",
            "name": "matching_property",
            "required": true,
            "schema": {
              "description": "Readable property used to locate an existing record; its value must be present and non-null in the request body's properties.",
              "title": "Matching Property",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordWriteRequestEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpsertEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpsertEnvelope"
                }
              }
            },
            "description": "Created",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "Canonical URL of the created record.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Create or update a record by a matching property",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/aggregate/": {
      "post": {
        "operationId": "records_aggregate",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordAggregateRequestWire"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AggregateEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Aggregate records",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/batch/create/": {
      "post": {
        "operationId": "records_batch_create",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchCreateRequestEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponseEnvelope"
                }
              }
            },
            "description": "Multi-Status (one result per item)",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Create up to 50 records",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/batch/delete/": {
      "post": {
        "operationId": "records_batch_delete",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchDeleteRequestEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponseEnvelope"
                }
              }
            },
            "description": "Multi-Status (one result per item)",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Delete up to 50 records",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/batch/update/": {
      "post": {
        "operationId": "records_batch_update",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchUpdateRequestEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponseEnvelope"
                }
              }
            },
            "description": "Multi-Status (one result per item)",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Update up to 50 records",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/batch/upsert/": {
      "post": {
        "operationId": "records_batch_upsert",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "Readable property used to locate an existing record; its value must be present and non-null in the request body's properties.",
            "in": "query",
            "name": "matching_property",
            "required": true,
            "schema": {
              "description": "Readable property used to locate an existing record; its value must be present and non-null in the request body's properties.",
              "title": "Matching Property",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchCreateRequestEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponseEnvelope"
                }
              }
            },
            "description": "Multi-Status (one result per item)",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Create or update up to 50 records by a matching property",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/query/": {
      "post": {
        "operationId": "records_query",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "filter": {
                  "$and": [
                    {
                      "op": "eq",
                      "property": "ahoy_lifecycle_stage",
                      "value": "customer"
                    },
                    {
                      "$or": [
                        {
                          "op": "ends_with",
                          "property": "ahoy_email",
                          "value": "@example.com"
                        },
                        {
                          "op": "gte",
                          "property": "ahoy_last_activity_at",
                          "value": "2026-01-01"
                        }
                      ]
                    }
                  ]
                },
                "limit": 50,
                "sorts": [
                  {
                    "direction": "desc",
                    "property": "ahoy_last_activity_at"
                  }
                ]
              },
              "schema": {
                "$ref": "#/components/schemas/RecordQueryRequestWire"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordListEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Query records with a filter tree",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/{id}/": {
      "delete": {
        "operationId": "records_delete",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The record id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[^/]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Delete a record",
        "tags": [
          "records"
        ]
      },
      "get": {
        "operationId": "records_get",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The record id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[^/]+$",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated property names to return; omit for every readable property.",
            "in": "query",
            "name": "properties",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Comma-separated property names to return; omit for every readable property.",
              "title": "Properties"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Get a record",
        "tags": [
          "records"
        ]
      },
      "patch": {
        "operationId": "records_update",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The record id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[^/]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordWriteRequestEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unsupported Media Type",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Update a record",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/{id}/associations/": {
      "get": {
        "operationId": "records_associations_list",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The record id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[^/]+$",
              "type": "string"
            }
          },
          {
            "description": "Max edges per page (1-100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max edges per page (1-100).",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque pagination cursor from a prior response.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Opaque pagination cursor from a prior response.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssociationEdgeListEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "List a record's associations",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/objects/{object_type}/records/{id}/associations/{association_type}/{target_id}/": {
      "delete": {
        "operationId": "records_associations_remove",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The record id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[^/]+$",
              "type": "string"
            }
          },
          {
            "description": "Internal name of the association type (see `GET /objects/{object_type}/associations/`).",
            "in": "path",
            "name": "association_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The id of the record on the other end of the association.",
            "in": "path",
            "name": "target_id",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Remove an association between two records",
        "tags": [
          "records"
        ]
      },
      "put": {
        "operationId": "records_associations_add",
        "parameters": [
          {
            "description": "Internal name of the object type (see `GET /objects/`), e.g. `ahoy_contact`.",
            "in": "path",
            "name": "object_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The record id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[^/]+$",
              "type": "string"
            }
          },
          {
            "description": "Internal name of the association type (see `GET /objects/{object_type}/associations/`).",
            "in": "path",
            "name": "association_type",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]*$",
              "type": "string"
            }
          },
          {
            "description": "The id of the record on the other end of the association.",
            "in": "path",
            "name": "target_id",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Found",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Conflict",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Associate two records",
        "tags": [
          "records"
        ]
      }
    },
    "/rest/v1/self/": {
      "get": {
        "operationId": "self_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelfEnvelope"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Bad Request",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "WWW-Authenticate": {
                "description": "Always `Bearer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Forbidden",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method Not Allowed",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "description": "Methods this route supports.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not Acceptable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Unprocessable Content",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too Many Requests",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests allowed per minute for the org.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Service Unavailable",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Gateway Timeout",
            "headers": {
              "Ahoy-Request-Id": {
                "description": "Request id for support correlation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Introspect the caller",
        "tags": [
          "self"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.ahoy.ai"
    }
  ],
  "tags": [
    {
      "description": "Field types",
      "name": "field_types"
    },
    {
      "description": "Objects",
      "name": "objects"
    },
    {
      "description": "Records",
      "name": "records"
    },
    {
      "description": "Self",
      "name": "self"
    }
  ]
}
