Customer Contacts
Named contacts on a customer record (e.g. for the customer portal). Uses the customers.* scope.
GET
/api/v1/customer-contactsList customer contacts
Scope:
customers.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | Optional | 1-based page number. |
limit | query | number | Optional | Page size, max 200. |
q | query | string | Optional | Free-text search. |
customerId | query | string | Optional | Filter to one customer's contacts. |
Example request
curl "https://invoice.avscorp.in/api/v1/customer-contacts" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx6cnt00000000000000001",
"organizationId": "clx0org000000000000000001",
"customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
"name": "Priya Sharma",
"email": "priya.sharma@example.com",
"phone": "+919876543210",
"roleLabel": "Accounts Payable",
"isPrimary": false,
"enabled": true,
"invitedAt": null,
"lastLoginAt": null,
"createdAt": "2026-02-15T05:45:00.000Z",
"updatedAt": "2026-02-15T05:45:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
POST
/api/v1/customer-contactsCreate a customer contact
Scope:
customers.updateRequest body
| Field | Type | Required | Constraints |
|---|---|---|---|
customerId | string | Required | min length 1 |
name | string | Required | min length 1; max length 120 |
email | any | Required | — |
phone | any | Required | — |
roleLabel | any | Required | — |
Example request
curl -X POST "https://invoice.avscorp.in/api/v1/customer-contacts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
"name": "Priya Sharma",
"email": "priya.sharma@example.com",
"phone": null,
"roleLabel": null
}'Example response
JSON
{
"id": "clx6cnt00000000000000001",
"organizationId": "clx0org000000000000000001",
"customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
"name": "Priya Sharma",
"email": "priya.sharma@example.com",
"phone": "+919876543210",
"roleLabel": "Accounts Payable",
"isPrimary": false,
"enabled": true,
"invitedAt": null,
"lastLoginAt": null,
"createdAt": "2026-02-15T05:45:00.000Z",
"updatedAt": "2026-02-15T05:45:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, validation_error, not_found
GET
/api/v1/customer-contacts/{id}Get a customer contact
Scope:
customers.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Contact ID. |
Example request
curl "https://invoice.avscorp.in/api/v1/customer-contacts/clx6cnt00000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx6cnt00000000000000001",
"organizationId": "clx0org000000000000000001",
"customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
"name": "Priya Sharma",
"email": "priya.sharma@example.com",
"phone": "+919876543210",
"roleLabel": "Accounts Payable",
"isPrimary": false,
"enabled": true,
"invitedAt": null,
"lastLoginAt": null,
"createdAt": "2026-02-15T05:45:00.000Z",
"updatedAt": "2026-02-15T05:45:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found
PATCH
/api/v1/customer-contacts/{id}Update a customer contact
Scope:
customers.updateParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Contact ID. |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Optional | min length 1; max length 120 |
email | any | Optional | — |
phone | any | Optional | — |
roleLabel | any | Optional | — |
Example request
curl -X PATCH "https://invoice.avscorp.in/api/v1/customer-contacts/clx6cnt00000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"roleLabel": "Accounts Payable"
}'Example response
JSON
{
"id": "clx6cnt00000000000000001",
"organizationId": "clx0org000000000000000001",
"customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
"name": "Priya Sharma",
"email": "priya.sharma@example.com",
"phone": "+919876543210",
"roleLabel": "Accounts Payable",
"isPrimary": false,
"enabled": true,
"invitedAt": null,
"lastLoginAt": null,
"createdAt": "2026-02-15T05:45:00.000Z",
"updatedAt": "2026-02-15T05:45:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found, validation_error
DELETE
/api/v1/customer-contacts/{id}Disable a customer contact
Scope:
customers.updateThis is a soft-disable (enabled set to false), not a hard delete — the contact record is retained.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Contact ID. |
Example request
curl -X DELETE "https://invoice.avscorp.in/api/v1/customer-contacts/clx6cnt00000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"deleted": true
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found