Create record
Code Mode: praxis.crm.objects.create
HTTP: POST /crm/v1/objects/{objectType}
Create a customer record with property values and optional initial associations. Discover objectType with schemas.list and allowed property names with properties.list; save the returned id for subsequent calls. Each call creates a record. Example for contacts: {“properties”:{“email”:“person@example.com”}}. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
Signature
praxis.crm.objects.create(args:{path:{objectType:string};body:{/** Initial relationships to existing records; choose destination ids and association type ids before creating the record. */ associations:Array<{/** Destination record identifier for this relationship, using an id from objects.list or objects.search. */ to:{/** The unique ID of the object. */ id:string};/** Association specifications describing how the source record relates to the destination record. */ types:Array<{/** The category of the association, such as "HUBSPOT_DEFINED". e.g. "HUBSPOT_DEFINED" */ associationCategory:"HUBSPOT_DEFINED"|"INTEGRATOR_DEFINED"|"USER_DEFINED"|"WORK";/** The ID representing the specific type of association. e.g. 0 */ associationTypeId:number}>}>;/** Key-value pairs for setting properties for the new object. */ properties:{[key:string]:string}}}):Promise<({/** Whether the object is archived. */ archived:boolean;/** The timestamp when the object was archived, in ISO 8601 format. e.g. "2026-10-29T12:00:00Z" */ archivedAt?:string;/** The timestamp when the object was created, in ISO 8601 format. e.g. "2026-10-29T12:00:00Z" */ createdAt:string;/** The unique ID of the object. */ id:string;/** An identifier used for tracing the write request for the object. */ objectWriteTraceId?:string;/** Key-value pairs representing the properties of the object. */ properties:{[key:string]:string|null};/** Key-value pairs representing the properties of the object along with their history. */ propertiesWithHistory?:{[key:string]:Array<{/** Identifier of the source that recorded this property value. */ sourceId?:string;/** A human-readable label. */ sourceLabel?:string;/** Source category that produced this historic property value. */ sourceType:string;/** The timestamp when the property was updated, in ISO 8601 format. e.g. "2026-10-29T12:00:00Z" */ timestamp:string;/** The ID of the user who last updated the property. e.g. 0 */ updatedByUserId?:number;/** Property value recorded at timestamp, represented as a string. */ value:string}>};/** The timestamp when the object was last updated, in ISO 8601 format. e.g. "2026-10-29T12:00:00Z" */ updatedAt:string;/** Direct URL for this object in the portal */ url?:string})&({/** Affected record references for rendering entity cards in conversations; may be empty for definition-only writes. */ refs:Array<{/** Object type containing the referenced record; use with objects.retrieve. e.g. "deals" */ object:string;/** Record identifier to retrieve with object; obtained from the write result. e.g. "rec_example" */ id:string;/** Console URL for opening the entity card in a conversation or viewing the record. e.g. "https://console.deepraxis.com/crm/deals/rec_example" */ viewer_url:string;/** Optional property changes to render alongside the entity card. */ changes?:Array<{/** Internal name of the property changed by this request. */ property:string;/** Value before the change; null means the property was empty. */ before:string|null;/** Value committed by the change; null means the property was cleared. */ after:string|null}>}>})>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| objectType | path | string | yes | Object type name from schemas.list, such as contacts, companies, deals or a custom p_<name>. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json | Values for create record; use internal property names and resource ids from the corresponding list operations. |
Responses
| Status | Content types | Description |
|---|---|---|
| 201 | application/json | Create record succeeded; inspect the returned resource or result collection. |
| 400 | application/json | VALIDATION_ERROR rejects invalid properties or stage rules; supply errors[0].context.properties when requirements are missing, or choose an allowed stage. BAD_REQUEST rejects malformed input; correct the request before retrying. |
| 401 | application/json | The bearer credential is missing or invalid; provide a valid platform API key before retrying. |
| 404 | application/json | OBJECT_NOT_FOUND means an object type, record or definition is unavailable in your organization; select an accessible identifier from its list operation. |
| 409 | application/json | CONFLICT means a unique value is already used or a change-set reversal would overwrite a later value; read the current records and resolve the conflicting values before retrying. |