{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/api/connection_types":{"get":{"operationId":"get-types","summary":"Get Connection Types","description":"Lists all connection types supported by this deployment.\n\nEach entry includes per-type metadata:\n\n- The available operations the connection type supports.\n- Its category.\n- Whether the connection type is enabled for the caller's organization.\n- Which modes (source, destination, enrichment) it can act as.","tags":["subpackage_connections"],"parameters":[{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionTypeResponseEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connection_types/{id}":{"get":{"operationId":"get-connection-type-schema","summary":"Get Connection Type","description":"Returns the JSON schema for a connection type.\n\nThis schema is intended for building forms or validating configuration payloads\nclient-side. It describes the structure Polytomic expects when you create or\nupdate a connection of the given type.\n\nThe response is metadata about the shape of the configuration, not a live\nconnection instance and not a set of current credential values.","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","description":"Connection type identifier (e.g. postgresql, salesforce, hubspot).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonschemaSchema"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connection_types/{type}/parameter_values":{"post":{"operationId":"get-type-parameter-values","summary":"Connection Type Parameter Values","description":"Returns completion values for parameter fields on a connection type.\n\nThis endpoint is useful during connection setup, before a connection exists or\nbefore you want to persist it. The supplied `parameters` are applied to a\ntemporary in-memory connection shape and used to resolve dependent options.\n\nWhen an endpoint requires upstream authorization before it can return values,\nPolytomic returns an error instead of guessing. In that case, complete the\nauthorization flow first and call the endpoint again.","tags":["subpackage_connections"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionParameterValuesResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConnectionTypeParameterValuesRequestSchema"}}}}}},"/api/connections":{"get":{"operationId":"list","summary":"List Connections","description":"Lists every connection in the caller's organization, with sensitive fields redacted.\n\nSensitive configuration values — passwords, API tokens, private keys — are\nredacted from all responses. To understand which fields a connection type\nexposes, consult the parameter schema returned by\n[`GET /api/connection_types`](../../api-reference/connections/get-types).\n\nTo inspect the data objects available on a specific connection, use\n[`POST /api/connections/{id}/schemas/refresh`](../../api-reference/schemas/refresh)\nfollowed by [`GET /api/connections/{id}/schemas/status`](../../api-reference/schemas/get-status).","tags":["subpackage_connections"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionListResponseEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Connection","description":"Creates a new connection of the specified type.\n\nUse [`GET /api/connection_types`](../../api-reference/connections/get-types) to retrieve the\nlist of available types and their parameter schemas. The `configuration`\nobject is type-specific; consult the [integration\nguides](../../guides/configuring-your-connections/overview)\nfor the required and optional fields for each type.\n\n> 📘 Polytomic validates the connection against the upstream service\n> immediately on creation. The request will fail if the credentials or\n> endpoint cannot be reached.","tags":["subpackage_connections"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionRequestSchema"}}}}}},"/api/connections/connect/":{"post":{"operationId":"connect","summary":"Connect","description":"Creates a Polytomic Connect session and returns a redirect URL that embeds the Connect modal.\n\nSee also:\n\n- [Embedding authentication](../../../guides/embedding-authentication), a guide to using Polytomic Connect.","tags":["subpackage_connections"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectCardResponseEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectCardRequest"}}}}}},"/api/connections/test":{"post":{"operationId":"test-connection","summary":"Test Connection","description":"Tests a connection configuration.\n\nThis endpoint is useful for setup flows that want to verify credentials before\npersisting them.\n\nIf you provide `connection_id`, Polytomic starts from the saved configuration\nfor that connection and then applies the request's `configuration` values on\ntop. This lets callers test a partial change without resending every existing\nfield.\n\nThe request does not persist any configuration changes even when validation\nsucceeds.","tags":["subpackage_connections"],"parameters":[{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionRequest"}}}}}},"/api/connections/{id}":{"get":{"operationId":"get","summary":"Get Connection","description":"Returns a single connection by ID, with sensitive fields redacted.\n\nTo inspect the schemas available on this connection, trigger a refresh with\n[`POST /api/connections/{id}/schemas/refresh`](../../../api-reference/schemas/refresh) and\ntrack progress via\n[`GET /api/connections/{id}/schemas/status`](../../../api-reference/schemas/get-status).","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Connection","description":"Updates a connection's configuration.\n\nUpdating a connection is a **full replacement** of its configuration. Any\n`configuration` field you omit is cleared. To make a partial change, fetch\nthe current connection with\n[`GET /api/connections/{id}`](../../../api-reference/connections/get), apply your edits, and send the\ncomplete object back.\n\n> 📘 The connection is re-validated against the upstream service after every\n> update. The request will fail if the new credentials or endpoint cannot be\n> reached.\n\nSyncs that are already running when the update is submitted are not\ninterrupted; the updated configuration takes effect on their next execution.","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectionRequestSchema"}}}}},"delete":{"operationId":"delete","summary":"Delete Connection","description":"Deletes a connection.\n\n> 🚧 Deleting a connection that is referenced by fieldsets, syncs, bulk\n> syncs, or schedules returns `422 connection in use` unless you pass\n> `force=true`. With `force=true`, the API deletes those dependent\n> resources before removing the connection.","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/parameter_values":{"get":{"operationId":"get-parameter-values","summary":"Connection Parameter Values","description":"Returns completion values for parameter fields on a persisted connection.\n\nUse this endpoint when the available options for one parameter depend on the\nconnection's saved credentials or previously selected settings. For example,\nafter a connection is authorized, the upstream service may be able to return\nlists of databases, schemas, or similar selectable values.\n\nFor new setup flows, prefer\n[`POST /api/connection_types/{type}/parameter_values`](../../../../api-reference/connections/get-type-parameter-values),\nwhich lets you resolve completions before the connection has been created.","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionParameterValuesResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/proxy":{"post":{"operationId":"execute-proxy","summary":"Execute Connection Proxy","description":"Proxies an HTTP request to a connection's underlying API using the connection's stored credentials, subject to per-connection rate limits and size caps.\n\nThis endpoint is intended for controlled passthrough use, not as a general\nreplacement for Polytomic's modeled endpoints. The request is executed with the\nconnection's stored credentials and inherited base URL, headers, and query\nparameters.\n\nBefore building requests dynamically, call\n[`GET /api/connections/{id}/proxy/info`](../../../../api-reference/connections/get-proxy-info)\nto inspect the inherited base URL, blocked headers, accepted body types, and\nsize and rate limits.\n\n## Important behavior\n\n- `request.path` must be relative and start with `/`.\n- Use either `request.query` or `request.rawQuery`, not both.\n- Caller-supplied headers are merged with inherited headers, but inherited auth\n headers cannot be overridden.\n- The proxy strips a fixed set of request and response headers for safety.\n- Response bodies larger than the configured maximum are truncated, and\n `truncated` is set to `true`.\n\nThe response includes `proxyCallId`, which you can use to correlate the call\nwith audit logs.","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection to proxy the request through.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteConnectionProxyEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"502":{"description":"Bad Gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"504":{"description":"Gateway Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteConnectionProxyRequest"}}}}}},"/api/connections/{id}/proxy/info":{"get":{"operationId":"get-proxy-info","summary":"Get Connection Proxy Info","description":"Returns the proxy contract for a connection.\n\nUse this endpoint before calling\n[`POST /api/connections/{id}/proxy`](../../../../../api-reference/connections/execute-proxy)\nwhen you need to build requests programmatically. The response shows:\n\n- the inherited base URL that all proxied requests are sent to\n- locked headers and query parameters that are attached automatically\n- blocked request and response headers\n- allowed HTTP methods and body shapes\n- timeout, rate-limit, and payload-size limits\n\nSensitive inherited header and query values are redacted in the response. The\ncontract is still useful for discovering which keys are fixed by the\nconnection, even though their raw values are not exposed.","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection whose proxy contract should be returned.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConnectionProxyInfoEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/shared":{"get":{"operationId":"list-shared-connections","summary":"List Current Org Shared Connections","description":"Lists shared copies of a connection that the caller's organization owns.\n\nThe returned connections are the child copies, not the parent connection\nitself. This is useful when a partner workflow needs to confirm which\ndownstream organizations have already received a shared copy.\n\nCreating a new shared copy is a separate operation. Use\n[`POST /api/organizations/{org_id}/connections/{connection_id}/share`](../../../../api-reference/connections/create-shared-connection)\nfor the v5 partner-scoped flow.","tags":["subpackage_connections"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the parent connection whose shared copies should be listed.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionListResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/organizations/{org_id}/connections/{connection_id}/shared":{"get":{"operationId":"list-shared-connections-for-partner","summary":"List Partner Shared Connections","description":"Lists shared copies of a connection owned by a specific organization in the partner account.\n\nThe `org_id` must match the organization that owns the parent connection. If it\ndoes not, the endpoint returns `404` rather than exposing information about the\nparent connection.\n\nThis endpoint is useful in partner workflows where the parent connection is in\nthe partner owner organization and the caller needs to audit which child\norganizations already have a shared copy.","tags":["subpackage_connections"],"parameters":[{"name":"org_id","in":"path","description":"Unique identifier of the organization that owns the parent connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"connection_id","in":"path","description":"Unique identifier of the parent connection whose shared copies should be listed.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionListResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-shared-connection","summary":"Create Partner Shared Connection","description":"Shares a connection with another organization in the caller's partner account.","tags":["subpackage_connections"],"parameters":[{"name":"org_id","in":"path","description":"Unique identifier of the organization that owns the parent connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"connection_id","in":"path","description":"Unique identifier of the parent connection to share.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSharedConnectionResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCreateSharedConnectionRequestSchema"}}}}}},"/api/connections/{id}/modelsync/enrichment-source":{"get":{"operationId":"get-enrichment-source","summary":"Get Enrichment Source","description":"Describes the enrichment source configuration available on a connection.\n\nNot all connections support enrichment. Call this endpoint to determine\nwhether a connection can serve as an enrichment source in a model sync and,\nif so, what configuration it accepts.\n\n> ⚠️ If the connection does not support enrichment, this endpoint returns\n> `404`. Check for that status before attempting to configure an enrichment\n> source on a sync.\n\nWhen a connection does support enrichment, the response describes the\nconfiguration fields required to set it up. Pass those values in the\n`enrichment` block when creating or updating a model sync.","tags":["subpackage_models"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"params","in":"query","description":"Query parameters used to incrementally refine a dependent source configuration. Keys correspond to configuration fields returned by previous calls to this endpoint.","required":false,"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSyncSourceMetaEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/enrichment/{connection_id}/inputfields":{"post":{"operationId":"post","summary":"Enrichment Fields","description":"Returns the valid input field sets for an enrichment configuration on a connection.\n\nWhen configuring an enrichment source in a model sync, use this endpoint to\ndiscover which input fields the enrichment connection requires. Pass the\nproposed enrichment configuration in the request body; the response lists the\nvalid input field sets that map your model's fields to the enrichment service's\nexpected inputs.","tags":["subpackage_models"],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEnrichmentInputFieldsResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentInputFieldsRequest"}}}}}},"/api/model-preview":{"post":{"operationId":"preview","summary":"Preview Model","description":"Submits a job that previews the fields a model would expose without persisting it.\n\nThe response contains a job ID that resolves to the list of fields the model\nwould expose. Poll the job until it completes to retrieve the field list. The\nmodel is not persisted — this endpoint is useful for validating a query or\nconfiguration before calling [`POST /api/models`](../../api-reference/models/create) to save it.","tags":["subpackage_models"],"parameters":[{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModelRequest"}}}}}},"/api/models":{"get":{"operationId":"list","summary":"List Models","description":"Lists all models in the caller's organization.\n\nResults are ordered by `updated_at` descending, with `id` used as a tiebreaker.\nIf more results are available, the response includes `pagination.next_page_token`.\nPass that token back unchanged to continue from the last item you received.\n\nThe token is opaque. Do not construct or edit it yourself.\n\nThe `limit` is capped at 50. Values above that cap are reduced to 50, and\nnon-positive values fall back to the same default.","tags":["subpackage_models"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Model","description":"Creates a new model.\n\nA model defines a query or view over a connection's data — for example, a SQL\nquery, a filtered object, or a joined dataset. Models are used as sources when\ncreating model syncs.\n\nThe connection referenced by `connection_id` must have source capabilities. Use\n[`GET /api/connection_types/{id}`](../../api-reference/connections/get-connection-type-schema) to check\nwhether a connection type supports use as a source.","tags":["subpackage_models"],"parameters":[{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModelRequest"}}}}}},"/api/models/{id}":{"get":{"operationId":"get","summary":"Get Model","description":"Returns a single model by ID, including its source fields, identity, and filters.\n\nThe response includes the model's source fields, identity column, and any\nconfigured filters. To preview the data a model would return without saving\nchanges, use [`GET /api/models/{id}/sample`](../../../api-reference/models/sample).","tags":["subpackage_models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Model","description":"Updates a model's configuration.\n\nUpdating a model is a **full replacement** of its configuration. Every field in\nthe request body is written to the model; any field you omit is cleared or reset\nto its default value.\n\nTo make a partial change, fetch the current model with\n[`GET /api/models/{id}`](../../../api-reference/models/get), modify the fields you want to change, and send\nthe complete object back in the update request.\n\nChanges to source fields, filters, or the identity column take effect on the\nnext sync execution that uses this model.","tags":["subpackage_models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModelRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Model","description":"Deletes a model.\n\n> 🚧 Deleting a model used by one or more syncs will break those syncs. Remove\n> or reconfigure any syncs that reference this model before deleting it.","tags":["subpackage_models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/models/{id}/sample":{"get":{"operationId":"sample","summary":"Sample Records","description":"Returns a sample of records from a model.\n\nSynchronous requests must complete within 10 seconds. If the source query or\nenrichment step can exceed that budget, use the asynchronous option so the\nwork runs as a background job.","tags":["subpackage_models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSampleResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/modelsync/source":{"get":{"operationId":"get-source","summary":"Get Sync Source","description":"Describes the source configuration available on a connection for use as a model sync source.\n\nUse this endpoint before creating a model to understand what configuration is\navailable. Once you have a configuration, resolve the fields available for\nsync mapping with\n[`GET /api/connections/{id}/modelsync/source/fields`](../../../../../api-reference/model-sync/get-source-fields).","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"params","in":"query","description":"Query parameters used to incrementally refine a dependent source configuration. Keys correspond to configuration fields returned by previous calls to this endpoint.","required":false,"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSyncSourceMetaEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/modelsync/source/fields":{"get":{"operationId":"get-source-fields","summary":"Model Sync Field Query","description":"Returns the source fields available on a connection for a given source configuration.\n\nPass the model's source configuration as query parameters to resolve the\nfields that the connection will expose for that specific configuration. The\nreturned fields are what can be referenced in sync field mappings.\n\n> 📘 Results depend on the source configuration you supply. A different\n> table or query in the configuration may return a completely different field\n> list.\n\nThe available source configuration parameters are described by\n[`GET /api/connections/{id}/modelsync/source`](../../../../../../api-reference/model-sync/get-source).","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"params","in":"query","description":"Source configuration, matching the params used with GET /api/connections/{id}/modelsync/source, that selects the specific source to return fields for.","required":false,"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFieldResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs":{"get":{"operationId":"list","summary":"List Syncs","description":"Lists model syncs in the caller's organization.\n\nResults are ordered by `updated_at` descending, with `id` used as a tiebreaker.\nIf more results are available, the response includes `pagination.next_page_token`.\nPass that token back unchanged to continue from the last item you received.\n\nThe token is opaque. Do not construct or edit it yourself.\n\nThe `limit` is capped at 50. Values above that cap are reduced to 50, and\nnon-positive values fall back to the same default.\n\nThis endpoint returns syncs visible to the current caller's organization scope.\nTo inspect a specific sync in more detail, follow up with\n[`GET /api/syncs/{id}`](../../api-reference/model-sync/get).","tags":["subpackage_modelSync"],"parameters":[{"name":"active","in":"query","description":"Filter to only active or only paused syncs.","required":false,"schema":{"type":"boolean"}},{"name":"mode","in":"query","description":"Filter by sync target mode (e.g. create, updateOrCreate, enrich).","required":false,"schema":{"$ref":"#/components/schemas/ModelsyncSyncTargetMode"}},{"name":"target_connection_id","in":"query","description":"Filter to syncs that write to the specified target connection.","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"page_token","in":"query","description":"Pagination cursor returned in the previous response. Omit on the first request.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of syncs to return. Default and maximum is 50.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSyncResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Sync","description":"Creates a new model sync.\n\nCreate a new sync from one or more models to a destination.\n\nAll of the functionality described in [the product\ndocumentation](https://docs.polytomic.com/docs/sync-destinations) is\nconfigurable via the API.\n\nGuides:\n\n- [Model sync (Reverse ETL) from Snowflake query to Salesforce](../../guides/code-examples/model-sync-reverse-etl-from-snowflake-query-to-salesforce)\n- [Joined model sync from Postgres, Airtable, and Stripe to Hubspot](../../guides/code-examples/joined-model-sync-from-postgres-airtable-and-stripe-to-hubspot)\n\n## Targets (Destinations)\n\nPolytomic refers to a model sync's destination as the \"target object\", or\ntarget. Target objects are identified by a connection ID and an object ID. You\ncan retrieve a list of all target objects for a connection using the [Get Target\nObjects](../../api-reference/model-sync/targets/list) endpoint.\n\nThe `target` object in the request specifies information about the sync destination.\n\n```json\n\"target\": {\n \"connection_id\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"object\": \"Users\",\n},\n```\n\nSome connections support additional configuration for targets. For example,\n[Salesforce\nconnections](../../guides/configuring-your-connections/connections/salesforce#target)\nsupport optionally specifying the ingestion API to use. The target specific\noptions are passed as `configuration`; consult the [integration\nguides](../../guides/configuring-your-connections/overview)\nfor details about specific connection configurations.\n\n### Creating a new target\n\nSome integrations support creating a new target when creating a model sync. For\nexample, an ad audience or database table.\n\nWhen creating a new target, `object` is omitted and `create` is specified\ninstead. The `create` property is an object containing integration specific\nconfiguration for the new target.\n\n```json\n\"target\": {\n \"connection_id\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"create\": {\n \"name\": \"New audience\",\n \"type\": \"user_audience\"\n }\n},\n```\n\nThe [Get Target List](../../api-reference/model-sync/targets/list) endpoint returns information about whether\na connection supports target creation.","tags":["subpackage_modelSync"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSyncRequest"}}}}}},"/api/syncs/schedules":{"get":{"operationId":"get-schedule-options","summary":"Get Sync Schedule Options","description":"Returns the schedule types available when creating or updating a model sync.\n\nUse the `type` identifiers returned by this endpoint in the `schedule` field\nwhen creating or updating a sync via\n[`POST /api/syncs`](../../../api-reference/model-sync/create) or [`PUT /api/syncs/{id}`](../../../api-reference/model-sync/update).","tags":["subpackage_modelSync"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleOptionResponseEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{id}":{"get":{"operationId":"get","summary":"Get Sync","description":"Returns a single model sync by ID.\n\nTo check whether a sync is currently running or has recently completed, use\n[`GET /api/syncs/{id}/status`](../../../api-reference/model-sync/get-status). For the full history of\nexecutions, use [`GET /api/syncs/{id}/executions`](../../../api-reference/model-sync/executions/list).","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Sync","description":"Updates a model sync's configuration.\n\nUpdating a model sync is a **full replacement** of the sync's configuration.\nEvery field in the request body is written to the sync; any field you omit is\ncleared or reset to its default value.\n\nTo make a partial change — for example, toggling `active` or adjusting a\nsingle field mapping — fetch the current sync with\n[`GET /api/syncs/{id}`](../../../api-reference/model-sync/get),\nmodify the fields you want to change, and send the complete object back in\nthe update request.\n\nUpdates to `active`, `schedule`, and `policies` take effect immediately.\nChanges to source fields, target configuration, filters, or field mappings\ntake effect on the sync's next execution.","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSyncRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Model Sync","description":"Deletes a model sync, cancelling any running executions.\n\nDeletion is permanent. Any running execution is cancelled before the sync\nrecord is removed. Deleted syncs cannot be recovered; recreate them using\n[`POST /api/syncs`](../../../api-reference/model-sync/create) if needed.","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{id}/activate":{"post":{"operationId":"activate","summary":"Activate Sync","description":"Sets whether a model sync is active.\n\nOnly active syncs execute on schedule or in response to a manual trigger. Set\n`active` to `false` to pause a sync without deleting it.\n\n> 📘 Deactivating a sync does not cancel an execution that is already in\n> progress. Use [`POST /api/syncs/{id}/cancel`](../../../../api-reference/model-sync/cancel) to stop a\n> running execution.","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateSyncEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateSyncInput"}}}}}},"/api/syncs/{id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Sync","description":"Requests cancellation of any running executions on a model sync.\n\nCancellation is asynchronous. A successful response means the cancellation\nsignal has been queued; the running execution continues until the signal is\nprocessed. Poll `GET /api/syncs/{id}/status` until the current execution\nreaches a terminal state (`completed`, `canceled`, or `failed`) to confirm\ncancellation has taken effect.","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","description":"The active execution of this sync ID will be cancelled.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSyncResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{id}/executions":{"post":{"operationId":"start","summary":"Start Sync","description":"Starts a new execution of a model sync.\n\n> 🚧 Force full resync\n>\n> Use caution when setting the `resync` parameter to `true`. This will force a full resync of the data from the source system. This can be a time-consuming operation and may impact the performance of the source system. It is recommended to only use this option when necessary.","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSyncResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSyncRequest"}}}}}},"/api/syncs/{id}/status":{"get":{"operationId":"get-status","summary":"Get Sync Status","description":"Returns the current status of a model sync.\n\nThe response includes a summary of the most recent execution, including its\nstart time, completion time, and record counts. For the complete execution\nhistory, use [`GET /api/syncs/{id}/executions`](../../../../api-reference/model-sync/executions/list).","tags":["subpackage_modelSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncStatusEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/modelsync/target/fields":{"get":{"operationId":"get-target-fields","summary":"Get Sync Target Fields","description":"Returns the fields of a specific target object on a connection.\n\nPass the target object identifier to retrieve the fields available for\nmapping on that object. These are the destination fields you can reference\nwhen configuring field mappings in a model sync.\n\n> 📘 To list available target objects and their identifiers, use\n> [`GET /api/connections/{id}/modelsync/targetobjects`](../../../../../../api-reference/model-sync/targets/list).\n\nFields returned here reflect the connection's current cached state. If the\nupstream object schema has changed, trigger a schema refresh with\n[`POST /api/connections/{id}/schemas/refresh`](../../../../../../api-reference/schemas/refresh)\nbefore calling this endpoint.","tags":["subpackage_modelSync.subpackage_modelSync/targets"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"target","in":"query","description":"Identifier of the target object (e.g. schema.table for a database destination, object name for a SaaS destination).","required":true,"schema":{"type":"string"}},{"name":"refresh","in":"query","description":"When true, force a cache refresh of the target's schema before returning its fields.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/modelsync/targetobjects":{"get":{"operationId":"list","summary":"Get Target Objects","description":"Lists the target objects available on a connection for use as a model sync destination.\n\nIf the connection supports creating new destinations, the `target_creation`\nobject will contain information on what properties are required to create the\ntarget.\n\nTarget creation properties are all string values; the `enum` flag indicates if\nthe property has a fixed set of valid values. When `enum` is `true`, the [Target\nCreation Property\nValues](../../../../../api-reference/model-sync/targets/get-create-property)\nendpoint can be used to retrieve the valid values.\n\n## Sync modes\n\nThe sync mode determines which records are written to the destination for a\nmodel sync. The `modes` array for a target object defines the `id` along with\nwhat operations the mode supports.","tags":["subpackage_modelSync.subpackage_modelSync/targets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetObjectsResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/modelsync/targetobjects/properties/{property}":{"get":{"operationId":"get-create-property","summary":"Get Target Creation Property Values","description":"Returns the valid values for a target-creation property on a connection that supports creating new target objects.\n\nConnections which support creating new sync target objects (destinations) will\nreturn `target_creation` with their [target object list](../../../../../../../api-reference/model-sync/targets/list). This endpoint\nwill return possible values for properties where `enum` is `true`.\n\nIf the connection does not support creating new target objects, an HTTP 404 will\nbe returned.\n\nThe `values` array lists the valid options (and labels) for the property. Each\nmember of the `values` array has a `label` and `value`. For exaample,\n\n```json\n{\n \"data\": [\n {\n \"id\": \"account\",\n \"title\": \"Account ID\",\n \"enum\": true,\n \"values\": [\n {\n \"value\": \"1234567::urn:li:organization:987654\",\n \"label\": \"Polytomic Inc. (1234567)\"\n }\n ]\n }\n ]\n}\n```\n\nThe `value` for the selected option should be passed when [creating a\nsync](../../../../../../../api-reference/model-sync/create).","tags":["subpackage_modelSync.subpackage_modelSync/targets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"property","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetPropertyValuesEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{sync_id}/executions":{"get":{"operationId":"list","summary":"List Executions","description":"Lists executions for a model sync.\n\nResults are ordered by start time descending. If more results are available, the\nresponse includes `pagination.next_page_token`; pass that token back unchanged\nto continue paging.\n\nThe token is opaque. Do not construct or edit it yourself.\n\nFor full details about a specific execution — including record counts and error\nsummaries — use\n[`GET /api/syncs/{sync_id}/executions/{id}`](../../../../api-reference/model-sync/executions/get).","tags":["subpackage_modelSync.subpackage_modelSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string"}},{"name":"only_completed","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ascending","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExecutionResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{sync_id}/executions/{id}":{"get":{"operationId":"get","summary":"Get Execution","description":"Returns a single model sync execution.\n\nFor the log files produced by this execution, use\n[`GET /api/syncs/{sync_id}/executions/{id}/{type}`](../../../../../api-reference/model-sync/executions/get-log-urls) to retrieve\nsigned URLs grouped by log category.","tags":["subpackage_modelSync.subpackage_modelSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExecutionResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{sync_id}/executions/{id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Sync Execution","description":"Requests cancellation of a model sync execution.","tags":["subpackage_modelSync.subpackage_modelSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","description":"The ID of the execution to cancel.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSyncExecutionResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{sync_id}/executions/{id}/consolelog":{"get":{"operationId":"get-console-logs","summary":"Get Execution Console Logs","description":"Fetch the latest console log entries for a sync execution. Returns at most the most recent 50 entries retained in Redis.","tags":["subpackage_modelSync.subpackage_modelSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Maximum number of entries to return. Values above the logger retention limit are capped to 50.","required":false,"schema":{"type":"integer"}},{"name":"after","in":"query","description":"Return only entries newer than this cursor.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionConsoleLogsResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{sync_id}/executions/{id}/{type}":{"get":{"operationId":"get-log-urls","summary":"Get Execution Log Urls","description":"Returns signed URLs for every log file of a given type on a model sync execution.\n\n`{type}` identifies the log category, such as `errors` or `warnings`. The\nresponse contains a signed URL for each log file in that category.\n\n> 🚧 Signed URLs expire after a short period. If a URL has expired, re-request\n> it from this endpoint. To fetch a single file's URL directly, use\n> [`GET /api/syncs/{sync_id}/executions/{id}/{type}/{filename}`](../../../../../../api-reference/model-sync/executions/get-logs).","tags":["subpackage_modelSync.subpackage_modelSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ExecutionLogType"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionLogsResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/syncs/{sync_id}/executions/{id}/{type}/{filename}":{"get":{"operationId":"get-logs","summary":"Get Execution Log","description":"Returns a signed URL for a specific log file produced by a model sync execution.\n\nThe URL is signed and expires after a short period. If it has expired before\nyou download the file, call this endpoint again to obtain a fresh URL.","tags":["subpackage_modelSync.subpackage_modelSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ExecutionLogType"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs":{"get":{"operationId":"list","summary":"List Bulk Syncs","description":"Lists bulk syncs in the caller's organization.\n\nResults are ordered by `updated_at` descending, with `id` as a tiebreaker for\nsyncs modified at the same instant. Pagination uses an opaque\n`pagination.next_page_token` returned in the response; pass it back as the\n`page_token` query parameter to fetch the next page. The `limit` parameter is\noptional, and the default and maximum page size is 50 syncs.\n\n> 📘 To retrieve a specific sync, use\n> [`GET /api/bulk/syncs/{id}`](../../../api-reference/bulk-sync/get)\n> instead of filtering the list client-side.","tags":["subpackage_bulkSync"],"parameters":[{"name":"active","in":"query","description":"Filter to only active (true) or only paused (false) syncs. Omit to return both.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncListEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Bulk Sync","description":"Creates a new bulk sync.\n\nBulk syncs are used for the ELT pattern (Extract, Load, and Transform), where you want to sync un-transformed data to your data warehouses, databases, or cloud storage buckets like S3.\n\nAll of the functionality described in [the product\ndocumentation](https://docs.polytomic.com/docs/bulk-syncs) is configurable via\nthe API.\n\nSample code examples:\n\n- [Bulk sync (ELT) from Salesforce to S3](../../../guides/code-examples/bulk-sync-elt-from-salesforce-to-s-3)\n- [Bulk sync (ELT) from Salesforce to Snowflake](../../../guides/code-examples/bulk-sync-elt-from-salesforce-to-snowflake)\n- [Bulk sync (ELT) from HubSpot to PostgreSQL](../../../guides/code-examples/bulk-sync-elt-from-hub-spot-to-postgre-sql)\n\n## Connection specific configuration\n\nThe `destination_configuration` is integration-specific configuration for the\nselected bulk sync destination. This includes settings such as the output schema\nand is required when creating a new sync.\n\nThe `source_configuration` is optional. It allows configuration for how\nPolytomic reads data from the source connection. This will not be available for\nintegrations that do not support additional configuration.\n\nConsult the [connection configurations](../../../guides/configuring-your-connections/overview)\nto see configurations for particular integrations (for example, [here](../../../guides/configuring-your-connections/connections/postgre-sql#source-1) is the available source configuration for the PostgreSQL bulk sync source).\n\n## Defaults and selection behavior\n\nIf `schemas` is omitted, the sync is created with all available source schemas\nselected. Pass `schemas` explicitly if you want the initial sync to include\nonly a subset of tables or objects.\n\nSchedule times are interpreted in UTC.\n\nWhen omitted, automatic discovery defaults are conservative:\n\n- `automatically_add_new_objects` defaults to not enabling newly discovered\n source objects automatically.\n- `automatically_add_new_fields` defaults to enabling newly discovered fields\n on already selected objects.\n- `normalize_names` defaults to enabled.","tags":["subpackage_bulkSync"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBulkSyncRequest"}}}}}},"/api/bulk/syncs/{id}":{"get":{"operationId":"get","summary":"Get Bulk Sync","description":"Returns a bulk sync by ID.\n\nThe response includes the sync's top-level configuration — source, destination,\nschedules, and discovery settings.\n\n- To check whether the sync is running and see the most-recent execution result,\n use [`GET /api/bulk/syncs/{id}/status`](../../../../api-reference/bulk-sync/get-status).\n- To inspect which schemas are selected and how they are configured, use\n [`GET /api/bulk/syncs/{id}/schemas`](../../../../api-reference/bulk-sync/schemas/list).","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refresh_schemas","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Bulk Sync","description":"Updates an existing bulk sync's top-level configuration.\n\nUpdating a bulk sync is a **full replacement** of the sync's top-level\nconfiguration. Every field in the request body is written to the sync; any\nfield you omit is cleared or reset to its default value.\n\nTo make a partial change — for example, toggling `active` or swapping a\nschedule — fetch the current sync with\n[`GET /api/bulk/syncs/{id}`](../../../../api-reference/bulk-sync/get),\nmodify the fields you want to change, and send the complete object back in\nthe update request.\n\nUpdates to `active`, `schedules`, and `policies` take effect immediately.\nChanges to source or destination configuration take effect on the sync's\nnext execution.\n\nBecause omitted fields are reset to their defaults, the discovery and\nnaming options behave the same as on create when left out:\n\n- `automatically_add_new_objects` resets to not enabling newly discovered\n source objects automatically.\n- `automatically_add_new_fields` resets to enabling newly discovered\n fields on already selected objects.\n- `normalize_names` resets to enabled.\n\nSend the existing values explicitly if you want to preserve a non-default or\nnon-empty setting, including schema and field selections.\n\n> 📘 Updating schemas\n>\n> Schema updates are not performed through this endpoint. Use the\n> [Update Bulk Sync Schemas](../../../../api-reference/bulk-sync/schemas/patch)\n> endpoint to change a subset of schemas, or\n> [Update Bulk Sync Schema](../../../../api-reference/bulk-sync/schemas/update)\n> to replace a single schema's configuration.","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBulkSyncRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Bulk Sync","description":"Deletes a bulk sync, cancelling any running executions.\n\nAny execution that is currently running is cancelled before the sync record is\nremoved.\n\n> 🚧 All associated schedules, schema configurations, and execution history are\n> deleted along with the sync.","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refresh_schemas","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{id}/activate":{"post":{"operationId":"activate","summary":"Activate Bulk Sync","description":"Sets whether a bulk sync is active.\n\nOnly active syncs are eligible to execute on their configured schedule.\nDeactivating a sync prevents future scheduled runs and requests cancellation of\nany execution that is currently in progress.\n\n> 📘 To start or stop a running execution directly, use\n> [`POST /api/bulk/syncs/{id}/executions`](../../../../../api-reference/bulk-sync/start)\n> or\n> [`POST /api/bulk/syncs/{id}/cancel`](../../../../../api-reference/bulk-sync/cancel).","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateSyncEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateSyncInput"}}}}}},"/api/bulk/syncs/{id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Bulk Sync","description":"Requests cancellation of any running executions on a bulk sync.\n\nCancellation is asynchronous. A successful response means the cancellation\nsignal has been queued; the running execution continues until the signal is\nprocessed. Poll `GET /api/bulk/syncs/{id}/status` until the current execution\nreaches a terminal state (`completed`, `canceled`, or `failed`) to confirm\ncancellation has taken effect.","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","description":"The active execution of this bulk sync ID will be cancelled.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBulkSyncResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{id}/executions":{"post":{"operationId":"start","summary":"Start Bulk Sync Execution","description":"Starts a new execution of a bulk sync.\n\nThis endpoint returns the execution record immediately after the run is queued\nor started. Use the execution ID with the bulk-sync execution endpoints if you\nneed to monitor progress in detail.\n\n## Execution modes\n\n- Set `test=true` to validate the sync without writing to the destination.\n- Use `resync_mode` for destructive or full-refresh style reruns.\n- `test` and `resync_mode` are mutually exclusive.\n\nThe legacy `resync` boolean is no longer accepted on this v5 endpoint. Send\n`resync_mode` instead.\n\nIf another execution is already running, the endpoint returns `409 Conflict`.","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncExecutionEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartBulkSyncRequest"}}}}},"get":{"operationId":"list","summary":"List Bulk Sync Executions","description":"Lists executions for a bulk sync.\n\nResults are ordered by start time descending by default. When more results are\navailable, the response includes an opaque `pagination.next_page_token`; pass it\nback as the `page_token` query parameter to retrieve the next page. The `limit`\nparameter is optional, and the maximum page size is 100 executions.\n\nUse `only_terminal=true` to return only finished executions. In that mode,\nexecutions are ordered by `updated_at` so recently completed runs appear first.\n\nUse `ascending=true` to walk forward from the oldest execution instead of\nstarting with the newest execution.\n\nFor the full details of a single run — including per-schema execution status —\nuse [`GET /api/bulk/syncs/{id}/executions/{exec_id}`](../../../../../api-reference/bulk-sync/executions/get).","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page_token","in":"query","description":"Pagination cursor returned in the previous response. Omit on the first request.","required":false,"schema":{"type":"string"}},{"name":"only_terminal","in":"query","description":"When true, only return executions that have finished. Terminal executions are ordered by updated_at.","required":false,"schema":{"type":"boolean"}},{"name":"ascending","in":"query","description":"When true, return executions from oldest to newest. Default is newest first.","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Maximum number of executions to return. Capped at 100.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBulkSyncExecutionsEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{id}/status":{"get":{"operationId":"get-status","summary":"Get Bulk Sync Status","description":"Returns the current status of a bulk sync.\n\nThe response includes the sync's current active/inactive state together with\ninformation about the most recent execution — its status, start time, and any\nerrors — making this endpoint well-suited for health checks and monitoring\ndashboards.\n\nFor the complete execution history, use\n[`GET /api/bulk/syncs/{id}/executions`](../../../../../api-reference/bulk-sync/executions/list).\nFor the full details of a specific run, including per-schema breakdowns, use\n[`GET /api/bulk/syncs/{id}/executions/{exec_id}`](../../../../../api-reference/bulk-sync/executions/get).","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncStatusEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/bulksync/source":{"get":{"operationId":"get-source","summary":"Get Bulk Source","description":"Lists the schemas (tables or objects) available on a connection for use as a bulk sync source, optionally including per-schema field details.\n\nThe response reflects what the\nconnection currently has cached; if the upstream source has changed, trigger\na refresh first with\n[`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh).\n\nThese are the schemas available for selection, not the schemas already\nconfigured on any particular sync. To inspect schemas on a running sync, use\n[`GET /api/bulk/syncs/{id}/schemas`](../../../../../api-reference/bulk-sync/schemas/list).\n\nPass `include_fields=true` to receive per-schema field details in a single call.\nOmit it when you only need the schema list, as field enumeration can be slow for\nlarge sources.","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"include_fields","in":"query","description":"When true, include per-schema field lists in the response. Set to false for a smaller payload when field details are not needed.","required":false,"schema":{"type":"boolean","default":true}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncSourceEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/bulksync/target":{"get":{"operationId":"get-destination","summary":"Get Bulk Destination","description":"Describes the destination configuration schema a connection accepts when used as a bulk sync destination.\n\nThe response is a JSON Schema object describing the shape of the\n`destination_configuration` field you must supply when\n[creating](../../../../../api-reference/bulk-sync/create) or\n[updating](../../../../../api-reference/bulk-sync/update) a bulk sync that uses this\nconnection as its destination. Required fields vary by connection type.\n\n> 📘 Fetch this endpoint once per connection type rather than once per sync.\n> The configuration schema is the same for all syncs sharing the same\n> destination connection.","tags":["subpackage_bulkSync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncDestEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/status":{"get":{"operationId":"list-status","summary":"List Bulk Sync Execution Status","description":"Returns a concise per-schema status for one or more bulk syncs.\n\nThis endpoint is a summary view, not an execution-history view. Each schema is\nrepresented at most once with its most recent execution status, and running\nexecutions are preferred over older terminal ones.\n\nUse this endpoint when you want a dashboard-style answer to \"what is each sync\ndoing now?\" If you need the full execution history or a single execution's\ndetails, use [`GET /api/bulk/syncs/{id}/executions`](../../../../api-reference/bulk-sync/executions/list) or\n[`GET /api/bulk/syncs/{id}/executions/{exec_id}`](../../../../api-reference/bulk-sync/executions/get) instead.\n\nSetting `all=true` or `active=true` ignores any explicit `sync_id` filters and\nexpands the request to the caller's organization scope.","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"all","in":"query","description":"When true, return status for every sync in the caller's organization. Overrides any sync_id values.","required":false,"schema":{"type":"boolean"}},{"name":"active","in":"query","description":"When true, return status only for active syncs in the caller's organization. Overrides any sync_id values.","required":false,"schema":{"type":"boolean"}},{"name":"sync_id","in":"query","description":"Return status for the specified bulk sync. Repeat the parameter to target multiple syncs. Ignored if all or active is true.","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBulkSyncExecutionsStatusEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{id}/executions/{exec_id}":{"get":{"operationId":"get","summary":"Get Bulk Sync Execution","description":"Returns a single bulk sync execution, including per-schema execution status.\n\nThe response includes a breakdown of each schema (table or object) that\nparticipated in the execution, with its individual status, row counts, and any\nerror details. This makes it suitable for diagnosing partial failures where\nsome schemas succeeded while others did not.","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"exec_id","in":"path","description":"Unique identifier of the execution.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncExecutionEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{id}/executions/{exec_id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Bulk Sync Execution","description":"Requests cancellation of a specific bulk sync execution.\n\nCancellation is asynchronous. A successful response means the cancellation\nsignal has been queued; the execution continues to run until the signal is\nprocessed. Poll `GET /api/bulk/syncs/{id}/executions/{exec_id}` until the\nexecution reaches a terminal state (`completed`, `canceled`, or `failed`) to\nconfirm cancellation has taken effect.","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"id","in":"path","description":"The bulk sync ID.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"exec_id","in":"path","description":"The execution ID to cancel.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBulkSyncResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{sync_id}/executions/{execution_id}/consolelog":{"get":{"operationId":"get-console-logs","summary":"Get Bulk Execution Console Logs","description":"Fetch the latest console log entries for a bulk sync execution. Returns at most the most recent 50 entries retained in Redis.","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Maximum number of entries to return. Values above the logger retention limit are capped to 50.","required":false,"schema":{"type":"integer"}},{"name":"after","in":"query","description":"Return only entries newer than this cursor.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionConsoleLogsResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{sync_id}/executions/{execution_id}/logs":{"get":{"operationId":"get-logs","summary":"Get Bulk Sync Execution Logs","description":"Returns signed URLs for the log files produced by a single bulk sync execution.\n\nEach URL in the response is pre-signed and grants temporary read access to the\ncorresponding log file. URLs expire after a short period; if you need to access\na file after the URL has expired, call this endpoint again to obtain a fresh set\nof signed URLs.\n\n> 📘 To export logs asynchronously to a destination of your choice, use\n> [`POST /api/bulk/syncs/{sync_id}/executions/{execution_id}/logs/export`](../../../../../../../api-reference/bulk-sync/executions/export-logs)\n> instead.","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"sync_id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"execution_id","in":"path","description":"Unique identifier of the execution whose log files should be listed.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncExecutionLogsEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{sync_id}/executions/{execution_id}/logs/export":{"post":{"operationId":"export-logs","summary":"Export Sync Logs","description":"Starts an asynchronous job that packages the log files for a single bulk sync execution into a downloadable archive.\n\n> 📘 Log export is asynchronous\n>\n> This endpoint starts a background job that packages an execution's log\n> files into a downloadable archive. The first call typically returns a\n> `job` descriptor instead of a completed result. Poll\n> [`GET /api/jobs/exportlogs/{id}`](../../../../../../../../api-reference/jobs/get)\n> with the returned `job_id` until `status` is `done`; the final response\n> contains a signed `url` that can be used to download the archive.\n>\n> Set `notify=true` to also email the requesting user when the archive is\n> ready.","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"sync_id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"execution_id","in":"path","description":"Unique identifier of the execution whose logs should be exported.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"notify","in":"query","description":"Send a notification to the user when the logs are ready for download.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportSyncLogsEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{sync_id}/executions/{execution_id}/schemas/{schema_id}/consolelog":{"get":{"operationId":"get-schema-console-logs","summary":"Get Bulk Schema Execution Console Logs","description":"Fetch the latest console log entries for a schema within a bulk sync execution. Returns at most the most recent 50 entries retained in Redis.","tags":["subpackage_bulkSync.subpackage_bulkSync/executions"],"parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Schema identifier for schema-scoped console logs.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of entries to return. Values above the logger retention limit are capped to 50.","required":false,"schema":{"type":"integer"}},{"name":"after","in":"query","description":"Return only entries newer than this cursor.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionConsoleLogsResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{id}/schemas":{"get":{"operationId":"list","summary":"Get Bulk Sync Schemas","description":"Lists the schemas (tables, objects) configured for a bulk sync.\n\nThis endpoint returns the schemas that have been added to and configured on this\nspecific bulk sync — not the full set of schemas available from the source\nconnection. To discover what the source connection exposes, use the source\nschemas endpoint for the relevant connection type.\n\nEach schema in the response includes its sync mode, field selections, and any\ncustom configuration applied via\n[`PATCH /api/bulk/syncs/{id}/schemas`](../../../../../api-reference/bulk-sync/schemas/patch)\nor\n[`PUT /api/bulk/syncs/{id}/schemas/{schema_id}`](../../../../../api-reference/bulk-sync/schemas/update).","tags":["subpackage_bulkSync.subpackage_bulkSync/schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filters","in":"query","description":"Optional filters applied to the returned schemas. Supports enabled=true to return only enabled schemas and enabled=false to return only disabled schemas.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBulkSchemaEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"operationId":"patch","summary":"Update Bulk Sync Schemas","description":"Patches one or more schemas on a bulk sync at once.\n\nOnly schemas explicitly included in the request body are modified; schemas\nomitted from the request are left unchanged. This makes PATCH the right choice\nwhen you want to update a subset of tables without affecting the rest of the\nsync's schema configuration.\n\nWithin each provided schema, omitting `fields` enables all available fields on\nthat schema. To control which fields are enabled, include the `fields` array\nwith explicit `enabled` values for each field.\n\n> 📘 To replace a single schema's configuration in full (clearing any fields you\n> omit), use\n> [`PUT /api/bulk/syncs/{id}/schemas/{schema_id}`](../../../../../api-reference/bulk-sync/schemas/update)\n> instead.","tags":["subpackage_bulkSync.subpackage_bulkSync/schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBulkSyncSchemasEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBulkSyncSchemasRequest"}}}}}},"/api/bulk/syncs/{id}/schemas/{schema_id}":{"get":{"operationId":"get","summary":"Get Bulk Sync Schema","description":"Returns the configuration of a single schema on a bulk sync.\n\nReturns the sync mode, field selections, and any other configuration applied to\nthis schema on the bulk sync.\n\nTo modify the configuration, use\n[`PATCH /api/bulk/syncs/{id}/schemas`](../../../../../../api-reference/bulk-sync/schemas/patch)\nfor a partial update across multiple schemas, or\n[`PUT /api/bulk/syncs/{id}/schemas/{schema_id}`](../../../../../../api-reference/bulk-sync/schemas/update)\nto fully replace this schema's configuration.","tags":["subpackage_bulkSync.subpackage_bulkSync/schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Source-side schema identifier.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSchemaEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Bulk Sync Schema","description":"Replaces the configuration of a single schema on a bulk sync.\n\nThis is a full replacement: every field in the request body is written to the\nschema, and any field you omit is cleared or reset to its default. Fetch the\ncurrent configuration with\n[`GET /api/bulk/syncs/{id}/schemas/{schema_id}`](../../../../../../api-reference/bulk-sync/schemas/get)\nfirst if you want to preserve existing settings while changing only a subset.\n\nOmitting `fields` enables all available fields on the schema. To control which\nfields are enabled, include the `fields` array with explicit `enabled` values.\n\n> 📘 To update multiple schemas in a single request without affecting others,\n> use the partial-update endpoint\n> [`PATCH /api/bulk/syncs/{id}/schemas`](../../../../../../api-reference/bulk-sync/schemas/patch)\n> instead.","tags":["subpackage_bulkSync.subpackage_bulkSync/schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Source-side schema identifier.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSchemaEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBulkSchema"}}}}}},"/api/bulk/syncs/{id}/schemas/{schema_id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Bulk Sync Schema","description":"Requests cancellation of any running executions for a specific schema on a bulk sync.\n\nCancellation is asynchronous. A successful response means the cancellation\nsignal for this schema has been queued; the schema's in-flight work continues\nuntil the signal is processed. Poll\n`GET /api/bulk/syncs/{id}/schemas/{schema_id}` and the parent execution via\n`GET /api/bulk/syncs/{id}/status` to confirm the schema has reached a terminal\nstate.","tags":["subpackage_bulkSync.subpackage_bulkSync/schemas"],"parameters":[{"name":"id","in":"path","description":"The bulk sync ID.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"The schema ID to cancel for the bulk sync.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBulkSyncResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/bulk/syncs/{sync_id}/schedules":{"get":{"operationId":"list","summary":"Get Bulk Sync Schedules","description":"Lists all schedules configured for a bulk sync.\n\nA bulk sync can have multiple schedules attached; this endpoint returns all\nof them. Schedule times are returned in UTC.","tags":["subpackage_bulkSync.subpackage_bulkSync/schedules"],"parameters":[{"name":"sync_id","in":"path","description":"Unique identifier of the bulk sync whose schedules should be returned.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulesEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Bulk Sync Schedule","description":"Adds a new schedule to a bulk sync.\n\nA bulk sync can have multiple schedules attached; adding one here does not\nreplace existing schedules. Schedule times are interpreted in UTC.\n\nCreating a schedule only affects future automatic executions. To run the\nsync immediately, call\n[`POST /api/bulk/syncs/{id}/executions`](../../../../../api-reference/bulk-sync/start).","tags":["subpackage_bulkSync.subpackage_bulkSync/schedules"],"parameters":[{"name":"sync_id","in":"path","description":"Unique identifier of the bulk sync to add a schedule to.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleRequest"}}}}}},"/api/bulk/syncs/{sync_id}/schedules/{schedule_id}":{"get":{"operationId":"get","summary":"Get Bulk Sync Schedule","description":"Returns a single schedule configured on a bulk sync.\n\nSchedule times are returned in UTC.\n\nTo see all schedules on this sync, use\n[`GET /api/bulk/syncs/{sync_id}/schedules`](../../../../../../api-reference/bulk-sync/schedules/list).\nTo update the schedule, use\n[`PUT /api/bulk/syncs/{sync_id}/schedules/{schedule_id}`](../../../../../../api-reference/bulk-sync/schedules/update).","tags":["subpackage_bulkSync.subpackage_bulkSync/schedules"],"parameters":[{"name":"sync_id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schedule_id","in":"path","description":"Unique identifier of the schedule.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Bulk Sync Schedule","description":"Updates an existing schedule on a bulk sync.\n\nUpdates replace the stored schedule. Send the full schedule definition\nrather than only the field you want to change. Schedule times are\ninterpreted in UTC.","tags":["subpackage_bulkSync.subpackage_bulkSync/schedules"],"parameters":[{"name":"sync_id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schedule_id","in":"path","description":"Unique identifier of the schedule to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Bulk Sync Schedule","description":"Removes a schedule from a bulk sync.\n\nDeleting a schedule only stops future automatic executions. It does not\ncancel an execution that is already running.","tags":["subpackage_bulkSync.subpackage_bulkSync/schedules"],"parameters":[{"name":"sync_id","in":"path","description":"Unique identifier of the bulk sync.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schedule_id","in":"path","description":"Unique identifier of the schedule to delete.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{connection_id}/query":{"post":{"operationId":"run-query","summary":"Run Query","description":"Submits a query for asynchronous execution against the connection.\n\nThis endpoint returns immediately with a query task ID. It does not wait for\nthe query to finish. Poll [`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) until `status`\nreaches `done` or `failed`.\n\nOnly the user who created the query can fetch its results later. Query results\nare stored temporarily and may expire; use the `expires` field from the result\nendpoint to understand how long they will remain available.","tags":["subpackage_queryRunner"],"parameters":[{"name":"connection_id","in":"path","description":"Unique identifier of the connection to run the query against.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"query","in":"query","description":"The query to execute against the connection.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunQueryEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunQueryRequest"}}}}}},"/api/queries/{id}":{"get":{"operationId":"get-query","summary":"Get Query Results","description":"Fetches the latest status for a submitted query and, once complete, returns fields and paginated results.\n\nThis endpoint is the second step of the query-runner flow. First call\n[`POST /api/connections/{connection_id}/query`](../../../api-reference/query-runner/run-query),\nthen poll this endpoint with the returned ID.\n\nResults may be paginated across multiple blobs. When that happens, use the\nopaque `links.next` and `links.previous` URLs exactly as returned. Do not try to\nconstruct the `page` token yourself.\n\nIf the query is still running, the response may include only status metadata.\nIf the task is complete but the caller is not the same user that created it,\nthe endpoint returns `404`.","tags":["subpackage_queryRunner"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the query task, as returned by POST /api/connections/{connection_id}/query.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","description":"Opaque pagination token returned in the links.next or links.previous URL of the previous response.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResultsEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{connection_id}/schemas/{schema_id}/fields":{"post":{"operationId":"upsert-field","summary":"Upsert Schema Fields","description":"Creates or updates user-defined fields on a schema, matched by field_id.\n\nFields are matched by `field_id`. Reusing an existing `field_id` updates that\nfield; using a new `field_id` creates a new user-defined field.\n\nThis makes the endpoint safe to retry when you are intentionally upserting the\nsame field definitions. It is not a patch-by-position operation.\n\nIf some fields succeed and others fail, the endpoint can return a partial\nsuccess response. Validate the response status and message rather than assuming\nthe whole batch was applied uniformly.","tags":["subpackage_schemas"],"parameters":[{"name":"connection_id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Identifier of the schema the fields belong to.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_UpsertField_Response_202"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertSchemaFieldRequest"}}}}}},"/api/connections/{connection_id}/schemas/{schema_id}/fields/{field_id}":{"delete":{"operationId":"delete-field","summary":"Delete Schema Field","description":"Removes a user-defined field from a schema.\n\nOnly user-defined fields — those created via\n[`POST /api/connections/{connection_id}/schemas/{schema_id}/fields`](../../../../../../../api-reference/schemas/upsert-field)\n— can be removed through this endpoint. Fields detected automatically from\nthe source cannot be deleted here; they are managed through schema refresh.\n\n> 🚧 Deleting a field that is referenced in an active sync mapping may cause\n> that sync to error on its next execution. Remove or update any dependent\n> mappings before deleting the field.","tags":["subpackage_schemas"],"parameters":[{"name":"connection_id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Identifier of the schema the field belongs to.","required":true,"schema":{"type":"string"}},{"name":"field_id","in":"path","description":"Identifier of the user-defined field to delete.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_DeleteField_Response_202"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"operationId":"patch-field","summary":"Patch Schema Field","description":"Edits a single field on a schema, creating an override for a detected field if needed.","tags":["subpackage_schemas"],"parameters":[{"name":"connection_id","in":"path","description":"Connection holding the schema.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Schema identifier.","required":true,"schema":{"type":"string"}},{"name":"field_id","in":"path","description":"Field identifier within the schema.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaFieldResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSchemaFieldRequest"}}}}}},"/api/connections/{connection_id}/schemas/{schema_id}/primary_keys":{"put":{"operationId":"set-primary-keys","summary":"Set Primary Keys","description":"Overrides the primary key detected on a schema.\n\nThis is a full replacement: the keys you supply become the complete override\nset, replacing any previously configured overrides. Omitting a key that was\npreviously set removes it.\n\nPrimary key overrides are useful when the source does not expose a primary\nkey or when the source-detected key is not the correct deduplication\nidentifier for your use case.\n\n> 📘 To revert to the source-detected primary keys and remove all overrides,\n> use [`DELETE /api/connections/{connection_id}/schemas/{schema_id}/primary_keys`](../../../../../../api-reference/schemas/reset-primary-keys).","tags":["subpackage_schemas"],"parameters":[{"name":"connection_id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Identifier of the schema whose primary keys are being overridden.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_SetPrimaryKeys_Response_202"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPrimaryKeysRequest"}}}}},"delete":{"operationId":"reset-primary-keys","summary":"Reset Primary Keys","description":"Deletes all primary key overrides for a schema, reverting to the primary keys detected from the source.\n\nTo replace the overrides with a new set rather than clearing them entirely,\nuse [`PUT /api/connections/{connection_id}/schemas/{schema_id}/primary_keys`](../../../../../../api-reference/schemas/set-primary-keys)\ninstead.","tags":["subpackage_schemas"],"parameters":[{"name":"connection_id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Identifier of the schema whose primary key override should be cleared.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_ResetPrimaryKeys_Response_202"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/schemas/refresh":{"post":{"operationId":"refresh","summary":"Refresh Connection Schema","description":"Refreshes a connection's cached schemas.\n\nCall this when the upstream source has added, removed, or changed tables,\nobjects, or fields and you need Polytomic to re-inspect the connection before\ncreating or updating sync configuration.\n\nThis endpoint does not return the refreshed schemas directly. Follow the\n`Location` header or poll [`GET /api/connections/{id}/schemas/status`](../../../../../api-reference/schemas/get-status)\nuntil the refresh completes, then fetch the schemas you need.\n\n> 📘 Schema refresh is asynchronous\n>\n> This endpoint kicks off a background refresh of the connection's cached\n> schemas and returns a `Location` header pointing at\n> [`GET /api/connections/{id}/schemas/status`](../../../../../api-reference/schemas/get-status).\n> Poll that endpoint until `cache_status` transitions from `refreshing` to\n> `fresh` (or until `last_refresh_finished` advances past\n> `last_refresh_started`) to observe completion.\n>\n> Only connections whose current health status is healthy may be refreshed.","tags":["subpackage_schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection whose schema cache should be refreshed.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_Refresh_Response_202"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/schemas/status":{"get":{"operationId":"get-status","summary":"Get Schema Status","description":"Returns the current schema inspection status for a connection.\n\nPoll this endpoint after calling\n[`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh) to track\nprogress. When `status` transitions to `completed`, the refreshed schemas\nare available for use in sync configuration.\n\n> 📘 Schema refresh is asynchronous\n>\n> This endpoint kicks off a background refresh of the connection's cached\n> schemas and returns a `Location` header pointing at\n> [`GET /api/connections/{id}/schemas/status`](../../../../../api-reference/schemas/get-status).\n> Poll that endpoint until `cache_status` transitions from `refreshing` to\n> `fresh` (or until `last_refresh_finished` advances past\n> `last_refresh_started`) to observe completion.\n>\n> Only connections whose current health status is healthy may be refreshed.","tags":["subpackage_schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection whose schema cache status should be returned.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncSourceStatusEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/schemas/{schema_id}":{"get":{"operationId":"get","summary":"Get Schema","description":"Returns a single schema on a connection.\n\nThe schema is returned from the connection's cached schema set. If the\nupstream source has changed since the last inspection, the result may be\nstale.\n\n> 📘 Trigger [`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh)\n> and wait for it to complete before fetching this endpoint if you need\n> up-to-date field definitions.","tags":["subpackage_schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Identifier of the schema within the connection. Format depends on the connection type (e.g. schema.table for databases, object name for SaaS backends).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSyncSourceSchemaEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/connections/{id}/schemas/{schema_id}/records":{"get":{"operationId":"get-records","summary":"Get Schema Records","description":"Returns a sample of records from a schema on a connection.\n\nThe sample is intended for previewing the shape and values of data before\ncommitting to a sync configuration, not for full data export.\n\n> 🚧 The sample is not guaranteed to be representative of the full dataset.\n> Row selection is implementation-defined and may differ across connection\n> types.\n\n> 📘 If the schema's field definitions are stale, refresh them first with\n> [`POST /api/connections/{id}/schemas/refresh`](../../../../../../api-reference/schemas/refresh) to ensure\n> the sample aligns with the current schema structure.","tags":["subpackage_schemas"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the connection.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"schema_id","in":"path","description":"Identifier of the schema within the connection.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaRecordsResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/events":{"get":{"operationId":"list","summary":"Get Events","description":"Lists audit events for the caller's organization.\n\nResults are paginated. If more events are available, the response includes\n`pagination.next_page_token`; pass that token back unchanged to continue from\nthe last item you received.\n\nFilter by event type using the `event_type` query parameter. Pass one of the\nidentifiers returned by [`GET /api/events_types`](../../api-reference/events/get-types) to\nnarrow results to a specific category of activity.\n\n> 📘 Events reflect audit activity scoped to the caller's organization.\n> The log captures both user-initiated and API-initiated actions.","tags":["subpackage_events"],"parameters":[{"name":"organization_id","in":"query","description":"Organization to list events for. Only used by system callers; normal and partner callers are always scoped to their own organization.","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","description":"Filter to a single event type. Use GET /api/events_types to list valid values.","required":false,"schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Return events created strictly after this timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"ending_before","in":"query","description":"Return events created strictly before this timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"Maximum number of events to return. Default 10, maximum 100.","required":false,"schema":{"type":"integer","default":10}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/events_types":{"get":{"operationId":"get-types","summary":"Get Event Types","description":"Returns the set of event type identifiers supported by GET /api/events.\n\nUse the identifiers returned here as the `event_type` filter value when calling\n[`GET /api/events`](../../api-reference/events/list).","tags":["subpackage_events"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventTypesEnvelope"}}}}}}},"/api/webhooks":{"get":{"operationId":"list","summary":"List Webhooks","description":"Lists the webhooks for the caller's organization.\n\n> 📘 One webhook per organization\n>\n> An organization can register a single webhook, which receives every event\n> produced in that organization. See the\n> [Events documentation](../../guides/events) for the\n> list of event types and payload shapes.","tags":["subpackage_webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Webhook","description":"Creates the organization's webhook.\n\n> 📘 One webhook per organization\n>\n> An organization can register a single webhook, which receives every event\n> produced in that organization. See the\n> [Events documentation](../../guides/events) for the\n> list of event types and payload shapes.","tags":["subpackage_webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhooksSchema"}}}}}},"/api/webhooks/{id}":{"get":{"operationId":"get","summary":"Get Webhook","description":"Returns a single webhook by ID.\n\n> 📘 One webhook per organization\n>\n> An organization can register a single webhook, which receives every event\n> produced in that organization. See the\n> [Events documentation](../../../guides/events) for the\n> list of event types and payload shapes.","tags":["subpackage_webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Webhook","description":"Updates an existing webhook.\n\n> 📘 One webhook per organization\n>\n> An organization can register a single webhook, which receives every event\n> produced in that organization. See the\n> [Events documentation](../../../guides/events) for the\n> list of event types and payload shapes.","tags":["subpackage_webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhooksSchema"}}}}},"delete":{"operationId":"delete","summary":"Delete Webhook","description":"Deletes a webhook.\n\n> 📘 One webhook per organization\n>\n> An organization can register a single webhook, which receives every event\n> produced in that organization. See the\n> [Events documentation](../../../guides/events) for the\n> list of event types and payload shapes.\n\nDeletion is permanent. To stop delivery without losing the webhook\nconfiguration, use\n[`POST /api/webhooks/{id}/disable`](../../../api-reference/webhooks/disable) instead.","tags":["subpackage_webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/webhooks/{id}/disable":{"post":{"operationId":"disable","summary":"Disable Webhook","description":"Disables a webhook without deleting it.\n\n> 📘 One webhook per organization\n>\n> An organization can register a single webhook, which receives every event\n> produced in that organization. See the\n> [Events documentation](../../../../guides/events) for the\n> list of event types and payload shapes.\n\nEvents are not queued while the webhook is disabled — any activity that occurs\nduring the disabled period is not delivered retroactively. To resume\ndelivery, re-enable the webhook using\n[`POST /api/webhooks/{id}/enable`](../../../../api-reference/webhooks/enable).","tags":["subpackage_webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/webhooks/{id}/enable":{"post":{"operationId":"enable","summary":"Enable Webhook","description":"Re-enables a previously disabled webhook.\n\n> 📘 One webhook per organization\n>\n> An organization can register a single webhook, which receives every event\n> produced in that organization. See the\n> [Events documentation](../../../../guides/events) for the\n> list of event types and payload shapes.\n\nDelivery resumes from the next event generated after this call. Events that\noccurred while the webhook was disabled are not replayed.","tags":["subpackage_webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/jobs/{type}/{id}":{"get":{"operationId":"get","summary":"Get Job","description":"Returns the current state of an asynchronous job.\n\nThis endpoint is used as a polling target by other asynchronous workflows such\nas model preview and log export. The caller must know the job `type` and `id`\nthat were returned when the job was created.\n\nIf the job is still running, the response returns `status: running` and may not\ninclude a `result` yet. Once complete, `status` becomes `done` or `failed`.\n\nOnly specific job types are supported by this endpoint. Passing an unknown\n`type` returns `400`.","tags":["subpackage_jobs"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the job (usually returned by whichever endpoint started the job).","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"path","description":"Job type. One of: createmodel, updatemodel, previewmodel, samplemodel, exportlogs.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/me":{"get":{"operationId":"get","summary":"Get Identity","description":"Returns information about the authenticated caller and, if applicable, the organization they are scoped to.\n\nUse this endpoint to confirm which kind of credential is being used before\ncalling endpoints with stricter authorization rules.\n\nFor user-scoped credentials, the response includes the resolved user and\norganization details. For non-user keys, the response identifies the key class\nwith the corresponding boolean flags instead of impersonating a user.\n\nThis endpoint is especially useful when debugging why a request is being\naccepted or rejected by endpoints that are limited to particular caller types.","tags":["subpackage_identity"],"parameters":[{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIdentityResponseEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/organization":{"get":{"operationId":"get-current","summary":"Get Current Organization","description":"Returns the organization the caller is authenticated against.\n\nThis endpoint is the safest way to discover the effective organization for a\nuser-scoped or organization-scoped credential. It does not let callers inspect\narbitrary organizations; it only returns the organization implied by the\ncredential that authenticated the request.\n\nIf you need to enumerate or look up organizations across a partner account, use\n[`GET /api/organizations`](../../api-reference/organization/list) or\n[`GET /api/organizations/{id}`](../../api-reference/organization/get) instead.","tags":["subpackage_organization"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/organizations":{"get":{"operationId":"list","summary":"Get Organizations","description":"Lists every organization accessible to the calling partner, with the partner's owner organization first.\n\nIn `2025-09-18`, this endpoint is partner-scoped rather than a general\n\"current caller visibility\" listing. The partner owner organization is returned\nfirst, followed by child organizations.\n\nThis ordering matters for partner workflows such as shared connections, where\nthe parent connection must live in the partner owner organization.\n\nIf you need only the organization implied by the current credential, use\n[`GET /api/organization`](../../api-reference/organization/get-current) instead.","tags":["subpackage_organization"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationsEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Organization","description":"Creates a new organization under the calling partner account, optionally configuring SSO or OIDC at creation time.\n\n> 🚧 Requires partner key\n>\n> This endpoint is only accessible using [partner keys](../../guides/obtaining-api-keys#partner-keys).\n\nSSO and OIDC settings supplied at creation time can be updated later via\n`PUT /api/organizations/{id}`.","tags":["subpackage_organization"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationRequestSchema"}}}}}},"/api/organizations/{id}":{"get":{"operationId":"get","summary":"Get Organization","description":"Returns a single organization by ID.\n\n> 📘 Credential scope varies by endpoint and API version\n>\n> Organization endpoints do not all share the same credential requirements.\n> Check each endpoint's description for the caller scope that applies in that\n> API version.","tags":["subpackage_organization"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the organization.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Organization","description":"Updates an organization's name and SSO or OIDC configuration.\n\n> 🚧 Requires partner key\n>\n> This endpoint is only accessible using [partner keys](../../../guides/obtaining-api-keys#partner-keys).\n\n> 📘 SSO and OIDC configuration is replaced in full on each update. Include all\n> desired settings in the request body, not just the fields you want to change.","tags":["subpackage_organization"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the organization to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationRequestSchema"}}}}},"delete":{"operationId":"delete","summary":"Delete Organization","description":"Deletes an organization.\n\nPartner callers cannot delete their own owner organization.","tags":["subpackage_organization"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the organization.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/organization/users":{"get":{"operationId":"list-current-org-users","summary":"List Current Org Users","description":"Lists every user in the caller's current organization.\n\nReturns user records including each user's ID, email, and assigned roles.","tags":["subpackage_users"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-current-org-user","summary":"Create Current Org User","description":"Creates a new user in the caller's current organization and assigns the requested permissions roles.\n\nThe new user receives an invitation email prompting them to set up their\naccount. Role assignments take effect as soon as the invitation is accepted.","tags":["subpackage_users"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentOrgCreateUserRequestSchema"}}}}}},"/api/organization/users/{id}":{"get":{"operationId":"get-current-org-user","summary":"Get Current Org User","description":"Returns a single user from the caller's current organization.","tags":["subpackage_users"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the user.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-current-org-user","summary":"Update Current Org User","description":"Updates the permissions roles assigned to a user in the caller's current organization.\n\nOnly the user's role assignments are modified. Profile information such as name\nand email address is not affected by this endpoint.","tags":["subpackage_users"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the user to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentOrgUpdateUserRequestSchema"}}}}},"delete":{"operationId":"delete-current-org-user","summary":"Delete Current Org User","description":"Deletes a user from the caller's current organization.\n\n> 🚧 This action is permanent. The user is immediately removed from the\n> organization and loses access to all resources within it. This cannot be\n> undone.","tags":["subpackage_users"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the user.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/organizations/{org_id}/users":{"get":{"operationId":"list","summary":"List Partner Users","description":"Lists all users in the specified organization.\n\n> 🚧 Requires partner key\n>\n> User endpoints are only accessible using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).\n\nReturns user records including each user's ID, email, and assigned roles.","tags":["subpackage_users"],"parameters":[{"name":"org_id","in":"path","description":"Unique identifier of the organization whose users should be listed.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Partner User","description":"Creates a new user in the specified organization and assigns the requested permissions roles.\n\n> 🚧 Requires partner key\n>\n> User endpoints are only accessible using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).\n\nThe new user receives an invitation email prompting them to set up their\naccount. Role assignments take effect as soon as the invitation is accepted.","tags":["subpackage_users"],"parameters":[{"name":"org_id","in":"path","description":"Unique identifier of the organization the user belongs to.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequestSchema"}}}}}},"/api/organizations/{org_id}/users/{id}":{"get":{"operationId":"get","summary":"Get Partner User","description":"Returns a single user in the specified organization.\n\n> 🚧 Requires partner key\n>\n> User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).","tags":["subpackage_users"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the user.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","description":"Unique identifier of the organization the user belongs to.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Partner User","description":"Updates a user's assigned permissions roles.\n\n> 🚧 Requires partner key\n>\n> User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).\n\nOnly the user's role assignments are modified. Profile information such as name\nand email address is not affected by this endpoint.","tags":["subpackage_users"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the user to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","description":"Unique identifier of the organization the user belongs to.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestSchema"}}}}},"delete":{"operationId":"delete","summary":"Delete Partner User","description":"Deletes a user from the specified organization.\n\n> 🚧 Requires partner key\n>\n> User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).\n\n> 🚧 This action is permanent. The user is immediately removed from the\n> organization and loses access to all resources within it. This cannot be\n> undone.","tags":["subpackage_users"],"parameters":[{"name":"id","in":"path","description":"Unique identifier of the user.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"org_id","in":"path","description":"Unique identifier of the organization the user belongs to.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/organizations/{org_id}/users/{id}/keys":{"post":{"operationId":"create-api-key","summary":"Create Partner User API Key","description":"Issues a new API key for the specified user.\n\n> 🚧 The API key value is only included in the response at creation time and\n> cannot be retrieved again. Store it securely immediately after creation.","tags":["subpackage_users"],"parameters":[{"name":"org_id","in":"path","description":"Unique identifier of the organization the user belongs to.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","description":"Unique identifier of the user the key will be issued for.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"force","in":"query","description":"If true, revoke any existing API key for the user before creating a new one.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/permissions/policies":{"get":{"operationId":"list","summary":"List Policies","description":"Lists all policies in the caller's organization.\n\nEach policy binds one or more roles to a set of resources, controlling what\nactions members with those roles can perform on those resources.\n\nTo inspect a specific policy in detail, use\n[`GET /api/permissions/policies/{id}`](../../../api-reference/permissions/policies/get).","tags":["subpackage_permissions.subpackage_permissions/policies"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPoliciesResponseEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Policy","description":"Creates a new policy.\n\nA policy binds one or more roles to a set of resources, granting members who\nhold those roles the actions defined by them. Roles must already exist before\nthey are referenced in a policy; create roles using\n[`POST /api/permissions/roles`](../../../api-reference/permissions/roles/create).","tags":["subpackage_permissions.subpackage_permissions/policies"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicyRequest"}}}}}},"/api/permissions/policies/{id}":{"get":{"operationId":"get","summary":"Get Policy","description":"Returns a single policy by ID, including all action/role bindings it defines.\n\nReturns the full set of action/role bindings defined by the policy, including\nthe resources it applies to.","tags":["subpackage_permissions.subpackage_permissions/policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Policy","description":"Updates an existing policy.\n\nThe update is a **full replacement** of the policy's bindings. Any role or\nresource binding not included in the request body is removed. To make a\npartial change, fetch the current policy with\n[`GET /api/permissions/policies/{id}`](../../../../api-reference/permissions/policies/get), modify the relevant bindings,\nand send the complete object back.","tags":["subpackage_permissions.subpackage_permissions/policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolicyRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Policy","description":"Deletes a policy.\n\nDeletion is permanent. Any access that was granted solely through this policy\nis revoked immediately for all users who depended on it.","tags":["subpackage_permissions.subpackage_permissions/policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/permissions/roles":{"get":{"operationId":"list","summary":"List Roles","description":"Lists all permissions roles available in the caller's organization, including built-in system roles.\n\nSystem roles such as Admin and Member are always present in every organization\nand cannot be modified or deleted. Custom roles appear alongside them and can\nbe created, updated, or removed as needed.\n\nTo inspect or modify a specific role, use\n[`GET /api/permissions/roles/{id}`](../../../api-reference/permissions/roles/get).","tags":["subpackage_permissions.subpackage_permissions/roles"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleListResponseEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create","summary":"Create Role","description":"Creates a new permissions role.\n\nProvide a `name` for the new role. The role is immediately available for use\nin permission policies.\n\nTo attach the role to resources, create or update a policy using\n[`POST /api/permissions/policies`](../../../api-reference/permissions/policies/create).","tags":["subpackage_permissions.subpackage_permissions/roles"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleRequest"}}}}}},"/api/permissions/roles/{id}":{"get":{"operationId":"get","summary":"Get Role","description":"Returns a single permissions role by ID.\n\nReturns the role's name, action set, and whether it is a built-in system role.","tags":["subpackage_permissions.subpackage_permissions/roles"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponseEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update","summary":"Update Role","description":"Updates an existing permissions role's name and action set.\n\nThe update is a **full replacement** of the role definition.\n\n> 🚧 Built-in system roles (such as Admin and Member) cannot be updated.\n> Attempting to modify a system role returns an error.","tags":["subpackage_permissions.subpackage_permissions/roles"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponseEnvelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Role","description":"Deletes a permissions role.\n\n> 🚧 Built-in system roles (such as Admin and Member) cannot be deleted.\n> Attempting to delete a system role returns an error.\n\nDeleting a role does not automatically remove it from any policies that\nreference it. Update those policies separately using\n[`PUT /api/permissions/policies/{id}`](../../../../api-reference/permissions/policies/update) to avoid\nleaving stale role references.","tags":["subpackage_permissions.subpackage_permissions/roles"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/entities/{id}":{"get":{"operationId":"get","summary":"Get Entity","description":"Returns a resolved entity by ID.\n\nLooks up a UUID within the caller's current organization and returns the\nresource type plus enough context to fetch the canonical resource.\n\nThis endpoint is useful when you have an execution, sync, model, connection,\norganization, or user UUID and need to determine what it refers to.\n\nThe response always includes:\n\n- `id`: the UUID that was resolved.\n- `type`: the resolved entity type.\n- `canonical_path`: the canonical REST path for the resolved resource.\n\nThe response may also include:\n\n- `relationships`: parent resources needed to address nested resources.\n- `context`: lightweight additional context, such as bulk sync `schema_ids`.\n\nFor the normal user-scoped endpoint, `organization_id` is omitted from the\nresponse.\n\nSupported `type` values currently include:\n\n- `organization`\n- `user`\n- `connection`\n- `model`\n- `sync`\n- `sync_execution`\n- `bulk_sync`\n- `bulk_sync_execution`\n\nExamples:\n\n- A model sync execution resolves to a `sync_execution` and includes a `sync`\n relationship.\n- A bulk sync execution resolves to a `bulk_sync_execution`, includes a\n `bulk_sync` relationship, and may include `context.schema_ids`.\n\nIf the UUID does not exist, or exists outside the caller's scoped\norganization, the endpoint returns `404`.","tags":["subpackage_entities"],"parameters":[{"name":"id","in":"path","description":"UUID of the entity to resolve.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityResponseEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/organizations/entities/{id}":{"get":{"operationId":"get-for-partner","summary":"Get Partner Entity","description":"Returns a resolved entity by ID within a partner organization scope.\n\nLooks up a UUID across organizations using partner authentication and returns\nthe resource type plus enough context to fetch the canonical resource.\n\nThis endpoint is intended for cross-organization partner workflows where the\ncaller has an arbitrary UUID and needs to discover both the resource type and\nthe organization it belongs to.\n\nThe response always includes:\n\n- `id`: the UUID that was resolved.\n- `type`: the resolved entity type.\n- `canonical_path`: the canonical REST path for the resolved resource.\n- `organization_id`: the organization that owns the resolved resource.\n\nThe response may also include:\n\n- `relationships`: parent resources needed to address nested resources.\n- `context`: lightweight additional context, such as bulk sync `schema_ids`.\n\nSupported `type` values currently include:\n\n- `organization`\n- `user`\n- `connection`\n- `model`\n- `sync`\n- `sync_execution`\n- `bulk_sync`\n- `bulk_sync_execution`\n\nExamples:\n\n- A model sync execution resolves to a `sync_execution` and includes a `sync`\n relationship.\n- A bulk sync execution resolves to a `bulk_sync_execution`, includes a\n `bulk_sync` relationship, and may include `context.schema_ids`.\n\nIf the UUID does not exist, the endpoint returns `404`.","tags":["subpackage_entities"],"parameters":[{"name":"id","in":"path","description":"UUID of the entity to resolve.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","description":"Bearer partner API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityResponseEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/notifications/global-error-subscribers":{"get":{"operationId":"get-global-error-subscribers","summary":"Get Global Error Subscribers","description":"Returns the list of email addresses subscribed to global sync error notifications for the caller's organization.\n\nTo update the subscriber list, use\n[`PUT /api/notifications/global-error-subscribers`](../../../api-reference/notifications/set-global-error-subscribers).","tags":["subpackage_notifications"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalErrorSubscribersResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"set-global-error-subscribers","summary":"Update Global Error Subscribers","description":"Replaces the list of email addresses subscribed to global sync error notifications for the caller's organization.\n\nThis is a **full replacement** — the request body becomes the complete\nsubscriber list. To add or remove a single address without affecting others,\nfetch the current list with\n[`GET /api/notifications/global-error-subscribers`](../../../api-reference/notifications/get-global-error-subscribers), apply your change,\nand send the modified list back.","tags":["subpackage_notifications"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer user API key","required":true,"schema":{"type":"string"}},{"name":"X-Polytomic-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalErrorSubscribersResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalErrorSubscribersRequest"}}}}}}},"servers":[{"url":"https://app.polytomic.com"}],"components":{"schemas":{"BackendConnectionCapabilities":{"type":"object","properties":{"destination":{"type":"boolean"},"enrichment":{"type":"boolean"},"orchestration":{"type":"boolean"},"source":{"type":"boolean"}},"required":["destination","enrichment","orchestration","source"],"title":"BackendConnectionCapabilities"},"ConnectionForm":{"type":"object","properties":{"jsonschema":{"description":"Any type"},"uischema":{"description":"Any type"}},"title":"ConnectionForm"},"BackendOAuthPrompt":{"type":"object","properties":{"key":{"type":["string","null"]},"value":{"type":["string","null"]},"when":{"type":"string"}},"title":"BackendOAuthPrompt"},"ConnectionType":{"type":"object","properties":{"capabilities":{"$ref":"#/components/schemas/BackendConnectionCapabilities"},"configurationForm":{"$ref":"#/components/schemas/ConnectionForm"},"envConfig":{"type":"object","additionalProperties":{"description":"Any type"}},"id":{"type":"string"},"initialConfiguration":{"type":"object","additionalProperties":{"description":"Any type"}},"logo_url":{"type":"string"},"name":{"type":"string"},"oauth_prompt":{"$ref":"#/components/schemas/BackendOAuthPrompt"},"use_oauth":{"type":"boolean"}},"required":["capabilities"],"title":"ConnectionType"},"ConnectionTypeResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ConnectionType"}}},"title":"ConnectionTypeResponseEnvelope"},"ApiError":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"description":"Any type"}},"status":{"type":"integer"}},"title":"ApiError"},"JsonschemaDefinitions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonschemaSchema"},"title":"JsonschemaDefinitions"},"OrderedMapStringGithubComInvopopJsonschemaSchema":{"type":"object","properties":{},"title":"OrderedMapStringGithubComInvopopJsonschemaSchema"},"JsonschemaSchema":{"type":"object","properties":{"$anchor":{"type":"string"},"$comment":{"type":"string"},"$defs":{"$ref":"#/components/schemas/JsonschemaDefinitions"},"$dynamicRef":{"type":"string"},"$id":{"type":"string"},"$ref":{"type":"string"},"$schema":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/JsonschemaSchema"},"allOf":{"type":"array","items":{"$ref":"#/components/schemas/JsonschemaSchema"}},"anyOf":{"type":"array","items":{"$ref":"#/components/schemas/JsonschemaSchema"}},"const":{"description":"Any type"},"contains":{"$ref":"#/components/schemas/JsonschemaSchema"},"contentEncoding":{"type":"string"},"contentMediaType":{"type":"string"},"contentSchema":{"$ref":"#/components/schemas/JsonschemaSchema"},"default":{"description":"Any type"},"dependentRequired":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"dependentSchemas":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonschemaSchema"}},"deprecated":{"type":"boolean"},"description":{"type":"string"},"else":{"$ref":"#/components/schemas/JsonschemaSchema"},"enum":{"type":"array","items":{"description":"Any type"}},"examples":{"type":"array","items":{"description":"Any type"}},"exclusiveMaximum":{"type":"string"},"exclusiveMinimum":{"type":"string"},"format":{"type":"string"},"if":{"$ref":"#/components/schemas/JsonschemaSchema"},"items":{"$ref":"#/components/schemas/JsonschemaSchema"},"maxContains":{"type":["integer","null"]},"maxItems":{"type":["integer","null"]},"maxLength":{"type":["integer","null"]},"maxProperties":{"type":["integer","null"]},"maximum":{"type":"string"},"minContains":{"type":["integer","null"]},"minItems":{"type":["integer","null"]},"minLength":{"type":["integer","null"]},"minProperties":{"type":["integer","null"]},"minimum":{"type":"string"},"multipleOf":{"type":"string"},"not":{"$ref":"#/components/schemas/JsonschemaSchema"},"oneOf":{"type":"array","items":{"$ref":"#/components/schemas/JsonschemaSchema"}},"pattern":{"type":"string"},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonschemaSchema"}},"prefixItems":{"type":"array","items":{"$ref":"#/components/schemas/JsonschemaSchema"}},"properties":{"$ref":"#/components/schemas/OrderedMapStringGithubComInvopopJsonschemaSchema"},"propertyNames":{"$ref":"#/components/schemas/JsonschemaSchema"},"readOnly":{"type":"boolean"},"required":{"type":"array","items":{"type":"string"}},"then":{"$ref":"#/components/schemas/JsonschemaSchema"},"title":{"type":"string"},"type":{"type":"string"},"uniqueItems":{"type":"boolean"},"writeOnly":{"type":"boolean"}},"title":"JsonschemaSchema"},"GetConnectionTypeParameterValuesRequestSchema":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"},"field":{"type":"string"},"parameters":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"query":{"type":"string"}},"required":["field","parameters"],"title":"GetConnectionTypeParameterValuesRequestSchema"},"ConnectionParameterValue":{"type":"object","properties":{"label":{"type":["string","null"]},"value":{"description":"Any type"}},"title":"ConnectionParameterValue"},"ConnectionParameterValuesResp":{"type":"object","properties":{"allows_creation":{"type":"boolean"},"values":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ConnectionParameterValue"}}},"title":"ConnectionParameterValuesResp"},"ConnectionParameterValuesResponseEnvelope":{"type":"object","properties":{"data":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ConnectionParameterValuesResp"}}},"title":"ConnectionParameterValuesResponseEnvelope"},"OutputActor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string"}},"title":"OutputActor"},"ConnectionTypeSchema":{"type":"object","properties":{"id":{"type":"string"},"logo_url":{"type":"string"},"name":{"type":"string"},"operations":{"type":["array","null"],"items":{"type":"string"}}},"title":"ConnectionTypeSchema"},"ConnectionResponseSchema":{"type":"object","properties":{"api_calls_last_24_hours":{"type":["integer","null"],"description":"API calls made to service in the last 24h (supported integrations only)."},"configuration":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/OutputActor"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"organization_id":{"type":"string","format":"uuid"},"parent_connection_id":{"type":"string","format":"uuid","description":"For shared connections, the ID of the parent connection."},"policies":{"type":"array","items":{"type":"string","format":"uuid"}},"saved":{"type":"boolean"},"status":{"type":"string"},"status_error":{"type":"string"},"type":{"$ref":"#/components/schemas/ConnectionTypeSchema"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/OutputActor"}},"title":"ConnectionResponseSchema"},"ConnectionListResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ConnectionResponseSchema"}}},"title":"ConnectionListResponseEnvelope"},"CreateConnectionRequestSchema":{"type":"object","properties":{"configuration":{"type":"object","additionalProperties":{"description":"Any type"}},"healthcheck_interval":{"type":"string","description":"Override interval for connection health checking."},"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"redirect_url":{"type":"string","description":"URL to redirect to after completing OAuth flow."},"type":{"type":"string"},"validate":{"type":"boolean","default":true,"description":"Validate connection configuration."}},"required":["configuration","name","type"],"title":"CreateConnectionRequestSchema"},"CreateConnectionResponseSchema":{"type":"object","properties":{"auth_code":{"type":"string","description":"Code to enter in order to complete connection authentication."},"auth_url":{"type":"string","description":"URL to visit to complete connection authentication."},"configuration":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"healthcheck_interval":{"type":"string","description":"Interval for connection health checking."},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"organization_id":{"type":"string","format":"uuid"},"policies":{"type":"array","items":{"type":"string","format":"uuid"}},"saved":{"type":"boolean"},"status":{"type":"string"},"status_error":{"type":"string"},"type":{"$ref":"#/components/schemas/ConnectionTypeSchema"}},"title":"CreateConnectionResponseSchema"},"CreateConnectionResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreateConnectionResponseSchema"}},"title":"CreateConnectionResponseEnvelope"},"ConnectCardRequest":{"type":"object","properties":{"connection":{"type":"string","format":"uuid","description":"The id of an existing connection to update."},"dark":{"type":"boolean","description":"Whether to use the dark theme for the Connect modal."},"name":{"type":"string","description":"Name of the new connection. Must be unique per organization."},"organization_id":{"type":["string","null"],"format":"uuid"},"redirect_url":{"type":"string","description":"URL to redirect to after connection is created."},"type":{"type":"string","description":"Connection type to create."},"whitelist":{"type":["array","null"],"items":{"type":"string"},"description":"List of connection types which are allowed to be created. Ignored if type is set."}},"required":["name","redirect_url"],"title":"ConnectCardRequest"},"ConnectCardResponse":{"type":"object","properties":{"redirect_url":{"type":"string","description":"URL to redirect the user to in order to create the new connection."},"token":{"type":"string","description":"Opaque single-use token identifying the Connect session."}},"title":"ConnectCardResponse"},"ConnectCardResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConnectCardResponse"}},"title":"ConnectCardResponseEnvelope"},"TestConnectionRequest":{"type":"object","properties":{"configuration":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Connection configuration to test."},"connection_id":{"type":"string","format":"uuid","description":"Optional existing connection ID to use as a base for testing. The provided configuration will be merged over the stored configuration for this connection before testing."},"type":{"type":"string","description":"The type of connection to test."}},"required":["configuration","type"],"title":"TestConnectionRequest"},"ConnectionResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConnectionResponseSchema"}},"title":"ConnectionResponseEnvelope"},"UpdateConnectionRequestSchema":{"type":"object","properties":{"configuration":{"type":"object","additionalProperties":{"description":"Any type"}},"healthcheck_interval":{"type":"string","description":"Override interval for connection health checking."},"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"reconnect":{"type":"boolean"},"type":{"type":"string"},"validate":{"type":"boolean","default":true,"description":"Validate connection configuration."}},"required":["configuration","name"],"title":"UpdateConnectionRequestSchema"},"ConnectionProxyCall":{"type":"object","properties":{"body":{"description":"Request body. May be a string, a JSON object, or null."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional request headers to send upstream. Headers listed in the connection's blockedRequestHeaders are rejected, and inherited auth headers cannot be overridden."},"method":{"type":"string","description":"HTTP method. Must be one of GET, POST, PUT, PATCH, DELETE."},"path":{"type":"string","description":"Relative upstream path. Query strings must be passed in request.query or request.rawQuery."},"query":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Structured query parameters. Keys and values are URL-encoded before forwarding. Mutually exclusive with rawQuery."},"rawQuery":{"type":"string","description":"Exact query string fragment appended as-is after inherited query parameters. Do not include a leading '?'. Caller is responsible for encoding and syntax. Mutually exclusive with query."}},"required":["method","path"],"title":"ConnectionProxyCall"},"ExecuteConnectionProxyRequest":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/ConnectionProxyCall"}},"required":["request"],"title":"ExecuteConnectionProxyRequest"},"ConnectionProxyResponse":{"type":"object","properties":{"body":{"type":"string","description":"Upstream response body. If the upstream returned JSON, the body is returned as-is; otherwise it is returned as a string."},"contentType":{"type":"string","description":"Content-Type of the upstream response."},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Response headers returned by the upstream service. Headers listed in blockedResponseHeaders are removed."},"latencyMs":{"type":"integer","format":"int64","description":"End-to-end latency of the proxied request in milliseconds."},"proxyCallId":{"type":"string","format":"uuid","description":"Identifier for this proxy call, suitable for correlating with audit logs."},"status":{"type":"integer","description":"HTTP status code returned by the upstream service."},"truncated":{"type":"boolean","description":"True if the response body was truncated because it exceeded maxResponseBodyBytes."}},"title":"ConnectionProxyResponse"},"ExecuteConnectionProxyEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConnectionProxyResponse"}},"title":"ExecuteConnectionProxyEnvelope"},"ConnectionProxyLockedHeader":{"type":"object","properties":{"name":{"type":"string","description":"Header name."},"redacted":{"type":"boolean","description":"True when the header value was redacted before returning it."},"value":{"type":"string","description":"Header value. Replaced with [REDACTED] if the header is sensitive."}},"title":"ConnectionProxyLockedHeader"},"ConnectionProxyInheritedBase":{"type":"object","properties":{"baseUrl":{"type":"string","description":"Base URL all proxied requests are sent to. Caller-supplied paths are appended to this URL."},"lockedHeaders":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ConnectionProxyLockedHeader"},"description":"Headers that are always attached to proxied requests. Sensitive values are redacted."},"lockedQuery":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Query parameters that are always attached to proxied requests. Values are redacted."}},"title":"ConnectionProxyInheritedBase"},"ConnectionProxyMergeRules":{"type":"object","properties":{"headers":{"type":"string","description":"How caller-supplied headers are merged with the connection's inherited headers."},"query":{"type":"string","description":"How caller-supplied query parameters are merged with the connection's inherited query parameters."}},"title":"ConnectionProxyMergeRules"},"ConnectionProxyContract":{"type":"object","properties":{"allowedMethods":{"type":["array","null"],"items":{"type":"string"},"description":"HTTP methods the proxy accepts."},"blockedRequestHeaders":{"type":["array","null"],"items":{"type":"string"},"description":"Headers the proxy strips from caller-supplied requests before forwarding."},"blockedResponseHeaders":{"type":["array","null"],"items":{"type":"string"},"description":"Headers the proxy strips from upstream responses before returning them."},"bodyTypes":{"type":["array","null"],"items":{"type":"string"},"description":"Supported JSON types for request.body (e.g. object, string, null)."},"maxRequestBodyBytes":{"type":"integer","description":"Maximum accepted request body size in bytes."},"maxResponseBodyBytes":{"type":"integer","description":"Maximum response body size in bytes. Larger responses are truncated."},"pathRule":{"type":"string","description":"Rule the caller-supplied path must satisfy."},"queryModes":{"type":["array","null"],"items":{"type":"string"},"description":"Supported request query inputs. Use query for structured URL-encoded parameters or rawQuery for exact passthrough."},"queryValueTypes":{"type":["array","null"],"items":{"type":"string"},"description":"Supported value types for request.query."},"rateLimitPerMinute":{"type":"integer","description":"Maximum proxied requests per minute per connection before the proxy returns 429."},"rawQueryRule":{"type":"string","description":"How request.rawQuery is appended and who is responsible for encoding."},"timeoutMs":{"type":"integer","description":"Per-request timeout in milliseconds."}},"title":"ConnectionProxyContract"},"ConnectionProxyStats":{"type":"object","properties":{"callsLast24h":{"type":"integer","description":"Total backend API calls made through this connection (including non-proxy calls) over the last 24 hours."},"lastProxyCallAt":{"type":["string","null"],"format":"date-time","description":"Timestamp of the most recent proxy call, or null if none have occurred."},"proxy2xxLast24h":{"type":"integer","description":"Proxy calls that returned a 2xx status in the last 24 hours."},"proxy4xxLast24h":{"type":"integer","description":"Proxy calls that returned a 4xx status in the last 24 hours."},"proxy5xxLast24h":{"type":"integer","description":"Proxy calls that returned a 5xx status in the last 24 hours."},"proxyCallsLast24h":{"type":"integer","description":"Proxy calls made in the last 24 hours."}},"title":"ConnectionProxyStats"},"ConnectionProxyInfoResponse":{"type":"object","properties":{"backendType":{"type":"string","description":"Connection backend identifier (e.g. hubspot, salesforce)."},"connectionId":{"type":"string","format":"uuid","description":"Unique identifier of the connection the proxy contract applies to."},"inheritedBase":{"$ref":"#/components/schemas/ConnectionProxyInheritedBase"},"mergeRules":{"$ref":"#/components/schemas/ConnectionProxyMergeRules"},"requestContract":{"$ref":"#/components/schemas/ConnectionProxyContract"},"stats":{"$ref":"#/components/schemas/ConnectionProxyStats"}},"title":"ConnectionProxyInfoResponse"},"GetConnectionProxyInfoEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConnectionProxyInfoResponse"}},"title":"GetConnectionProxyInfoEnvelope"},"PartnerCreateSharedConnectionRequestSchema":{"type":"object","properties":{"child_organization_id":{"type":"string","format":"uuid","description":"Unique identifier of the child organization that should receive the shared connection."},"name":{"type":"string","description":"Optional name for the shared copy. Defaults to the parent connection name."}},"required":["child_organization_id"],"title":"PartnerCreateSharedConnectionRequestSchema"},"CreateSharedConnectionResponseSchema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"title":"CreateSharedConnectionResponseSchema"},"CreateSharedConnectionResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreateSharedConnectionResponseSchema"}},"title":"CreateSharedConnectionResponseEnvelope"},"ConfigurationValue":{"type":"object","properties":{"items":{"type":"array","items":{"description":"Any type"}},"type":{"type":"string"}},"title":"ConfigurationValue"},"SourceMeta":{"type":"object","properties":{"has_items":{"type":"boolean","description":"True when items is non-empty. Callers should present the values as a picker."},"items":{"type":["array","null"],"items":{"description":"Any type"},"description":"Valid values the caller may choose for this configuration item."},"requires_one_of":{"type":["array","null"],"items":{"type":"string"},"description":"Other configuration items this item depends on; exactly one of the listed items must also be selected."}},"title":"SourceMeta"},"SyncSourceMetaResponse":{"type":"object","properties":{"configuration":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ConfigurationValue"},"description":"Additional configuration fields available for this source, keyed by field name."},"items":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/SourceMeta"},"description":"Map of configuration item name to its metadata (available values, required-one-of groups)."},"requires_one_of":{"type":["array","null"],"items":{"type":"string"},"description":"Configuration items where exactly one must be selected by the caller."}},"title":"SyncSourceMetaResponse"},"GetSyncSourceMetaEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SyncSourceMetaResponse"}},"title":"GetSyncSourceMetaEnvelope"},"EnricherConfiguration":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Similar to a model configuration, this configures the enricher. For example, if you wanted to use Apollo to enrich people, you would send `{\"object\": \"people\"}` as the configuration. Each enricher configuration can be found in the connection configuration docs.","title":"EnricherConfiguration"},"EnrichmentInputFieldsRequest":{"type":"object","properties":{"configuration":{"$ref":"#/components/schemas/EnricherConfiguration"}},"title":"EnrichmentInputFieldsRequest"},"GetEnrichmentInputFieldsResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}}},"title":"GetEnrichmentInputFieldsResponseEnvelope"},"ModelModelFieldRequest":{"type":"object","properties":{"example":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["label","name","type"],"title":"ModelModelFieldRequest"},"ModelField":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/OutputActor"},"description":{"type":"string"},"example":{"description":"Any type"},"id":{"type":"string","format":"uuid"},"label":{"type":"string"},"name":{"type":"string"},"remote_type":{"type":"string"},"type":{"type":"string"},"unique":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"},"user_added":{"type":"boolean"}},"title":"ModelField"},"EnricherMapping":{"type":"object","additionalProperties":{"type":"string"},"description":"A map of parent model Source Name to child model Source Name. For example, if your model has a field called `work_email` and the enricher accepts a field called `email`, you'd send a map of `{\"work_email\":\"email\"}`. The set of required input mappings varies based on the configuration of the enrichment. You can use the `enrichment/{connection_id}/inputfields` API to discover available input field combinations for a given configuration.","title":"EnricherMapping"},"Enrichment":{"type":"object","properties":{"configuration":{"$ref":"#/components/schemas/EnricherConfiguration"},"connection_id":{"type":"string","format":"uuid"},"enricher_id":{"type":"string","format":"uuid","description":"Must be provided to update an existing enrichment"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ModelField"},"description":"If not provided, all fields will be enabled."},"mappings":{"$ref":"#/components/schemas/EnricherMapping"}},"title":"Enrichment"},"ModelRelationTo":{"type":"object","properties":{"field":{"type":"string"},"model_id":{"type":"string","format":"uuid"}},"title":"ModelRelationTo"},"ModelRelation":{"type":"object","properties":{"from":{"type":"string"},"to":{"$ref":"#/components/schemas/ModelRelationTo"}},"title":"ModelRelation"},"CreateModelRequest":{"type":"object","properties":{"additional_fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ModelModelFieldRequest"}},"configuration":{"type":"object","additionalProperties":{"description":"Any type"}},"connection_id":{"type":"string","format":"uuid"},"enricher":{"$ref":"#/components/schemas/Enrichment"},"fields":{"type":["array","null"],"items":{"type":"string"}},"identifier":{"type":"string"},"labels":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"relations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ModelRelation"}},"tracking_columns":{"type":["array","null"],"items":{"type":"string"}}},"required":["configuration","connection_id","name"],"title":"CreateModelRequest"},"LabelLabel":{"type":"object","properties":{},"title":"LabelLabel"},"RelationTo":{"type":"object","properties":{"field":{"type":"string"},"model_id":{"type":"string","format":"uuid"}},"title":"RelationTo"},"Relation":{"type":"object","properties":{"from":{"type":"string"},"to":{"$ref":"#/components/schemas/RelationTo"}},"title":"Relation"},"ModelResponse":{"type":"object","properties":{"configuration":{"type":"object","additionalProperties":{"description":"Any type"}},"connection_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/OutputActor"},"enricher":{"$ref":"#/components/schemas/Enrichment"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ModelField"}},"id":{"type":"string","format":"uuid"},"identifier":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelLabel"}},"name":{"type":"string"},"organization_id":{"type":"string","format":"uuid"},"policies":{"type":"array","items":{"type":"string","format":"uuid"}},"relations":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}},"tracking_columns":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/OutputActor"},"version":{"type":"integer"}},"title":"ModelResponse"},"WorkTaskStatus":{"type":"string","enum":["created","running","done","failed"],"title":"WorkTaskStatus"},"JobResponse":{"type":"object","properties":{"error":{"type":["string","null"],"description":"Error message if the job failed."},"job_id":{"type":"string","format":"uuid","description":"Identifier of the job."},"result":{"description":"Job result. Shape depends on the job type; only populated once status is done."},"status":{"$ref":"#/components/schemas/WorkTaskStatus"},"type":{"type":"string","description":"Job type. Matches the type used to fetch the job."}},"title":"JobResponse"},"ModelResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelResponse"},"job":{"$ref":"#/components/schemas/JobResponse"}},"title":"ModelResponseEnvelope"},"ModelListResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ModelResponse"}}},"title":"ModelListResponseEnvelope"},"UpdateModelRequest":{"type":"object","properties":{"additional_fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ModelModelFieldRequest"}},"configuration":{"type":"object","additionalProperties":{"description":"Any type"}},"connection_id":{"type":"string","format":"uuid"},"enricher":{"$ref":"#/components/schemas/Enrichment"},"fields":{"type":["array","null"],"items":{"type":"string"}},"identifier":{"type":"string"},"labels":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"refresh":{"type":"boolean"},"relations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ModelRelation"}},"tracking_columns":{"type":["array","null"],"items":{"type":"string"}}},"required":["configuration","connection_id","name"],"title":"UpdateModelRequest"},"SampleRecord":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"description":"Any type"}},"description":"A map of `fieldSource` -> `fieldName: fieldValue`. Because there may be field name conflicts between the base model and enrichments, the base model fields are placed in a map under the model ID. Fields from enrichments are placed under the enricher ID.","title":"SampleRecord"},"ModelSample":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/SampleRecord"}},"warnings":{"type":"array","items":{"type":"string"}}},"title":"ModelSample"},"ModelSampleResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelSample"},"job":{"$ref":"#/components/schemas/JobResponse"}},"title":"ModelSampleResponseEnvelope"},"ModelFieldResponse":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ModelField"}}},"title":"ModelFieldResponse"},"ModelsyncSyncTargetMode":{"type":"string","enum":["create","update","updateOrCreate","replace","append","remove","snapshot"],"title":"ModelsyncSyncTargetMode"},"ScheduleFrequency":{"type":"string","enum":["manual","continuous","hourly","daily","weekly","custom","builder","runafter","multi","dbtcloud"],"title":"ScheduleFrequency"},"RunAfter":{"type":"object","properties":{"bulk_sync_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"sync_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"title":"RunAfter"},"Schedule":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"},"day_of_month":{"type":["string","null"]},"day_of_week":{"type":["string","null"]},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"hour":{"type":["string","null"]},"job_id":{"type":["integer","null"]},"minute":{"type":["string","null"]},"month":{"type":["string","null"]},"run_after":{"$ref":"#/components/schemas/RunAfter"},"run_after_success_only":{"type":["boolean","null"],"description":"If true, the sync will only run if the dependent syncs completed successfully."}},"title":"Schedule"},"ListSyncItem":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the sync runs on its schedule."},"created_at":{"type":"string","format":"date-time","description":"Timestamp the sync was created."},"created_by":{"$ref":"#/components/schemas/OutputActor"},"id":{"type":"string","format":"uuid","description":"Unique identifier of the sync."},"mode":{"type":"string","description":"How source records are written to the target (e.g. create, updateOrCreate, enrich)."},"model_ids":{"type":"array","items":{"type":"string"},"description":"Model IDs used in the sync."},"name":{"type":"string","description":"Human-readable name of the sync."},"only_enrich_updates":{"type":"boolean","description":"For enrichment syncs, only process records that have been updated since the previous run."},"organization_id":{"type":"string","format":"uuid","description":"Organization the sync belongs to."},"schedule":{"$ref":"#/components/schemas/Schedule"},"skip_initial_backfill":{"type":"boolean","description":"When true, the first execution of the sync skips the initial backfill and only processes new changes."},"sync_all_records":{"type":"boolean","description":"When true, every execution syncs the full set of source records rather than only changes since the previous run."},"target_connection_id":{"type":"string","format":"uuid","description":"Connection the sync writes to."},"target_object":{"type":"string","description":"Destination object (e.g. table, SaaS object) the sync writes to."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp the sync was last updated."},"updated_by":{"$ref":"#/components/schemas/OutputActor"}},"title":"ListSyncItem"},"PaginationDetails":{"type":"object","properties":{"next_page_token":{"type":"string"}},"title":"PaginationDetails"},"ListSyncResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ListSyncItem"}},"pagination":{"$ref":"#/components/schemas/PaginationDetails"}},"title":"ListSyncResponseEnvelope"},"Source":{"type":"object","properties":{"field":{"type":"string"},"model_id":{"type":"string","format":"uuid"}},"required":["field","model_id"],"title":"Source"},"SyncField":{"type":"object","properties":{"encryption_enabled":{"type":"boolean","description":"Whether the field should be encrypted."},"new":{"type":"boolean","default":false,"description":"New is set to true if the target field should be created by Polytomic. This is not supported by all backends."},"override_value":{"type":"string","description":"Value to set in the target field; if provided, 'source' is ignored."},"source":{"$ref":"#/components/schemas/Source"},"sync_mode":{"type":"string","description":"Sync mode for the field; defaults to 'updateOrCreate'. If set to 'create', the field will not be synced if it already has a value. This is not supported by all backends."},"target":{"type":"string","description":"Target field ID the source field value will be written to."}},"required":["target"],"title":"SyncField"},"FilterFieldReferenceType":{"type":"string","enum":["Model","Target"],"title":"FilterFieldReferenceType"},"FilterFunction":{"type":"string","enum":["Equality","Inequality","IsNull","IsNotNull","True","False","OnOrAfter","OnOrBefore","GreaterThan","GreaterThanEqual","LessThan","LessThanEqual","StringContains","StringStartsWith","StringEndsWith","StringDoesNotContain","StringDoesNotStartWith","StringDoesNotEndWith","StringOneOf","StringNotOneOf","Between","ArrayContains","ArrayDoesNotContain","InTheLast","RelativeOnOrBefore","RelativeOnOrAfter","StringLike","StringNotLike","StringMatchesTrimmed"],"title":"FilterFunction"},"Filter":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Source"},"field_id":{"type":"string","description":"Model or Target field name to filter on."},"field_type":{"$ref":"#/components/schemas/FilterFieldReferenceType"},"function":{"$ref":"#/components/schemas/FilterFunction"},"label":{"type":"string"},"value":{"description":"Any type"}},"required":["function"],"description":"Either `field` or `field_id` must be provided. If `field` is provided, `field_id` is ignored.","title":"Filter"},"SchemaIdentityFunction":{"type":"string","enum":["Equality","ISubstring","OneOf","DomainMatch","HostnameMatch"],"title":"SchemaIdentityFunction"},"Identity":{"type":"object","properties":{"function":{"$ref":"#/components/schemas/SchemaIdentityFunction"},"new_field":{"type":"boolean"},"remote_field_type_id":{"type":["string","null"]},"source":{"$ref":"#/components/schemas/Source"},"target":{"type":"string"}},"required":["function","source","target"],"title":"Identity"},"Override":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/Source"},"field_id":{"type":"string","description":"Field ID of the model field to override."},"function":{"$ref":"#/components/schemas/FilterFunction"},"override":{"description":"Any type"},"value":{"description":"Any type"}},"description":"Either `field` or `field_id` must be provided. If `field_id` is provided, `field` is ignored.","title":"Override"},"Target":{"type":"object","properties":{"configuration":{"type":"object","additionalProperties":{"description":"Any type"}},"connection_id":{"type":"string","format":"uuid"},"create":{"type":"object","additionalProperties":{"type":"string"},"description":"Create a new target object with these properties."},"filter_logic":{"type":"string"},"new_name":{"type":"string","description":"Name for a new target object."},"object":{"type":"string"},"search_values":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["connection_id"],"title":"Target"},"CreateSyncRequest":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the sync is enabled and scheduled."},"encryption_passphrase":{"type":"string","description":"Passphrase for encrypting the sync data."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/SyncField"},"description":"Fields to sync from source to destination."},"filter_logic":{"type":"string","description":"Logical expression to combine filters."},"filters":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Filter"},"description":"Filters to apply to the source data."},"identity":{"$ref":"#/components/schemas/Identity"},"mode":{"$ref":"#/components/schemas/ModelsyncSyncTargetMode"},"name":{"type":"string"},"only_enrich_updates":{"type":"boolean","description":"Whether to use enrichment models as a source of possible changes to sync. If true, only changes to the base models will cause a record to sync."},"organization_id":{"type":["string","null"],"format":"uuid","description":"Organization ID for the sync; read-only with a partner key."},"override_fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SyncField"},"description":"Values to set in the target unconditionally."},"overrides":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Override"},"description":"Conditional value replacement for fields."},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"schedule":{"$ref":"#/components/schemas/Schedule"},"skip_initial_backfill":{"type":"boolean","description":"Whether to skip the initial backfill of records; if true only records seen after the sync is enabled will be synced."},"sync_all_records":{"type":"boolean","description":"Whether to sync all records from the source, regardless of whether they've changed since the previous execution."},"target":{"$ref":"#/components/schemas/Target"}},"required":["fields","mode","name","schedule","target"],"title":"CreateSyncRequest"},"SyncResponse":{"type":"object","properties":{"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/OutputActor"},"encryption_passphrase":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/SyncField"}},"filter_logic":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filter"}},"id":{"type":"string","format":"uuid"},"identity":{"$ref":"#/components/schemas/Identity"},"mode":{"$ref":"#/components/schemas/ModelsyncSyncTargetMode"},"model_ids":{"type":"array","items":{"type":"string"},"description":"Model IDs used in the sync."},"name":{"type":"string"},"only_enrich_updates":{"type":"boolean"},"organization_id":{"type":"string","format":"uuid"},"override_fields":{"type":"array","items":{"$ref":"#/components/schemas/SyncField"}},"overrides":{"type":"array","items":{"$ref":"#/components/schemas/Override"}},"policies":{"type":"array","items":{"type":"string","format":"uuid"}},"schedule":{"$ref":"#/components/schemas/Schedule"},"skip_initial_backfill":{"type":"boolean"},"sync_all_records":{"type":"boolean"},"target":{"$ref":"#/components/schemas/Target"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/OutputActor"}},"title":"SyncResponse"},"SyncResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SyncResponse"}},"title":"SyncResponseEnvelope"},"JsonschemaForm":{"type":"object","properties":{},"title":"JsonschemaForm"},"ScheduleScheduleOption":{"type":"object","properties":{"configuration":{"$ref":"#/components/schemas/JsonschemaForm"},"description":{"type":"string"},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"label":{"type":"string"}},"title":"ScheduleScheduleOption"},"ScheduleOptionResponse":{"type":"object","properties":{"schedule_options":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ScheduleScheduleOption"}}},"title":"ScheduleOptionResponse"},"ScheduleOptionResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ScheduleOptionResponse"}},"title":"ScheduleOptionResponseEnvelope"},"UpdateSyncRequest":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the sync is enabled and scheduled."},"encryption_passphrase":{"type":"string","description":"Passphrase for encrypting the sync data."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/SyncField"},"description":"Fields to sync from source to destination."},"filter_logic":{"type":"string","description":"Logical expression to combine filters."},"filters":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Filter"},"description":"Filters to apply to the source data."},"identity":{"$ref":"#/components/schemas/Identity"},"mode":{"$ref":"#/components/schemas/ModelsyncSyncTargetMode"},"name":{"type":"string"},"only_enrich_updates":{"type":"boolean","description":"Whether to use enrichment models as a source of possible changes to sync. If true, only changes to the base models will cause a record to sync."},"organization_id":{"type":["string","null"],"format":"uuid","description":"Organization ID for the sync; read-only with a partner key."},"override_fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SyncField"},"description":"Values to set in the target unconditionally."},"overrides":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Override"},"description":"Conditional value replacement for fields."},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"}},"schedule":{"$ref":"#/components/schemas/Schedule"},"skip_initial_backfill":{"type":"boolean","description":"Whether to skip the initial backfill of records; if true only records seen after the sync is enabled will be synced."},"sync_all_records":{"type":"boolean","description":"Whether to sync all records from the source, regardless of whether they've changed since the previous execution."},"target":{"$ref":"#/components/schemas/Target"}},"required":["fields","mode","name","schedule","target"],"title":"UpdateSyncRequest"},"ActivateSyncInput":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"title":"ActivateSyncInput"},"ActivateSyncOutput":{"type":"object","properties":{"active":{"type":"boolean"},"id":{"type":"string","format":"uuid"}},"title":"ActivateSyncOutput"},"ActivateSyncEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ActivateSyncOutput"}},"title":"ActivateSyncEnvelope"},"CancelSyncResponse":{"type":"object","properties":{"message":{"type":"string"}},"title":"CancelSyncResponse"},"CancelSyncResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CancelSyncResponse"}},"title":"CancelSyncResponseEnvelope"},"StartSyncRequest":{"type":"object","properties":{"identities":{"type":["array","null"],"items":{"type":"string"}},"resync":{"type":"boolean","default":false},"test":{"type":"boolean","default":false}},"title":"StartSyncRequest"},"UtilExecutionStatus":{"type":"string","enum":["created","scheduled","queued","waiting","running","processing","canceling","canceled","completed","failed","interrupted"],"title":"UtilExecutionStatus"},"StartSyncResponseSchema":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"Execution ID"},"status":{"$ref":"#/components/schemas/UtilExecutionStatus"}},"title":"StartSyncResponseSchema"},"StartSyncResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/StartSyncResponseSchema"}},"title":"StartSyncResponseEnvelope"},"ExecutionCounts":{"type":"object","properties":{"delete":{"type":"integer","format":"int64"},"error":{"type":"integer","format":"int64"},"insert":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"},"update":{"type":"integer","format":"int64"},"upserts":{"type":"integer","format":"int64"},"warnings":{"type":"integer","format":"int64"}},"title":"ExecutionCounts"},"GetExecutionResponseSchema":{"type":"object","properties":{"completed_at":{"type":["string","null"],"format":"date-time"},"counts":{"$ref":"#/components/schemas/ExecutionCounts"},"created_at":{"type":"string","format":"date-time"},"errors":{"type":"array","items":{"type":"string"}},"id":{"type":"string","format":"uuid"},"started_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/UtilExecutionStatus"},"type":{"type":"string"}},"title":"GetExecutionResponseSchema"},"SyncStatusResponse":{"type":"object","properties":{"current_execution":{"$ref":"#/components/schemas/GetExecutionResponseSchema"},"last_execution":{"$ref":"#/components/schemas/GetExecutionResponseSchema"},"next_execution_time":{"type":["string","null"],"format":"date-time"}},"title":"SyncStatusResponse"},"SyncStatusEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SyncStatusResponse"}},"title":"SyncStatusEnvelope"},"IdentityFunction":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"title":"IdentityFunction"},"TargetField":{"type":"object","properties":{"association":{"type":"boolean"},"createable":{"type":"boolean"},"description":{"type":"string"},"encryptable":{"type":"boolean"},"filterable":{"type":"boolean"},"id":{"type":"string"},"identity_functions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/IdentityFunction"}},"name":{"type":"string"},"required":{"type":"boolean"},"source_type":{"type":"string"},"supports_identity":{"type":"boolean"},"type":{"type":"string"},"updateable":{"type":"boolean"}},"title":"TargetField"},"Mode":{"type":"object","properties":{"description":{"type":"string"},"label":{"type":"string"},"mode":{"type":"string"},"requires_identity":{"type":"boolean"},"supports_field_sync_mode":{"type":"boolean"},"supports_target_filters":{"type":"boolean"}},"title":"Mode"},"SyncDestinationProperties":{"type":"object","properties":{"does_not_report_operation_counts":{"type":"boolean"},"mappings_not_required":{"type":"boolean"},"new_target_label":{"type":"string"},"optional_target_mappings":{"type":"boolean"},"primary_metadata_object":{"type":"string"},"requires_configuration":{"type":"boolean"},"supports_field_creation":{"type":"boolean"},"supports_field_encryption":{"type":"boolean"},"supports_field_type_selection":{"type":"boolean"},"supports_identity_field_creation":{"type":"boolean"},"supports_target_filters":{"type":"boolean"},"target_creator":{"type":"boolean"},"use_field_names_as_labels":{"type":"boolean"}},"title":"SyncDestinationProperties"},"TargetResponse":{"type":"object","properties":{"fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TargetField"}},"id":{"type":"string"},"modes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Mode"}},"name":{"type":"string"},"properties":{"$ref":"#/components/schemas/SyncDestinationProperties"},"refreshed_at":{"type":"string","format":"date-time"}},"title":"TargetResponse"},"TargetResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TargetResponse"}},"title":"TargetResponseEnvelope"},"SupportedMode":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ModelsyncSyncTargetMode"},"requires_identity":{"type":"boolean","description":"True if the sync mode requires an identity field mapping."},"supports_per_field_mode":{"type":"boolean","description":"True if the target supports per-field sync modes."},"supports_target_filters":{"type":"boolean","description":"True if the sync mode supports target filters."}},"title":"SupportedMode"},"TargetObject":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the target object."},"modes":{"type":"array","items":{"$ref":"#/components/schemas/SupportedMode"},"description":"The supported sync modes and their properties for the target object."},"name":{"type":"string","description":"The name of the target object."}},"title":"TargetObject"},"TargetCreateInput":{"type":"object","properties":{"enum":{"type":"boolean","description":"True if the property is an enum."},"id":{"type":"string","description":"The identifier of the target property."},"title":{"type":"string","description":"A human readable title for the target property."}},"title":"TargetCreateInput"},"TargetCreator":{"type":"object","properties":{"properties":{"type":"array","items":{"$ref":"#/components/schemas/TargetCreateInput"},"description":"The properties that are required for target creation."},"supported":{"type":"boolean","description":"True if the connection supports target creation."}},"title":"TargetCreator"},"TargetObjectsResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TargetObject"}},"target_creation":{"$ref":"#/components/schemas/TargetCreator"}},"title":"TargetObjectsResponseEnvelope"},"UtilEnumValue":{"type":"object","properties":{"label":{"type":["string","null"]},"value":{"type":"string"}},"title":"UtilEnumValue"},"TargetPropertyValues":{"type":"object","properties":{"enum":{"type":"boolean","description":"True if the property is an enum."},"id":{"type":"string","description":"The identifier of the target property."},"title":{"type":"string","description":"A human readable title for the target property."},"values":{"type":"array","items":{"$ref":"#/components/schemas/UtilEnumValue"},"description":"Valid values for the target property."}},"title":"TargetPropertyValues"},"TargetPropertyValuesEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TargetPropertyValues"}},"title":"TargetPropertyValuesEnvelope"},"ListExecutionResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/GetExecutionResponseSchema"}},"pagination":{"$ref":"#/components/schemas/PaginationDetails"}},"title":"ListExecutionResponseEnvelope"},"GetExecutionResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetExecutionResponseSchema"}},"title":"GetExecutionResponseEnvelope"},"CancelSyncExecutionResponse":{"type":"object","properties":{"message":{"type":"string"}},"title":"CancelSyncExecutionResponse"},"CancelSyncExecutionResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CancelSyncExecutionResponse"}},"title":"CancelSyncExecutionResponseEnvelope"},"ExecutionConsoleLogEntry":{"type":"object","properties":{"id":{"type":"string"},"level":{"type":"string"},"message":{"type":"string"},"payload":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"timestamp":{"type":"string","format":"date-time"}},"title":"ExecutionConsoleLogEntry"},"ExecutionConsoleLogsResponse":{"type":"object","properties":{"entries":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ExecutionConsoleLogEntry"}},"next_cursor":{"type":["string","null"]}},"title":"ExecutionConsoleLogsResponse"},"ExecutionConsoleLogsResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ExecutionConsoleLogsResponse"}},"title":"ExecutionConsoleLogsResponseEnvelope"},"ExecutionLogType":{"type":"string","enum":["records","errors","warnings","inserts","updates","deletes"],"title":"ExecutionLogType"},"ExecutionLogResponse":{"type":"object","properties":{"expires":{"type":["string","null"],"format":"date-time"},"urls":{"type":["array","null"],"items":{"type":"string"}}},"title":"ExecutionLogResponse"},"ExecutionLogsResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ExecutionLogResponse"}},"title":"ExecutionLogsResponseEnvelope"},"BulkScheduleSyncMode":{"type":"string","enum":["normal","refetch","resync","rebuild"],"title":"BulkScheduleSyncMode"},"BulkSelectiveMode":{"type":"string","enum":["none","incrementalFields","nonincrementalFields"],"title":"BulkSelectiveMode"},"BulkSyncAdditionalScheduleResponse":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","description":"Timestamp the schedule was created."},"created_by":{"$ref":"#/components/schemas/OutputActor"},"day_of_month":{"type":"string","description":"Day of the month (1-31) for monthly schedules."},"day_of_week":{"type":"string","description":"Day of the week for weekly schedules."},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"hour":{"type":"string","description":"Hour of the day (0-23, in UTC) the schedule fires."},"id":{"type":"string","format":"uuid","description":"Unique identifier of the schedule."},"minute":{"type":"string","description":"Minute of the hour (0-59) the schedule fires."},"month":{"type":"string","description":"Month of the year (1-12) for yearly schedules."},"resync_mode":{"$ref":"#/components/schemas/BulkScheduleSyncMode"},"schemas":{"type":"array","items":{"type":"string"},"description":"Schema IDs this schedule applies to. Empty means all schemas."},"selective_mode":{"$ref":"#/components/schemas/BulkSelectiveMode"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp the schedule was last updated."},"updated_by":{"$ref":"#/components/schemas/OutputActor"}},"required":["frequency"],"title":"BulkSyncAdditionalScheduleResponse"},"BulkDiscover":{"type":"string","enum":["all","onlyIncremental","onlyNonIncremental","none"],"title":"BulkDiscover"},"BulkSyncDefaultScheduleResponse":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","description":"Timestamp the schedule was created."},"created_by":{"$ref":"#/components/schemas/OutputActor"},"day_of_month":{"type":"string","description":"Day of the month (1-31) for monthly schedules."},"day_of_week":{"type":"string","description":"Day of the week for weekly schedules."},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"hour":{"type":"string","description":"Hour of the day (0-23, in UTC) the schedule fires."},"id":{"type":"string","format":"uuid","description":"Unique identifier of the schedule."},"minute":{"type":"string","description":"Minute of the hour (0-59) the schedule fires."},"month":{"type":"string","description":"Month of the year (1-12) for yearly schedules."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp the schedule was last updated."},"updated_by":{"$ref":"#/components/schemas/OutputActor"}},"required":["frequency"],"title":"BulkSyncDefaultScheduleResponse"},"BulkSyncTargetMode":{"type":"string","enum":["snapshot","replicate"],"title":"BulkSyncTargetMode"},"BulkNormalizeNames":{"type":"string","enum":["enabled","disabled","legacy"],"title":"BulkNormalizeNames"},"BulkSyncResponse":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the sync is active. Inactive syncs do not run on their schedule."},"additional_schedules":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncAdditionalScheduleResponse"},"description":"Additional bulk sync schedules. Schedule times are interpreted in UTC."},"automatically_add_new_fields":{"$ref":"#/components/schemas/BulkDiscover"},"automatically_add_new_objects":{"$ref":"#/components/schemas/BulkDiscover"},"concurrency_limit":{"type":["integer","null"],"description":"Per-sync concurrency limit override."},"created_at":{"type":"string","format":"date-time","description":"Timestamp the sync was created."},"created_by":{"$ref":"#/components/schemas/OutputActor"},"data_cutoff_timestamp":{"type":["string","null"],"format":"date-time","description":"Global cutoff applied across schemas; source records older than this timestamp are excluded."},"default_schedule":{"$ref":"#/components/schemas/BulkSyncDefaultScheduleResponse"},"destination_configuration":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Destination-specific bulk sync configuration. e.g. output schema name, s3 file format, etc."},"destination_connection_id":{"type":"string","format":"uuid","description":"Connection rows are written to."},"disable_record_timestamps":{"type":"boolean","default":false,"description":"When true, Polytomic does not add its own timestamp columns to destination rows."},"id":{"type":"string","format":"uuid","description":"Unique identifier of the bulk sync."},"mode":{"$ref":"#/components/schemas/BulkSyncTargetMode"},"name":{"type":"string","description":"Human-readable name of the bulk sync."},"normalize_names":{"$ref":"#/components/schemas/BulkNormalizeNames"},"organization_id":{"type":"string","format":"uuid","description":"Organization the sync belongs to."},"policies":{"type":"array","items":{"type":"string","format":"uuid"},"description":"List of permissions policies applied to the bulk sync."},"resync_concurrency_limit":{"type":["integer","null"],"description":"Per-sync resync concurrency limit override."},"source_configuration":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Source-specific bulk sync configuration. e.g. replication slot name, sync lookback, etc."},"source_connection_id":{"type":"string","format":"uuid","description":"Connection rows are read from."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp the sync was last updated."},"updated_by":{"$ref":"#/components/schemas/OutputActor"}},"title":"BulkSyncResponse"},"BulkSyncListEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncResponse"}}},"title":"BulkSyncListEnvelope"},"BulkSyncAdditionalScheduleRequest":{"type":"object","properties":{"day_of_month":{"type":"string","description":"Day of the month (1-31) to run monthly schedules."},"day_of_week":{"type":"string","description":"Day of the week to run weekly schedules."},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"hour":{"type":"string","description":"Hour of the day (0-23, in UTC) to run hourly, daily, weekly, or monthly schedules."},"id":{"type":"string","format":"uuid"},"minute":{"type":"string","description":"Minute of the hour (0-59) to run the schedule."},"month":{"type":"string","description":"Month of the year (1-12) to run yearly schedules."},"resync_mode":{"$ref":"#/components/schemas/BulkScheduleSyncMode"},"schemas":{"type":"array","items":{"type":"string"},"description":"Optional list of schema IDs this schedule applies to. If empty, the schedule applies to all schemas."},"selective_mode":{"$ref":"#/components/schemas/BulkSelectiveMode"}},"required":["frequency"],"title":"BulkSyncAdditionalScheduleRequest"},"BulkSyncDefaultScheduleRequest":{"type":"object","properties":{"day_of_month":{"type":"string","description":"Day of the month (1-31) to run monthly schedules."},"day_of_week":{"type":"string","description":"Day of the week to run weekly schedules."},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"hour":{"type":"string","description":"Hour of the day (0-23, in UTC) to run hourly, daily, weekly, or monthly schedules."},"id":{"type":"string","format":"uuid"},"minute":{"type":"string","description":"Minute of the hour (0-59) to run the schedule."},"month":{"type":"string","description":"Month of the year (1-12) to run yearly schedules."}},"required":["frequency"],"title":"BulkSyncDefaultScheduleRequest"},"FieldConfiguration":{"type":"object","properties":{"enabled":{"type":["boolean","null"],"default":true,"description":"Whether the field is enabled for syncing."},"id":{"type":"string"},"obfuscate":{"type":["boolean","null"],"default":false,"description":"Whether the field should be obfuscated."}},"title":"FieldConfiguration"},"SchemaConfigurationFieldsItems":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/FieldConfiguration"}],"title":"SchemaConfigurationFieldsItems"},"BulkFilter":{"type":"object","properties":{"field_id":{"type":"string","description":"Schema field ID to filter on."},"function":{"$ref":"#/components/schemas/FilterFunction"},"value":{"description":"Any type"}},"required":["function"],"title":"BulkFilter"},"SchemaConfiguration":{"type":"object","properties":{"data_cutoff_timestamp":{"type":["string","null"],"format":"date-time"},"disable_data_cutoff":{"type":["boolean","null"],"default":false,"description":"Whether data cutoff is disabled for this schema."},"enabled":{"type":["boolean","null"],"default":true,"description":"Whether the schema is enabled for syncing."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/SchemaConfigurationFieldsItems"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/BulkFilter"}},"id":{"type":"string"},"partition_key":{"type":["string","null"]},"tracking_field":{"type":["string","null"]}},"title":"SchemaConfiguration"},"CreateBulkSyncRequestSchemasItems":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/SchemaConfiguration"}],"title":"CreateBulkSyncRequestSchemasItems"},"CreateBulkSyncRequest":{"type":"object","properties":{"active":{"type":["boolean","null"],"description":"Whether the sync is active. Inactive syncs do not run on their schedule but can still be triggered manually."},"additional_schedules":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncAdditionalScheduleRequest"},"description":"Additional bulk sync schedules. Schedule times are interpreted in UTC."},"automatically_add_new_fields":{"$ref":"#/components/schemas/BulkDiscover"},"automatically_add_new_objects":{"$ref":"#/components/schemas/BulkDiscover"},"concurrency_limit":{"type":["integer","null"],"description":"Override the default concurrency limit for this sync."},"data_cutoff_timestamp":{"type":["string","null"],"format":"date-time","description":"Global cutoff applied across schemas. Source records older than this timestamp are excluded from sync runs."},"default_schedule":{"$ref":"#/components/schemas/BulkSyncDefaultScheduleRequest"},"destination_configuration":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Destination-specific bulk sync configuration (e.g. output schema name, file format). The accepted keys depend on the destination connection type."},"destination_connection_id":{"type":"string","format":"uuid","description":"Unique identifier of the connection rows are written to."},"disable_record_timestamps":{"type":["boolean","null"],"default":false,"description":"When true, Polytomic will not add its own timestamp columns to destination rows."},"mode":{"$ref":"#/components/schemas/BulkSyncTargetMode"},"name":{"type":"string","description":"Human-readable name for the bulk sync."},"normalize_names":{"$ref":"#/components/schemas/BulkNormalizeNames"},"organization_id":{"type":["string","null"],"format":"uuid","description":"Organization the sync is created in. Only used by partner callers; normal callers always create syncs in their own organization."},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"Identifiers of permissions policies applied to the bulk sync."},"resync_concurrency_limit":{"type":["integer","null"],"description":"Override the default resync concurrency limit for this sync."},"schemas":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreateBulkSyncRequestSchemasItems"},"description":"List of schemas to sync; if omitted, all schemas will be selected for syncing."},"source_configuration":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Source-specific bulk sync configuration (e.g. replication slot name, sync lookback). The accepted keys depend on the source connection type."},"source_connection_id":{"type":"string","format":"uuid","description":"Unique identifier of the connection rows are read from."}},"required":["default_schedule","destination_configuration","destination_connection_id","mode","name","source_connection_id"],"title":"CreateBulkSyncRequest"},"BulkSyncResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSyncResponse"}},"title":"BulkSyncResponseEnvelope"},"UpdateBulkSyncRequestSchemasItems":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/SchemaConfiguration"}],"title":"UpdateBulkSyncRequestSchemasItems"},"UpdateBulkSyncRequest":{"type":"object","properties":{"active":{"type":["boolean","null"],"description":"Whether the sync is active. Inactive syncs do not run on their schedule but can still be triggered manually."},"additional_schedules":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncAdditionalScheduleRequest"},"description":"Additional bulk sync schedules. Schedule times are interpreted in UTC."},"automatically_add_new_fields":{"$ref":"#/components/schemas/BulkDiscover"},"automatically_add_new_objects":{"$ref":"#/components/schemas/BulkDiscover"},"concurrency_limit":{"type":["integer","null"],"description":"Override the default concurrency limit for this sync."},"data_cutoff_timestamp":{"type":["string","null"],"format":"date-time","description":"Global cutoff applied across schemas. Source records older than this timestamp are excluded from sync runs."},"default_schedule":{"$ref":"#/components/schemas/BulkSyncDefaultScheduleRequest"},"destination_configuration":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Destination-specific bulk sync configuration (e.g. output schema name, file format). The accepted keys depend on the destination connection type."},"destination_connection_id":{"type":"string","format":"uuid","description":"Unique identifier of the connection rows are written to."},"disable_record_timestamps":{"type":["boolean","null"],"default":false,"description":"When true, Polytomic will not add its own timestamp columns to destination rows."},"mode":{"$ref":"#/components/schemas/BulkSyncTargetMode"},"name":{"type":"string","description":"Human-readable name for the bulk sync."},"normalize_names":{"$ref":"#/components/schemas/BulkNormalizeNames"},"organization_id":{"type":["string","null"],"format":"uuid","description":"Organization the sync belongs to. Only used by partner callers; normal callers are always scoped to their own organization."},"policies":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"Identifiers of permissions policies applied to the bulk sync."},"resync_concurrency_limit":{"type":["integer","null"],"description":"Override the default resync concurrency limit for this sync."},"schemas":{"type":["array","null"],"items":{"$ref":"#/components/schemas/UpdateBulkSyncRequestSchemasItems"},"description":"List of schemas to sync; if omitted, all schemas will be selected for syncing."},"source_configuration":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Source-specific bulk sync configuration (e.g. replication slot name, sync lookback). The accepted keys depend on the source connection type."},"source_connection_id":{"type":"string","format":"uuid","description":"Unique identifier of the connection rows are read from."}},"required":["default_schedule","destination_configuration","destination_connection_id","mode","name","source_connection_id"],"title":"UpdateBulkSyncRequest"},"CancelBulkSyncResponse":{"type":"object","properties":{"message":{"type":"string"}},"title":"CancelBulkSyncResponse"},"CancelBulkSyncResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CancelBulkSyncResponse"}},"title":"CancelBulkSyncResponseEnvelope"},"BulkFetchMode":{"type":"string","enum":["none","incremental","full"],"description":"How the data is fetched. 'none' is normal operation for Polytomic. 'incremental' and 'full' apply to syncs from Salesforce. 'incremental' indicates the data is synced incrementally using record modification time. 'full' is necessary to catch up to the latest values for formula fields and rollup fields whose updates don't show up in incremental runs due to limitations in Salesforce.","title":"BulkFetchMode"},"BulkResyncMode":{"type":"string","enum":["refetch","resync","rebuild"],"title":"BulkResyncMode"},"StartBulkSyncRequest":{"type":"object","properties":{"fetch_mode":{"$ref":"#/components/schemas/BulkFetchMode"},"resync_mode":{"$ref":"#/components/schemas/BulkResyncMode"},"schemas":{"type":["array","null"],"items":{"type":"string"},"description":"Optional list of schema IDs to include in this execution. If empty, all enabled schemas are included."},"test":{"type":"boolean","description":"When true, runs a test execution that validates the configuration without writing to the destination. Mutually exclusive with resync_mode."}},"title":"StartBulkSyncRequest"},"BulkOutputDisposition":{"type":"string","enum":["retain","truncate","rebuild"],"title":"BulkOutputDisposition"},"BulkSchemaExecutionStatus":{"type":"string","enum":["created","scheduled","running","exporting","canceled","completed","failed","interrupted","processing"],"title":"BulkSchemaExecutionStatus"},"BulkSyncSchemaExecution":{"type":"object","properties":{"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"error_count":{"type":"integer","format":"int64"},"output_name":{"type":"string"},"record_count":{"type":"integer","format":"int64"},"schema":{"type":"string"},"started_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/BulkSchemaExecutionStatus"},"status_message":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"warning_count":{"type":"integer","format":"int64"}},"title":"BulkSyncSchemaExecution"},"BulkExecutionStatus":{"type":"string","enum":["created","scheduled","running","exporting","canceling","canceled","completed","failed","processing","errors","interrupted"],"title":"BulkExecutionStatus"},"BulkSyncExecution":{"type":"object","properties":{"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"error_count":{"type":"integer","format":"int64"},"fetch_mode":{"$ref":"#/components/schemas/BulkFetchMode"},"id":{"type":"string","format":"uuid"},"is_partial":{"type":"boolean"},"is_resync":{"type":"boolean"},"is_test":{"type":"boolean"},"output_disposition":{"$ref":"#/components/schemas/BulkOutputDisposition"},"record_count":{"type":"integer","format":"int64"},"schemas":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncSchemaExecution"}},"started_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/BulkExecutionStatus"},"status_message":{"type":"string"},"type":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"warning_count":{"type":"integer","format":"int64"}},"title":"BulkSyncExecution"},"BulkSyncExecutionEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSyncExecution"}},"title":"BulkSyncExecutionEnvelope"},"IngestionStatusLevel":{"type":"string","enum":["ok","warning","error"],"description":"The health status of CDC ingestion for a bulk sync. 'ok' means ingestion is operating normally. 'warning' indicates a non-fatal issue. 'error' indicates a potentially fatal ingestion error.","title":"IngestionStatusLevel"},"BulkSyncIngestionStatus":{"type":"object","properties":{"enabled":{"type":"boolean"},"highwater_mark":{"type":"string"},"is_running":{"type":"boolean"},"position":{"type":"string"},"position_time":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/IngestionStatusLevel"},"status_message":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"title":"BulkSyncIngestionStatus"},"BulkSyncStatusResponse":{"type":"object","properties":{"current_execution":{"$ref":"#/components/schemas/BulkSyncExecution"},"ingestion_status":{"$ref":"#/components/schemas/BulkSyncIngestionStatus"},"last_execution":{"$ref":"#/components/schemas/BulkSyncExecution"},"next_execution_time":{"type":["string","null"],"format":"date-time"}},"title":"BulkSyncStatusResponse"},"BulkSyncStatusEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSyncStatusResponse"}},"title":"BulkSyncStatusEnvelope"},"BulkSyncSourceCapabilities":{"type":"object","properties":{"supports_tracking_fields":{"type":"boolean"}},"title":"BulkSyncSourceCapabilities"},"SchemaAssociation":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"reference_to":{"type":"array","items":{"type":"string"}},"referenced_field":{"type":"string"}},"title":"SchemaAssociation"},"UtilFieldType":{"type":"string","enum":["unknown","string","number","boolean","datetime","array","object","binary"],"title":"UtilFieldType"},"TypesType":{"description":"Any type","title":"TypesType"},"PickValue":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"title":"PickValue"},"SchemaField":{"type":"object","properties":{"association":{"$ref":"#/components/schemas/SchemaAssociation"},"id":{"type":"string"},"is_primary_key":{"type":"boolean","description":"Whether this field is part of the schema's primary key, including any user override."},"name":{"type":"string"},"path":{"type":"string","description":"JSONPath used to extract the field from each source record; only meaningful for document-style backends."},"remote_type":{"type":"string","description":"The type of the field from the remote system."},"type":{"$ref":"#/components/schemas/UtilFieldType"},"type_spec":{"$ref":"#/components/schemas/TypesType"},"user_managed":{"type":"boolean","description":"True when the field's effective definition came from a user override."},"values":{"type":"array","items":{"$ref":"#/components/schemas/PickValue"}}},"title":"SchemaField"},"Schema":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/SchemaField"}},"id":{"type":"string"},"name":{"type":"string"}},"title":"Schema"},"BulkSyncSource":{"type":"object","properties":{"capabilities":{"$ref":"#/components/schemas/BulkSyncSourceCapabilities"},"configuration":{"description":"Any type"},"schemas":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Schema"}}},"title":"BulkSyncSource"},"BulkSyncSourceEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSyncSource"}},"title":"BulkSyncSourceEnvelope"},"SupportedBulkMode":{"type":"object","properties":{"description":{"type":"string"},"id":{"$ref":"#/components/schemas/BulkSyncTargetMode"},"label":{"type":"string"},"requires_identity":{"type":"boolean"},"supports_field_sync_mode":{"type":"boolean"},"supports_target_filters":{"type":"boolean"}},"title":"SupportedBulkMode"},"BulkSyncDest":{"type":"object","properties":{"configuration":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"modes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SupportedBulkMode"}},"supported_resync_modes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkResyncMode"},"description":"Resync modes supported by this destination (refetch, resync, rebuild)."}},"title":"BulkSyncDest"},"BulkSyncDestEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSyncDest"}},"title":"BulkSyncDestEnvelope"},"BulkSyncSchemaExecutionStatus":{"type":"object","properties":{"completed_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the most recent execution finished. Null while the execution is still running."},"error_count":{"type":"integer","format":"int64","description":"Number of errors emitted during the most recent execution."},"execution_id":{"type":"string","format":"uuid","description":"ID of the most recent execution for the schema."},"record_count":{"type":"integer","format":"int64","description":"Number of records processed in the most recent execution."},"schema":{"type":"string","description":"Schema (table or object) identifier."},"started_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the most recent execution started."},"status":{"$ref":"#/components/schemas/BulkSchemaExecutionStatus"},"status_message":{"type":"string","description":"Human-readable detail for the current status (e.g. an error message when status is failed)."},"warning_count":{"type":"integer","format":"int64","description":"Number of warnings emitted during the most recent execution."}},"title":"BulkSyncSchemaExecutionStatus"},"BulkSyncExecutionStatus":{"type":"object","properties":{"nextExecutionTime":{"type":["string","null"],"format":"date-time","description":"Next scheduled execution time, if the sync has a schedule configured."},"schemas":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncSchemaExecutionStatus"},"description":"Most recent execution status for each enabled schema in the sync."},"status":{"$ref":"#/components/schemas/BulkExecutionStatus"},"sync_id":{"type":"string","format":"uuid","description":"Unique identifier of the bulk sync."}},"title":"BulkSyncExecutionStatus"},"ListBulkSyncExecutionsStatusEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncExecutionStatus"}}},"title":"ListBulkSyncExecutionsStatusEnvelope"},"ListBulkSyncExecutionsEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSyncExecution"}},"pagination":{"$ref":"#/components/schemas/PaginationDetails"}},"title":"ListBulkSyncExecutionsEnvelope"},"BulkSyncExecutionLogs":{"type":"object","properties":{"Expires":{"type":"string","format":"date-time","description":"Timestamp at which the signed URLs in URLs stop working."},"URLs":{"type":["array","null"],"items":{"type":"string"},"description":"Signed URLs that download the execution's log files. These URLs expire at the Expires timestamp."}},"title":"BulkSyncExecutionLogs"},"BulkSyncExecutionLogsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSyncExecutionLogs"}},"title":"BulkSyncExecutionLogsEnvelope"},"ExportSyncLogsResponse":{"type":"object","properties":{"url":{"type":"string","description":"Signed URL to download the exported log archive."}},"title":"ExportSyncLogsResponse"},"ExportSyncLogsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ExportSyncLogsResponse"},"job":{"$ref":"#/components/schemas/JobResponse"}},"title":"ExportSyncLogsEnvelope"},"BulkSchemaListItem":{"type":"object","properties":{"data_cutoff_timestamp":{"type":["string","null"],"format":"date-time","description":"Per-schema cutoff. Records older than this timestamp are excluded from sync runs."},"disable_data_cutoff":{"type":"boolean","description":"When true, the sync ignores any configured data_cutoff_timestamp and syncs the full history of this schema."},"enabled":{"type":"boolean","description":"Whether this schema is included in sync runs."},"id":{"type":"string","description":"Source-side schema identifier (e.g. object name for SaaS sources, schema.table for databases)."},"output_name":{"type":"string","description":"Effective name of the object written to the destination after any configured naming rules are applied."},"partition_key":{"type":"string","description":"Source field used to partition rows when writing to the destination. Empty if the destination does not require one."},"tracking_field":{"type":"string","description":"Source field used to detect changes between incremental sync runs. Empty if the schema performs full resyncs."},"user_output_name":{"type":"string","description":"User-specified override for the destination object name. When empty, output_name is used."}},"title":"BulkSchemaListItem"},"ListBulkSchemaEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSchemaListItem"}}},"title":"ListBulkSchemaEnvelope"},"BulkField":{"type":"object","properties":{"enabled":{"type":"boolean"},"id":{"type":"string"},"obfuscated":{"type":"boolean"},"output_name":{"type":"string"},"user_output_name":{"type":"string"}},"title":"BulkField"},"BulkSchema":{"type":"object","properties":{"data_cutoff_timestamp":{"type":["string","null"],"format":"date-time"},"disable_data_cutoff":{"type":"boolean"},"enabled":{"type":"boolean"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/BulkField"},"description":"fields is not populated on the list endpoint and will be removed in a future version; retrieve individual schemas for fields."},"filters":{"type":"array","items":{"$ref":"#/components/schemas/BulkFilter"},"description":"filters is not populated on the list endpoint and will be removed in a future version; retrieve individual schemas for filters."},"id":{"type":"string"},"output_name":{"type":"string"},"partition_key":{"type":"string"},"tracking_field":{"type":"string"},"user_output_name":{"type":"string"}},"title":"BulkSchema"},"UpdateBulkSyncSchemasRequest":{"type":"object","properties":{"schemas":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSchema"},"description":"Schemas to patch. Schemas are matched by id; only schemas present in this list are updated."}},"title":"UpdateBulkSyncSchemasRequest"},"UpdateBulkSyncSchemasEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkSchema"}}},"title":"UpdateBulkSyncSchemasEnvelope"},"BulkSchemaEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSchema"}},"title":"BulkSchemaEnvelope"},"UpdateBulkField":{"type":"object","properties":{"enabled":{"type":"boolean"},"id":{"type":"string"},"obfuscated":{"type":"boolean"},"user_output_name":{"type":"string"}},"title":"UpdateBulkField"},"UpdateBulkSchema":{"type":"object","properties":{"data_cutoff_timestamp":{"type":["string","null"],"format":"date-time","description":"Per-schema cutoff. Records older than this timestamp are excluded from sync runs."},"disable_data_cutoff":{"type":"boolean","description":"When true, the sync ignores any configured data_cutoff_timestamp for this schema."},"enabled":{"type":"boolean","description":"Whether this schema is included in sync runs."},"fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/UpdateBulkField"},"description":"Field-level configuration. Supplying an empty list enables every field discovered on the source."},"filters":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkFilter"},"description":"Row-level filters applied when reading from the source."},"partition_key":{"type":"string","description":"Source field used to partition rows when writing to the destination."},"tracking_field":{"type":"string","description":"Source field used to detect changes between incremental sync runs."},"user_output_name":{"type":"string"}},"title":"UpdateBulkSchema"},"BulkBulkSyncSchedule":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid"},"dayOfMonth":{"type":"string"},"dayOfWeek":{"type":"string"},"deletedAt":{"type":"string","format":"date-time"},"deletedBy":{"type":"string","format":"uuid"},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"hour":{"type":"string"},"isDefault":{"type":"boolean"},"minute":{"type":"string"},"month":{"type":"string"},"schemas":{"type":["array","null"],"items":{"type":"string"}},"selectiveMode":{"$ref":"#/components/schemas/BulkSelectiveMode"},"syncId":{"type":"string","format":"uuid"},"syncMode":{"$ref":"#/components/schemas/BulkScheduleSyncMode"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string","format":"uuid"}},"required":["frequency"],"title":"BulkBulkSyncSchedule"},"SchedulesEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BulkBulkSyncSchedule"}}},"title":"SchedulesEnvelope"},"BulkSyncScheduleAPI":{"type":"object","properties":{"dayOfMonth":{"type":"string","description":"Day of the month (1-31) for monthly schedules."},"dayOfWeek":{"type":"string","description":"Day of the week for weekly schedules."},"frequency":{"$ref":"#/components/schemas/ScheduleFrequency"},"hour":{"type":"string","description":"Hour of the day (0-23, in UTC) the schedule fires."},"minute":{"type":"string","description":"Minute of the hour (0-59) the schedule fires."},"month":{"type":"string","description":"Month of the year (1-12) for yearly schedules."},"selectiveMode":{"$ref":"#/components/schemas/BulkSelectiveMode"}},"required":["frequency"],"title":"BulkSyncScheduleAPI"},"CreateScheduleRequest":{"type":"object","properties":{"schedule":{"$ref":"#/components/schemas/BulkSyncScheduleAPI"}},"required":["schedule"],"title":"CreateScheduleRequest"},"ScheduleEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkBulkSyncSchedule"}},"title":"ScheduleEnvelope"},"UpdateScheduleRequest":{"type":"object","properties":{"schedule":{"$ref":"#/components/schemas/BulkSyncScheduleAPI"}},"required":["schedule"],"title":"UpdateScheduleRequest"},"RunQueryRequest":{"type":"object","properties":{},"title":"RunQueryRequest"},"RunQueryResult":{"type":"object","properties":{"count":{"type":"integer","format":"int64","description":"The number of rows returned by the query. This will not be returned until the query completes."},"error":{"type":"string","description":"Error message if the query failed."},"expires":{"type":"string","description":"The time at which the query will expire and be deleted. This will not be returned until the query completes."},"fields":{"type":"array","items":{"type":"string"},"description":"The names of the fields returned by the query. This will not be returned until the query completes."},"id":{"type":"string","format":"uuid","description":"The ID of the query task. Poll GET /api/queries/{id} until the task reaches done or failed to retrieve results."},"results":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}},"description":"The query results, returned as an array of objects."},"status":{"$ref":"#/components/schemas/WorkTaskStatus"}},"title":"RunQueryResult"},"RunQueryEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RunQueryResult"}},"title":"RunQueryEnvelope"},"RunQueryPagination":{"type":"object","properties":{"next":{"type":"string","description":"URL to the next page of results, if available. This may be returned as a host relative path."},"previous":{"type":"string","description":"URL to the previous page of results, if available. This may be returned as a host relative path."}},"title":"RunQueryPagination"},"QueryResultsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RunQueryResult"},"links":{"$ref":"#/components/schemas/RunQueryPagination"}},"title":"QueryResultsEnvelope"},"UserFieldRequest":{"type":"object","properties":{"example":{"description":"Example value shown in the UI and used as a hint for downstream consumers."},"field_id":{"type":"string","description":"Stable identifier for the user-defined field. Reuse an existing field_id to update a field in place."},"label":{"type":"string","description":"Human-readable label shown to users selecting this field in the app."},"path":{"type":["string","null"],"description":"JSON path expression that extracts the field's value from the source record. Required for nested or computed fields; omit for top-level fields."},"type":{"type":"string","description":"Polytomic type of the field (e.g. string, integer, boolean)."}},"required":["field_id","label","type"],"title":"UserFieldRequest"},"UpsertSchemaFieldRequest":{"type":"object","properties":{"fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/UserFieldRequest"},"description":"Fields to create or update on the schema. Existing user-defined fields with the same field_id are replaced."}},"title":"UpsertSchemaFieldRequest"},"schemas_UpsertField_Response_202":{"type":"object","properties":{},"description":"Empty response body","title":"schemas_UpsertField_Response_202"},"schemas_DeleteField_Response_202":{"type":"object","properties":{},"description":"Empty response body","title":"schemas_DeleteField_Response_202"},"TypesDefinition":{"type":"object","properties":{},"title":"TypesDefinition"},"PatchSchemaFieldRequest":{"type":"object","properties":{"definition":{"$ref":"#/components/schemas/TypesDefinition"},"example":{"description":"Sample value surfaced in the UI."},"label":{"type":["string","null"],"description":"Human-readable label for the field."},"path":{"type":["string","null"],"description":"JSONPath used to extract the field from each source record; only meaningful for document-style backends. Pass an empty string to clear an existing path."},"type":{"type":["string","null"],"description":"One of: string, number, boolean, datetime, array, object, binary. Changing the type without supplying a matching definition clears any prior detailed type metadata."}},"title":"PatchSchemaFieldRequest"},"SchemaFieldResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SchemaField"}},"title":"SchemaFieldResponseEnvelope"},"SchemaPrimaryKeyOverrideInput":{"type":"object","properties":{"field_id":{"type":"string"},"is_primary_key":{"type":"boolean"}},"required":["field_id","is_primary_key"],"title":"SchemaPrimaryKeyOverrideInput"},"SetPrimaryKeysRequest":{"type":"object","properties":{"fields":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SchemaPrimaryKeyOverrideInput"},"description":"Ordered list of source fields that together form the primary key. Replaces any existing override; supply an empty list to clear."}},"title":"SetPrimaryKeysRequest"},"schemas_SetPrimaryKeys_Response_202":{"type":"object","properties":{},"description":"Empty response body","title":"schemas_SetPrimaryKeys_Response_202"},"schemas_ResetPrimaryKeys_Response_202":{"type":"object","properties":{},"description":"Empty response body","title":"schemas_ResetPrimaryKeys_Response_202"},"schemas_Refresh_Response_202":{"type":"object","properties":{},"description":"Empty response body","title":"schemas_Refresh_Response_202"},"BulkSyncSourceStatus":{"type":"object","properties":{"cache_status":{"type":"string"},"last_refresh_finished":{"type":["string","null"],"format":"date-time"},"last_refresh_started":{"type":["string","null"],"format":"date-time"}},"title":"BulkSyncSourceStatus"},"BulkSyncSourceStatusEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkSyncSourceStatus"}},"title":"BulkSyncSourceStatusEnvelope"},"BulkSyncSourceSchemaEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Schema"}},"title":"BulkSyncSourceSchemaEnvelope"},"SchemaRecordsResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"title":"SchemaRecordsResponseEnvelope"},"EventingSyncRunningEvent":{"type":"object","properties":{"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"target_connection_id":{"type":"string","format":"uuid"}},"title":"EventingSyncRunningEvent"},"EventingSyncCompletedEvent":{"type":"object","properties":{"deleted_records":{"type":["array","null"],"items":{"type":"string"}},"error_count":{"type":"integer","format":"int64"},"errored_records":{"type":["array","null"],"items":{"type":"string"}},"execution_id":{"type":"string","format":"uuid"},"inserted_count":{"type":"integer","format":"int64"},"inserted_records":{"type":["array","null"],"items":{"type":"string"}},"organization_id":{"type":"string","format":"uuid"},"record_count":{"type":"integer","format":"int64"},"status":{"$ref":"#/components/schemas/UtilExecutionStatus"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"target_connection_id":{"type":"string","format":"uuid"},"total_records":{"type":["array","null"],"items":{"type":"string"}},"trigger":{"type":"string"},"updated_count":{"type":"integer","format":"int64"},"updated_records":{"type":["array","null"],"items":{"type":"string"}},"upserted_count":{"type":"integer","format":"int64"},"warning_count":{"type":"integer","format":"int64"},"warnings":{"type":["array","null"],"items":{"type":"string"}}},"title":"EventingSyncCompletedEvent"},"EventingSyncFailedEvent":{"type":"object","properties":{"error":{"type":"string"},"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"target_connection_id":{"type":"string","format":"uuid"}},"title":"EventingSyncFailedEvent"},"EventingSyncCanceledEvent":{"type":"object","properties":{"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/UtilExecutionStatus"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"target_connection_id":{"type":"string","format":"uuid"}},"title":"EventingSyncCanceledEvent"},"EventingSyncCompletedWithErrorsEvent":{"type":"object","properties":{"error":{"type":"string"},"execution_id":{"type":"string","format":"uuid"},"number_of_errors":{"type":"integer","format":"int64"},"number_of_warnings":{"type":"integer","format":"int64"},"organization_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"target_connection_id":{"type":"string","format":"uuid"}},"title":"EventingSyncCompletedWithErrorsEvent"},"EventingBulkSyncRunningEvent":{"type":"object","properties":{"destination_connection_id":{"type":"string","format":"uuid"},"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"source_connection_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"}},"title":"EventingBulkSyncRunningEvent"},"EventingBulkSyncCompletedEvent":{"type":"object","properties":{"destination_connection_id":{"type":"string","format":"uuid"},"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"source_connection_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"trigger_source":{"type":"string"}},"title":"EventingBulkSyncCompletedEvent"},"EventingBulkSyncCanceledEvent":{"type":"object","properties":{"destination_connection_id":{"type":"string","format":"uuid"},"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"source_connection_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"}},"title":"EventingBulkSyncCanceledEvent"},"EventingBulkSyncCompletedWithErrorEvent":{"type":"object","properties":{"destination_connection_id":{"type":"string","format":"uuid"},"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"source_connection_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"trigger_source":{"type":"string"}},"title":"EventingBulkSyncCompletedWithErrorEvent"},"EventingBulkSyncFailedEvent":{"type":"object","properties":{"destination_connection_id":{"type":"string","format":"uuid"},"error":{"type":"string"},"execution_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"source_connection_id":{"type":"string","format":"uuid"},"sync_id":{"type":"string","format":"uuid"},"sync_name":{"type":"string"},"trigger_source":{"type":"string"}},"title":"EventingBulkSyncFailedEvent"},"EventPayload":{"oneOf":[{"$ref":"#/components/schemas/EventingSyncRunningEvent"},{"$ref":"#/components/schemas/EventingSyncCompletedEvent"},{"$ref":"#/components/schemas/EventingSyncFailedEvent"},{"$ref":"#/components/schemas/EventingSyncCanceledEvent"},{"$ref":"#/components/schemas/EventingSyncCompletedWithErrorsEvent"},{"$ref":"#/components/schemas/EventingBulkSyncRunningEvent"},{"$ref":"#/components/schemas/EventingBulkSyncCompletedEvent"},{"$ref":"#/components/schemas/EventingBulkSyncCanceledEvent"},{"$ref":"#/components/schemas/EventingBulkSyncCompletedWithErrorEvent"},{"$ref":"#/components/schemas/EventingBulkSyncFailedEvent"}],"title":"EventPayload"},"Event":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","description":"Timestamp the event was emitted."},"event":{"$ref":"#/components/schemas/EventPayload"},"id":{"type":"string","format":"uuid","description":"Unique identifier of the event."},"organization_id":{"type":"string","format":"uuid","description":"Organization the event belongs to."},"type":{"type":"string","description":"Event type identifier."}},"title":"Event"},"EventsEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Event"}}},"title":"EventsEnvelope"},"EventTypesEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"type":"string"}}},"title":"EventTypesEnvelope"},"Webhook":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"disabled":{"type":"boolean"},"endpoint":{"type":"string"},"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"secret":{"type":"string"}},"title":"Webhook"},"WebhookListEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Webhook"}}},"title":"WebhookListEnvelope"},"CreateWebhooksSchema":{"type":"object","properties":{"endpoint":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"secret":{"type":"string"}},"required":["endpoint","secret"],"title":"CreateWebhooksSchema"},"WebhookEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}},"title":"WebhookEnvelope"},"UpdateWebhooksSchema":{"type":"object","properties":{"endpoint":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"secret":{"type":"string"}},"required":["endpoint","secret"],"title":"UpdateWebhooksSchema"},"JobResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JobResponse"}},"title":"JobResponseEnvelope"},"GetIdentityResponseSchema":{"type":"object","properties":{"email":{"type":"string","description":"The email of the caller."},"id":{"type":"string","format":"uuid","description":"The ID of the caller; this will be omitted for non-user callers."},"is_organization":{"type":"boolean","description":"Whether the caller is using an organization key."},"is_partner":{"type":"boolean","description":"Whether the caller is using a partner key."},"is_system":{"type":"boolean","description":"Whether the caller is a system actor."},"is_user":{"type":"boolean","description":"Whether the caller is a user."},"organization_id":{"type":"string","format":"uuid","description":"The ID of the organization the caller belongs to."},"organization_name":{"type":"string","description":"The name of the organization the caller belongs to."},"role":{"type":"string","description":"Deprecated legacy role name. Populated only for user callers."}},"title":"GetIdentityResponseSchema"},"GetIdentityResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetIdentityResponseSchema"}},"title":"GetIdentityResponseEnvelope"},"Organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization."},"issuer":{"type":"string","description":"OIDC issuer URL for organizations using OpenID Connect single sign-on."},"name":{"type":"string","description":"Human-readable name of the organization."},"sso_domain":{"type":"string","description":"Email domain used to match users to this organization during SSO sign-in."},"sso_org_id":{"type":"string","description":"WorkOS organization identifier linking this organization to its SAML/SSO configuration."}},"title":"Organization"},"OrganizationEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Organization"}},"title":"OrganizationEnvelope"},"OrganizationsEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Organization"}}},"title":"OrganizationsEnvelope"},"CreateOrganizationRequestSchema":{"type":"object","properties":{"client_id":{"type":"string","description":"OIDC client ID issued by the identity provider."},"client_secret":{"type":"string","description":"OIDC client secret issued by the identity provider. Write-only; never returned in responses."},"issuer":{"type":"string","description":"OIDC issuer URL for organizations using OpenID Connect single sign-on."},"name":{"type":"string","description":"Human-readable name of the organization. Must be unique across the partner account."},"sso_domain":{"type":"string","description":"Email domain used to match users to this organization during SSO sign-in."},"sso_org_id":{"type":"string","description":"WorkOS organization identifier linking this organization to its SAML/SSO configuration."}},"required":["name"],"title":"CreateOrganizationRequestSchema"},"UpdateOrganizationRequestSchema":{"type":"object","properties":{"client_id":{"type":"string","description":"OIDC client ID issued by the identity provider."},"client_secret":{"type":"string","description":"OIDC client secret issued by the identity provider. Write-only; never returned in responses."},"issuer":{"type":"string","description":"OIDC issuer URL for organizations using OpenID Connect single sign-on."},"name":{"type":"string","description":"Human-readable name of the organization. Must be unique across the partner account."},"sso_domain":{"type":"string","description":"Email domain used to match users to this organization during SSO sign-in."},"sso_org_id":{"type":"string","description":"WorkOS organization identifier linking this organization to its SAML/SSO configuration."}},"required":["name"],"title":"UpdateOrganizationRequestSchema"},"User":{"type":"object","properties":{"email":{"type":"string","description":"Email address used to sign in and receive notifications."},"id":{"type":"string","format":"uuid","description":"Unique identifier of the user."},"organization_id":{"type":"string","format":"uuid","description":"Unique identifier of the organization the user belongs to."},"role":{"type":"string","description":"Deprecated legacy role name. Use role_ids instead."},"role_ids":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"Identifiers of the permissions roles assigned to the user."}},"title":"User"},"ListUsersEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/User"}}},"title":"ListUsersEnvelope"},"CurrentOrgCreateUserRequestSchema":{"type":"object","properties":{"email":{"type":"string","description":"Email address used to sign the user in and receive notifications."},"role":{"type":"string","description":"Deprecated legacy role name. Use role_ids instead; setting both role and role_ids in the same request is rejected."},"role_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Identifiers of the permissions roles to assign to the user. Must contain at least one entry when provided."}},"required":["email"],"title":"CurrentOrgCreateUserRequestSchema"},"UserEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/User"}},"title":"UserEnvelope"},"CurrentOrgUpdateUserRequestSchema":{"type":"object","properties":{"role":{"type":"string","description":"Deprecated legacy role name. Use role_ids instead."},"role_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Identifiers of the permissions roles to assign to the user. Must contain at least one entry when provided."}},"title":"CurrentOrgUpdateUserRequestSchema"},"CreateUserRequestSchema":{"type":"object","properties":{"email":{"type":"string","description":"Email address used to sign the user in and receive notifications."},"role":{"type":"string","description":"Deprecated legacy role name. Use role_ids instead; setting both role and role_ids in the same request is rejected."},"role_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Identifiers of the permissions roles to assign to the user. Must contain at least one entry when provided."}},"required":["email"],"title":"CreateUserRequestSchema"},"UpdateUserRequestSchema":{"type":"object","properties":{"email":{"type":"string","description":"Email address used to sign the user in and receive notifications."},"role":{"type":"string","description":"Deprecated legacy role name. Use role_ids instead; setting both role and role_ids in the same request is rejected."},"role_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Identifiers of the permissions roles to assign to the user. Must contain at least one entry when provided."}},"required":["email"],"title":"UpdateUserRequestSchema"},"APIKeyResponse":{"type":"object","properties":{"value":{"type":"string","description":"Newly created API key. This value is shown only once; store it securely."}},"title":"APIKeyResponse"},"APIKeyResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/APIKeyResponse"}},"title":"APIKeyResponseEnvelope"},"PolicyAction":{"type":"object","properties":{"action":{"type":"string"},"role_ids":{"type":["array","null"],"items":{"type":"string","format":"uuid"}}},"required":["action","role_ids"],"title":"PolicyAction"},"PolicyResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"organization_id":{"type":"string","format":"uuid"},"policy_actions":{"type":"array","items":{"$ref":"#/components/schemas/PolicyAction"}},"system":{"type":"boolean"}},"title":"PolicyResponse"},"ListPoliciesResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PolicyResponse"}}},"title":"ListPoliciesResponseEnvelope"},"CreatePolicyRequest":{"type":"object","properties":{"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"policy_actions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PolicyAction"}}},"required":["name","policy_actions"],"title":"CreatePolicyRequest"},"PolicyResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PolicyResponse"}},"title":"PolicyResponseEnvelope"},"UpdatePolicyRequest":{"type":"object","properties":{"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"},"policy_actions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PolicyAction"}}},"required":["name","policy_actions"],"title":"UpdatePolicyRequest"},"RoleResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"organization_id":{"type":"string","format":"uuid"},"system":{"type":"boolean"}},"title":"RoleResponse"},"RoleListResponseEnvelope":{"type":"object","properties":{"data":{"type":["array","null"],"items":{"$ref":"#/components/schemas/RoleResponse"}}},"title":"RoleListResponseEnvelope"},"CreateRoleRequest":{"type":"object","properties":{"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"}},"required":["name"],"title":"CreateRoleRequest"},"RoleResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RoleResponse"}},"title":"RoleResponseEnvelope"},"UpdateRoleRequest":{"type":"object","properties":{"name":{"type":"string"},"organization_id":{"type":["string","null"],"format":"uuid"}},"required":["name"],"title":"UpdateRoleRequest"},"EntityRelationship":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID of the related resource."},"path":{"type":"string","description":"Canonical REST path of the related resource."}},"title":"EntityRelationship"},"EntityResponse":{"type":"object","properties":{"canonical_path":{"type":"string","description":"Canonical REST path for the resolved resource, suitable for fetching it directly."},"context":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Lightweight additional context about the resolved entity, such as bulk sync schema_ids."},"id":{"type":"string","format":"uuid","description":"UUID that was resolved."},"organization_id":{"type":"string","format":"uuid","description":"Organization that owns the resolved resource. Omitted from responses on the user-scoped endpoint."},"relationships":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EntityRelationship"},"description":"Parent resources needed to address nested resources, keyed by relationship name (e.g. \"sync\", \"bulk_sync\")."},"type":{"type":"string","description":"Resolved entity type. One of: organization, user, connection, model, sync, sync_execution, bulk_sync, bulk_sync_execution."}},"title":"EntityResponse"},"EntityResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntityResponse"}},"title":"EntityResponseEnvelope"},"GlobalErrorSubscribersResponse":{"type":"object","properties":{"emails":{"type":["array","null"],"items":{"type":"string"},"description":"Email addresses subscribed to global sync error notifications for the organization."}},"title":"GlobalErrorSubscribersResponse"},"GlobalErrorSubscribersRequest":{"type":"object","properties":{"emails":{"type":["array","null"],"items":{"type":"string"},"description":"Email addresses to subscribe to global sync error notifications. Replaces the current subscriber list; pass an empty list to unsubscribe everyone."}},"title":"GlobalErrorSubscribersRequest"}},"securitySchemes":{"bearerUserAPIKey":{"type":"http","scheme":"bearer","description":"Bearer user API key"},"orgScopedAPIKey":{"type":"http","scheme":"basic","description":"Basic organization-scoped API key"},"bearerPartnerKey":{"type":"http","scheme":"bearer","description":"Bearer partner API key"}}}}