create_party
Create a person or organisation record in Capsule CRM, setting names, contact details, custom fields, and ownership.
Instructions
Create a new person or organisation in Capsule CRM. For type='person', firstName or lastName is required (one suffices); the name field is silently ignored. For type='organisation', name is required and firstName/lastName/title/jobTitle are silently ignored. Passing organisationId pointing at a non-organisation party (e.g. another person's id) returns 404 'organisation not found' — Capsule filters lookups by type. Accepts ownerId and teamId to set ownership at create time; both are optional and Capsule defaults owner to the API-token user when omitted (team has no default).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| firstName | No | ||
| lastName | No | ||
| title | No | ||
| jobTitle | No | ||
| organisationId | No | Link person to an existing organisation ID | |
| name | No | ||
| about | No | ||
| emailAddresses | No | APPEND-ONLY: items are merged into the existing list, never replaced. For atomic add/remove/replace use add_party_email_address and remove_party_email_address_by_id. Passing `[]` here is a silent no-op (does not clear the list and does not advance updatedAt). | |
| phoneNumbers | No | APPEND-ONLY: items are merged into the existing list, never replaced. For atomic add/remove/replace use add_party_phone_number and remove_party_phone_number_by_id. | |
| addresses | No | APPEND-ONLY: items are merged into the existing list, never replaced. For atomic add/remove/replace use add_party_address and remove_party_address_by_id. The `country` field is mapped through Capsule's country dictionary — see `add_party_address.country` for the dictionary edges (small canonical-English-name list; inputs not in the dictionary are REJECTED with 422, not silently dropped). | |
| websites | No | APPEND-ONLY: items are merged into the existing list, never replaced. For atomic add/remove/replace use add_party_website and remove_party_website_by_id. | |
| ownerId | No | Assign to user ID. Defaults to the API-token owner when omitted. To create a team-owned party with no specific user, first create the party, then call update_party with `ownerId: null` and `teamId`. | |
| teamId | No | Assign to team ID (discover via list_teams). Omit to leave team unset on create. To clear an existing team or create a team-owned party with no specific owner, use update_party after creation. | |
| fields | No | Set custom field values on this record. PARTIAL UPDATE: only the definitions you list are touched; any field NOT in this array is left unchanged. Discover available definitions via list_custom_fields; read current values via get_party with embed='fields'. Verified empirically in v1.6.5 wire-trace: Capsule's POST /parties accepts the same `fields[]` shape as PUT, so callers can set custom field values on creation without a follow-up update. |