Create Model
Creates a new model.
A model defines a query or view over a connection’s data — for example, a SQL query, a filtered object, or a joined dataset. Models are used as sources when creating model syncs.
The connection referenced by connection_id must have source capabilities. Use
GET /api/connection_types/{id} to check
whether a connection type supports use as a source.
Authentication
AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic
Basic organization-scoped API key
Headers
X-Polytomic-Version
Query parameters
async
Run in the background and return a job instead of the result.
Request
This endpoint expects an object.
configuration
Model configuration for the source connection type
connection_id
Connection ID of the model's source
name
Model name
additional_fields
User-defined fields to add to the model alongside its source fields
enricher
Enrichment to apply to the model
fields
Technical/source field names to publish in the model. Use source names, not model-field UUIDs or display labels. For example, use dealname rather than Deal Name. Omit or pass an empty array to publish all standard source fields.
identifier
Source field name of the model's unique identifier
labels
organization_id
policies
Permissions policy IDs applied to the model
relations
Joins from this model's fields to fields on other models
tracking_columns
Source field names used to detect changed records
Response
OK
data
The model
job
Background job running the request when async is true
Errors
400
Bad Request Error
403
Forbidden Error
500
Internal Server Error
