Crm API
Manage contacts, pipeline, and activity.
Generated from the Celerp 2.4.0 OpenAPI schema, 16 September 2026.
GET /crm/contacts
List Contacts
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
q | query | -- | string | -- |
limit | query | -- | integer | -- |
offset | query | -- | integer | -- |
contact_type | query | -- | string, optional | -- |
include_deleted | query | -- | boolean | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/crm/contacts \
-H "Authorization: Bearer $TOKEN"POST /crm/contacts
Create Contact
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name |
company_name | string, optional | -- | Company Name |
website | string, optional | -- | Website |
currency | string, optional | -- | Currency |
email | string, optional | -- | |
phone | string, optional | -- | Phone |
billing_address | string, optional | -- | Billing Address |
shipping_address | string, optional | -- | Shipping Address |
contact_type | string | -- | Contact Type |
attributes | object | -- | Attributes |
idempotency_key | string, optional | -- | Idempotency Key |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'POST /crm/contacts/bulk/delete
Bulk Delete Contacts
Request body
| Field | Type | Required | Description |
|---|---|---|---|
contact_ids | array of string | yes | Contact Ids |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/bulk/delete \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'GET /crm/contacts/export/csv
Export Contacts Csv
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
q | query | -- | string, optional | -- |
selected | query | -- | array of string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | -- |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/crm/contacts/export/csv \
-H "Authorization: Bearer $TOKEN"POST /crm/contacts/import
Import Contact
Accept only the canonical contact-create CIF snapshot transport.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
entity_id | string | yes | Entity Id |
event_type | string | yes | Event Type |
data | object | yes | Data |
source | string | yes | Source |
idempotency_key | string | yes | Idempotency Key |
source_ts | string, optional | -- | Source Ts |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/import \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'POST /crm/contacts/import/batch
Batch Import Contacts
Batch-import CIF contact records. Idempotent on idempotency_key. Max 500 per call.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
records | array of CRMImportRecord | yes | Records |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | celerp_contacts__routes__BatchImportResult |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/import/batch \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'POST /crm/contacts/merge
Merge Contacts
Request body
| Field | Type | Required | Description |
|---|---|---|---|
target_contact_id | string | yes | Target Contact Id |
source_contact_ids | array of string | yes | Source Contact Ids |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/merge \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'GET /crm/contacts/{contact_id}
Get Contact
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/crm/contacts/:contact_id \
-H "Authorization: Bearer $TOKEN"PATCH /crm/contacts/{contact_id}
Update Contact
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
fields_changed | object | -- | Fields Changed |
idempotency_key | string, optional | -- | Idempotency Key |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/crm/contacts/:contact_id \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'POST /crm/contacts/{contact_id}/addresses
Add Contact Address
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
address_type | string | -- | Address Type |
line1 | string, optional | -- | Line1 |
line2 | string, optional | -- | Line2 |
city | string, optional | -- | City |
state | string, optional | -- | State |
postal_code | string, optional | -- | Postal Code |
country | string, optional | -- | Country |
attn | string, optional | -- | Attn |
is_default | boolean | -- | Is Default |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/:contact_id/addresses \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'PATCH /crm/contacts/{contact_id}/addresses/{address_id}
Update Contact Address
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
address_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
address_type | string, optional | -- | Address Type |
line1 | string, optional | -- | Line1 |
line2 | string, optional | -- | Line2 |
city | string, optional | -- | City |
state | string, optional | -- | State |
postal_code | string, optional | -- | Postal Code |
country | string, optional | -- | Country |
attn | string, optional | -- | Attn |
is_default | boolean, optional | -- | Is Default |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/crm/contacts/:contact_id/addresses/:address_id \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'DELETE /crm/contacts/{contact_id}/addresses/{address_id}
Remove Contact Address
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
address_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X DELETE http://localhost:8000/crm/contacts/:contact_id/addresses/:address_id \
-H "Authorization: Bearer $TOKEN"POST /crm/contacts/{contact_id}/files
Upload Contact File
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/:contact_id/files \
-H "Authorization: Bearer $TOKEN"GET /crm/contacts/{contact_id}/files/{file_id}
Download Contact File
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
file_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | -- |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/crm/contacts/:contact_id/files/:file_id \
-H "Authorization: Bearer $TOKEN"DELETE /crm/contacts/{contact_id}/files/{file_id}
Delete Contact File
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
file_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X DELETE http://localhost:8000/crm/contacts/:contact_id/files/:file_id \
-H "Authorization: Bearer $TOKEN"PATCH /crm/contacts/{contact_id}/files/{file_id}/description
Update Contact File Description
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
file_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/crm/contacts/:contact_id/files/:file_id/description \
-H "Authorization: Bearer $TOKEN"POST /crm/contacts/{contact_id}/files/{file_id}/tag
Tag Contact File
Update the document_tag on an existing uploaded file.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
file_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/:contact_id/files/:file_id/tag \
-H "Authorization: Bearer $TOKEN"GET /crm/contacts/{contact_id}/notes
List Contact Notes
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | array of object |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/crm/contacts/:contact_id/notes \
-H "Authorization: Bearer $TOKEN"POST /crm/contacts/{contact_id}/notes
Add Contact Note
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
note | string | yes | Note |
idempotency_key | string, optional | -- | Idempotency Key |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/:contact_id/notes \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'PATCH /crm/contacts/{contact_id}/notes/{note_id}
Update Contact Note
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
note_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
note | string | yes | Note |
idempotency_key | string, optional | -- | Idempotency Key |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/crm/contacts/:contact_id/notes/:note_id \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'DELETE /crm/contacts/{contact_id}/notes/{note_id}
Delete Contact Note
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
note_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X DELETE http://localhost:8000/crm/contacts/:contact_id/notes/:note_id \
-H "Authorization: Bearer $TOKEN"POST /crm/contacts/{contact_id}/people
Add Contact Person
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name |
role | string, optional | -- | Role |
email | string, optional | -- | |
phone | string, optional | -- | Phone |
is_primary | boolean | -- | Is Primary |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/:contact_id/people \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'PATCH /crm/contacts/{contact_id}/people/{person_id}
Update Contact Person
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
person_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string, optional | -- | Name |
role | string, optional | -- | Role |
email | string, optional | -- | |
phone | string, optional | -- | Phone |
is_primary | boolean, optional | -- | Is Primary |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/crm/contacts/:contact_id/people/:person_id \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'DELETE /crm/contacts/{contact_id}/people/{person_id}
Remove Contact Person
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
person_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X DELETE http://localhost:8000/crm/contacts/:contact_id/people/:person_id \
-H "Authorization: Bearer $TOKEN"POST /crm/contacts/{contact_id}/tags
Tag Contact
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | -- |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
tags | array of string | yes | Tags |
idempotency_key | string, optional | -- | Idempotency Key |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/crm/contacts/:contact_id/tags \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'