Create a custom data definition
Creates a custom data definition — the schema for a new custom object. The definition declares its name, optional description, the fields it accepts (typed columns), an optional unique_keys composite key (used for upsert resolution by saveCustomDataRecords), and optional relationships linking source fields to system schemas (contacts, products) or to other custom schemas. New definitions are created in active status. The name must be unique. When a relationship omits targetField, the server auto-assigns the canonical key: id for custom schemas, id_contact for contacts, product_id for products.
Parameters
Header Parameters
[Authentication] Required API key.
"^[a-zA-Z0-9-]{20,64}$"Request Body
Responses
Custom data definition created successfully
Create a custom data definition Creates a custom data definition — the schema for a new custom object. The definition declares its name, optional description, the fields it accepts (typed columns), an optional unique_keys composite key (used for upsert resolution by saveCustomDataRecords), and optional relationships linking source fields to system schemas (contacts, products) or to other custom schemas. New definitions are created in active status. The name must be unique. When a relationship omits targetField, the server auto-assigns the canonical key: id for custom schemas, id_contact for contacts, product_id for products. POST /v1/custom-data-definitions createCustomDataDefinition Custom data definitions spm-api-key [Authentication] Required API key. Custom data definition created successfully Client error - Invalid request or authentication issues Server error - Internal processing failure