For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • API Reference
      • POSTUpsert Schema Fields
      • DELDelete Schema Field
      • PATCHPatch Schema Field
      • PUTSet Primary Keys
      • DELReset Primary Keys
      • POSTRefresh Connection Schema
      • GETGet Schema Status
      • GETGet Schema
      • GETGet Schema Records
Logo
Log inBook a demo
API ReferenceSchemas

Upsert Schema Fields

POST
https://app.polytomic.com/api/connections/:connection_id/schemas/:schema_id/fields
POST
/api/connections/:connection_id/schemas/:schema_id/fields
$curl -X POST https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/schemas/public.users/fields \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{}
Creates or updates user-defined fields on a schema, matched by field_id. Fields are matched by `field_id`. Reusing an existing `field_id` updates that field; using a new `field_id` creates a new user-defined field. This makes the endpoint safe to retry when you are intentionally upserting the same field definitions. It is not a patch-by-position operation. If some fields succeed and others fail, the endpoint can return a partial success response. Validate the response status and message rather than assuming the whole batch was applied uniformly.
Was this page helpful?
Previous

Delete Schema Field

Next

Creates or updates user-defined fields on a schema, matched by field_id.

Fields are matched by field_id. Reusing an existing field_id updates that field; using a new field_id creates a new user-defined field.

This makes the endpoint safe to retry when you are intentionally upserting the same field definitions. It is not a patch-by-position operation.

If some fields succeed and others fail, the endpoint can return a partial success response. Validate the response status and message rather than assuming the whole batch was applied uniformly.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Path parameters

connection_idstringRequiredformat: "uuid"
Unique identifier of the connection.
schema_idstringRequired
Identifier of the schema the fields belong to.

Headers

X-Polytomic-VersionstringOptional

Request

This endpoint expects an object.
fieldslist of objects or nullOptional

Fields to create or update on the schema. Existing user-defined fields with the same field_id are replaced.

Response headers

locationstring

Response

Accepted

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error