> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automatebusiness.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> Architecture, envelopes, pagination, and error codes for the Automate CRM Integration API.

The Automate CRM Integration API enables programmatic management of your leads, contacts, products, follow-ups, custom fields, and real-time inbox lookups.

## Base URL

All requests must be made against the following integration base URL:

```text theme={null}
https://crm-api.automatebusiness.com/api/v1/integrations-public
```

> [!NOTE]
>
> The API key passed in the `x-api-key` header determines your workspace. Do not add a workspace ID to request paths or request bodies.

You can generate and manage integration API keys in your CRM settings.

![API keys management modal displaying workspace secret key generation and active API keys](https://mintcdn.com/automatebusiness/OFwTsewf58VxBW78/images/automate-crm/crm-api-reference.png?fit=max\&auto=format\&n=OFwTsewf58VxBW78\&q=85\&s=4e5702c0809901a5905e1892a1595f4a)

## Response envelopes

The API enforces strict response contracts depending on whether the operation is a read (`GET`) or a mutation (`POST`, `PATCH`, `PUT`, `DELETE`).

### Read success envelope (`GET`)

All read endpoints return a standardized metadata envelope containing status, code, message, payload data, and timestamp:

```json theme={null}
{
  "status": "success",
  "code": 200,
  "message": "Integrations public retrieved successfully",
  "data": {},
  "timestamp": "2026-10-26T10:00:00.000Z"
}
```

### Mutation success envelope (`POST`, `PATCH`, `PUT`, `DELETE`)

All mutations return a lightweight envelope indicating operation success:

```json theme={null}
{
  "success": true,
  "data": {},
  "error": null
}
```

### Error envelope

When a request cannot be completed, the API responds with an error envelope containing actionable feedback and specific field failure details:

```json theme={null}
{
  "success": false,
  "data": null,
  "error": {
    "message": "Validation failed",
    "details": [
      {
        "message": "Required",
        "field": "email",
        "code": "invalid_type"
      }
    ]
  }
}
```

## HTTP status codes

| Status code | Meaning | Description |
| - | - | - |
| `200 OK` | Success | The read or update request succeeded. |
| `201 Created` | Created | A new resource was successfully created. |
| `400 Bad Request` | Validation Error | The request body or query parameter was malformed or missing required fields. |
| `401 Unauthorized` | Invalid Key | The `x-api-key` header was missing, invalid, or expired. |
| `403 Forbidden` | Insufficient Scope | The API key lacks the required `crm:read` or `crm:write` scope. |
| `404 Not Found` | Resource Missing | The requested record or endpoint was not found. |
| `409 Conflict` | Resource Conflict | A unique constraint was violated (such as duplicate product codes). |
| `429 Too Many Requests` | Rate Limited | You have exceeded the permitted rate limits. |
| `503 Service Unavailable` | Service Outage | The CRM service is temporarily unable to process the request. |

## Pagination and filtering

List endpoints for entities (Leads, Contacts, Products) and Follow-ups support standard query pagination parameters:

* `page`: 1-based page number to retrieve. Defaults to `1`.
* `limit`: Number of items per page. Defaults to `20`. Maximum permitted limit is `200`.
* `search`: Keyword string to match against entity primary fields (such as name, email, phone, or title).

Records are returned in descending chronological order (**newest first**).

> [!NOTE]
>
> Custom-field list endpoints do not paginate; they always return all custom field definitions registered for that entity type in your workspace.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.