Skip to main content
Accounts

Endpoints

Available endpoints for managing accounts.
MethodPathDescription
GET/api/accounts/List accounts
POST/api/accounts/Create an account
GET/api/accounts/{id}/Get an account
PATCH/api/accounts/{id}/Update an account
DELETE/api/accounts/{id}/Delete an account
GET/api/accounts/{id}/contacts/List contacts for an account

Accounts

List Accounts

GET /api/accounts/
Authorization: Bearer <token>
Retrieve a paginated list of accounts with optional filters.
Query Parameters:
ParameterTypeDescription
pageintegerPage number
limitintegerResults per page (max: 100)
stagestringFilter by account stage
industrystringFilter by industry
assignedTostringFilter by assigned user ID
searchstringSearch by company name or website
Response:
{
  "count": 34,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "acc_01HX...",
      "name": "Acme Corp",
      "website": "https://acme.com",
      "industry": "Manufacturing",
      "companySize": "51-200",
      "stage": "customer",
      "assignedTo": "usr_01HX...",
      "contactCount": 5,
      "openOpportunityCount": 2,
      "createdAt": "2024-11-01T09:00:00Z",
      "updatedAt": "2025-03-18T16:45:00Z"
    }
  ]
}

Creation

Create an Account

POST /api/accounts/
Authorization: Bearer <token>
Content-Type: application/json
Create a new account record with company details and associations.
Request body:
{
  "name": "TechCorp Inc",
  "website": "https://techcorp.com",
  "industry": "Software",
  "companySize": "201-500",
  "annualRevenue": 15000000,
  "stage": "prospect",
  "phone": "+15551234567",
  "billingAddress": {
    "street": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "postalCode": "94107",
    "country": "US"
  },
  "assignedTo": "usr_01HX...",
  "tags": ["enterprise", "saas"],
  "description": "Enterprise SaaS company focused on data analytics"
}
Required fields: name Response: 201 Created
Account Details

Get an Account

GET /api/accounts/{id}/
Authorization: Bearer <token>
Retrieve full account details including metrics and relationships.
Response:
{
  "id": "acc_01HX...",
  "name": "TechCorp Inc",
  "website": "https://techcorp.com",
  "industry": "Software",
  "companySize": "201-500",
  "annualRevenue": 15000000,
  "stage": "prospect",
  "phone": "+15551234567",
  "billingAddress": {
    "street": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "postalCode": "94107",
    "country": "US"
  },
  "assignedTo": "usr_01HX...",
  "assignedToName": "Alex Johnson",
  "tags": ["enterprise", "saas"],
  "description": "Enterprise SaaS company focused on data analytics",
  "contactCount": 0,
  "openOpportunityCount": 0,
  "openCaseCount": 0,
  "createdAt": "2025-03-15T14:00:00Z",
  "updatedAt": "2025-03-15T14:00:00Z"
}

Updates

Update an Account

PATCH /api/accounts/{id}/
Authorization: Bearer <token>
Content-Type: application/json
Update account fields such as stage, industry, or metadata.
Example:
{
  "stage": "active",
  "industry": "FinTech"
}
Response: 200 OK with the updated account object.
Deletion

Delete an Account

DELETE /api/accounts/{id}/
Authorization: Bearer <token>
Permanently remove an account.
Response: 204 No Content
Deleting an account does not delete linked contacts, opportunities, or cases. Those records remain in the CRM but lose their account association. To fully clean up, delete the linked records first.

Contacts

List Contacts for an Account

GET /api/accounts/{id}/contacts/
Authorization: Bearer <token>
Returns all contacts linked to the specified account.
Response:
{
  "count": 3,
  "results": [
    {
      "id": "cnt_01HX...",
      "firstName": "John",
      "lastName": "Smith",
      "email": "[email protected]",
      "title": "VP of Engineering",
      "stage": "customer"
    }
  ]
}

Stages

Account Stage Values

ValueLabel
prospectProspect
activeActive
customerCustomer
partnerPartner
churnedChurned