Skip to main content

Contacts API

Manage contacts associated with companies.

Endpoints

MethodPathAuthDescription
GET/contactsRequiredList contacts for a company
GET/contacts/{id}PublicGet a contact by ID
POST/contactsPublicCreate a contact
PATCH/contacts/{id}PublicUpdate a contact
DELETE/contacts/{id}RequiredDelete a contact

List Contacts

Returns all contacts for a specific company. Requires authentication and company ownership.
GET /contacts?company_id={uuid}

Query Parameters

ParameterTypeRequiredDefaultDescription
company_iduuidYesCompany ID to filter contacts
skipintNo0Number of records to skip
limitintNo100Max records to return

Response 200 OK

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "company_id": "7b3f1c2d-4e5a-6f7b-8c9d-0e1f2a3b4c5d",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@acme.com",
    "phone": "+91-9876543210",
    "designation": "Sales Manager",
    "is_primary": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
]

Errors

StatusDetail
403Not enough permissions to access this company’s contacts

Get Contact

Fetch a single contact by ID. No authentication required.
GET /contacts/{contact_id}

Response 200 OK

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "company_id": "7b3f1c2d-4e5a-6f7b-8c9d-0e1f2a3b4c5d",
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@acme.com",
  "phone": "+91-9876543210",
  "designation": "Sales Manager",
  "is_primary": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Errors

StatusDetail
404Contact not found

Create Contact

Create a new contact. Public endpoint — no authentication required.
POST /contacts

Request Body

{
  "company_id": "7b3f1c2d-4e5a-6f7b-8c9d-0e1f2a3b4c5d",
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@acme.com",
  "phone": "+91-9876543210",
  "designation": "Sales Manager",
  "is_primary": false
}

Fields

FieldTypeRequiredDescription
company_iduuidNoAssociate with a company
first_namestringYesFirst name
last_namestringNoLast name
emailstringYesEmail address
phonestringNoPhone number
designationstringNoJob title
is_primarybooleanNoMark as primary contact (default: false)

Response 201 Created

Returns the created contact object (same shape as Get Contact response).

Errors

StatusDetail
400Company not found

Update Contact

Partially update an existing contact. All fields are optional.
PATCH /contacts/{contact_id}

Request Body

{
  "designation": "Head of Sales",
  "is_primary": true
}

Response 200 OK

Returns the updated contact object.

Errors

StatusDetail
404Contact not found

Delete Contact

Permanently delete a contact.
DELETE /contacts/{contact_id}

Response 204 No Content

No body returned.

Errors

StatusDetail
404Contact not found

Rate Limits

EndpointLimit
POST /contacts60/min (public)
All other endpoints120/min (general)