---
title: "Compliance API reference"
url: "https://coldagentai.com/docs/api/compliance.md"
canonical_url: "https://coldagentai.com/docs/api/compliance"
last_updated: "2026-10-19"
type: "reference"
summary: "Set the postal address and sender identity that campaign email carries, and the public unsubscribe routes recipients reach from a message."
related: ["https://coldagentai.com/docs/api.md", "https://coldagentai.com/docs/authentication.md", "https://coldagentai.com/docs/errors.md", "https://coldagentai.com/docs/sending-and-compliance.md", "https://coldagentai.com/docs/api/blocklist.md"]
install: "claude mcp add --transport http coldagentai-free https://coldagentai.com/api/mcp"
---

# Compliance API reference

> **For AI agents:** the complete index of ColdAgentAI pages is [llms.txt](https://coldagentai.com/llms.txt). Every page is also served as markdown at its URL plus .md.

Set the postal address and sender identity that campaign email carries, and the public unsubscribe routes recipients reach from a message.

The postal address and sender identity every campaign email carries, and the public unsubscribe routes a recipient reaches from a message. 4 operations.

## Operations

Authenticate as described in [Authentication](https://coldagentai.com/docs/authentication.md). Every operation below is generated from the [OpenAPI document](https://coldagentai.com/docs/openapi.md).

| Method and path | Scope | What it does |
| --- | --- | --- |
| `GET /v1/account/compliance` | read | Postal address and sender identity |
| `PUT /v1/account/compliance` | write | Set the postal address and sender identity |
| `GET /unsubscribe/{token}` | public | Unsubscribe confirmation page |
| `POST /unsubscribe/{token}` | public | Unsubscribe (RFC 8058 one-click and confirmed) |

## GET /v1/account/compliance

Returns the postal address and sender identity printed in the footer of every campaign email.

Scope: `read`. A read key and a write key both work. Success: HTTP 200.

### Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `postal_address` | object or null | yes | Printed in the footer of every campaign email (CAN-SPAM). Campaigns cannot start without it. |
| `postal_address.line1` | string | yes | 1 to 200 characters. |
| `postal_address.line2` | string or null | no | 0 to 200 characters. |
| `postal_address.city` | string | yes | 1 to 100 characters. |
| `postal_address.region` | string or null | no | 0 to 100 characters. |
| `postal_address.postal_code` | string or null | no | 0 to 20 characters. |
| `postal_address.country` | string | yes | No further constraints. |
| `sender` | object or null | yes | Who the footer says the email is from. |
| `sender.company_name` | string | yes | 1 to 200 characters. |
| `sender.sender_name` | string or null | no | 0 to 200 characters. |
| `sender.reply_to` | value or null | no | No further constraints. |
| `ready_to_send` | boolean | yes | True when a postal address is set. |
| `updated_at` | string (date-time) or null | yes | No further constraints. |

Response example, HTTP 200:

```
{
  "postal_address": {
    "line1": "abc123",
    "line2": "abc123",
    "city": "abc123",
    "region": "abc123",
    "postal_code": "abc123",
    "country": "US"
  },
  "sender": {
    "company_name": "Example",
    "sender_name": "Example",
    "reply_to": {}
  },
  "ready_to_send": true,
  "updated_at": "2026-10-17T12:00:00.000Z"
}
```

### Errors

[`unauthorized`](https://coldagentai.com/docs/errors.md#unauthorized), [`rate_limited`](https://coldagentai.com/docs/errors.md#rate_limited), [`internal_error`](https://coldagentai.com/docs/errors.md#internal_error). Every error uses the [single format](https://coldagentai.com/docs/errors.md#format).

### Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. Over the limit the answer is `429 rate_limited` with `Retry-After`. See [Rate limits](https://coldagentai.com/docs/rate-limits.md).

### Examples

cURL:

```
curl "https://api.coldagentai.com/v1/account/compliance" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
```

JavaScript (fetch):

```
const res = await fetch(`https://api.coldagentai.com/v1/account/compliance`, {
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();
```

## PUT /v1/account/compliance

Sets the physical postal address that CAN-SPAM requires in every commercial email, and optionally the sender identity shown with it. Send either or both; a part you omit stays as it is. A campaign cannot start until the postal address is set.

Scope: `write`. A read key gets 403 forbidden. Success: HTTP 200.

### Request body

Send JSON with `Content-Type: application/json`. The body is required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `postal_address` | object | no | No further constraints. |
| `postal_address.line1` | string | yes | 1 to 200 characters. |
| `postal_address.line2` | string or null | no | 0 to 200 characters. |
| `postal_address.city` | string | yes | 1 to 100 characters. |
| `postal_address.region` | string or null | no | 0 to 100 characters. |
| `postal_address.postal_code` | string or null | no | 0 to 20 characters. |
| `postal_address.country` | string | yes | No further constraints. |
| `sender` | object | no | No further constraints. |
| `sender.company_name` | string | yes | 1 to 200 characters. |
| `sender.sender_name` | string or null | no | 0 to 200 characters. |
| `sender.reply_to` | string or null | no | 0 to 320 characters. |

Request example:

```
{
  "postal_address": {
    "line1": "abc123",
    "city": "abc123",
    "country": "US"
  },
  "sender": {
    "company_name": "Example"
  }
}
```

### Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `postal_address` | object or null | yes | Printed in the footer of every campaign email (CAN-SPAM). Campaigns cannot start without it. |
| `postal_address.line1` | string | yes | 1 to 200 characters. |
| `postal_address.line2` | string or null | no | 0 to 200 characters. |
| `postal_address.city` | string | yes | 1 to 100 characters. |
| `postal_address.region` | string or null | no | 0 to 100 characters. |
| `postal_address.postal_code` | string or null | no | 0 to 20 characters. |
| `postal_address.country` | string | yes | No further constraints. |
| `sender` | object or null | yes | Who the footer says the email is from. |
| `sender.company_name` | string | yes | 1 to 200 characters. |
| `sender.sender_name` | string or null | no | 0 to 200 characters. |
| `sender.reply_to` | value or null | no | No further constraints. |
| `ready_to_send` | boolean | yes | True when a postal address is set. |
| `updated_at` | string (date-time) or null | yes | No further constraints. |

Response example, HTTP 200:

```
{
  "postal_address": {
    "line1": "abc123",
    "line2": "abc123",
    "city": "abc123",
    "region": "abc123",
    "postal_code": "abc123",
    "country": "US"
  },
  "sender": {
    "company_name": "Example",
    "sender_name": "Example",
    "reply_to": {}
  },
  "ready_to_send": true,
  "updated_at": "2026-10-17T12:00:00.000Z"
}
```

### Errors

[`invalid_input`](https://coldagentai.com/docs/errors.md#invalid_input), [`unauthorized`](https://coldagentai.com/docs/errors.md#unauthorized), [`forbidden`](https://coldagentai.com/docs/errors.md#forbidden), [`payload_too_large`](https://coldagentai.com/docs/errors.md#payload_too_large), [`rate_limited`](https://coldagentai.com/docs/errors.md#rate_limited), [`internal_error`](https://coldagentai.com/docs/errors.md#internal_error). Every error uses the [single format](https://coldagentai.com/docs/errors.md#format).

### Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. Over the limit the answer is `429 rate_limited` with `Retry-After`. See [Rate limits](https://coldagentai.com/docs/rate-limits.md).

### Examples

cURL:

```
curl -X PUT "https://api.coldagentai.com/v1/account/compliance" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "postal_address": {
    "line1": "abc123",
    "city": "abc123",
    "country": "US"
  },
  "sender": {
    "company_name": "Example"
  }
}'
```

JavaScript (fetch):

```
const res = await fetch(`https://api.coldagentai.com/v1/account/compliance`, {
  method: 'PUT',
  body: JSON.stringify({
    "postal_address": {
      "line1": "abc123",
      "city": "abc123",
      "country": "US"
    },
    "sender": {
      "company_name": "Example"
    }
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();
```

## GET /unsubscribe/{token}

A page that asks the recipient to confirm unsubscribing. It changes nothing by itself.

Scope: `public`. No API key is needed. Success: HTTP 200.

### Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | yes | 1 to 1024 characters |

### Response

HTTP 200 with a `text/html` body, not JSON.

### Errors

[`invalid_input`](https://coldagentai.com/docs/errors.md#invalid_input), [`internal_error`](https://coldagentai.com/docs/errors.md#internal_error), [`provider_unavailable`](https://coldagentai.com/docs/errors.md#provider_unavailable). Every error uses the [single format](https://coldagentai.com/docs/errors.md#format).

### Rate limits

Never refused for load: this operation is not rate limited. See [Rate limits](https://coldagentai.com/docs/rate-limits.md).

### Examples

cURL:

```
curl "https://api.coldagentai.com/unsubscribe/$TOKEN"
```

JavaScript (fetch):

```
const token = 'abc123';
const res = await fetch(`https://api.coldagentai.com/unsubscribe/${token}`);
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.text();
```

## POST /unsubscribe/{token}

Unsubscribes the recipient the token was issued for: the address is suppressed for the sender account and the rest of its sequences are cancelled. Accepts the `List-Unsubscribe=One-Click` form body that mail clients send, or the confirmation form. Idempotent. A token that was altered or does not verify answers 400 and changes nothing.

Scope: `public`. No API key is needed. Success: HTTP 200.

### Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | yes | 1 to 1024 characters |

### Response

HTTP 200 with a `text/html` body, not JSON.

### Errors

[`invalid_input`](https://coldagentai.com/docs/errors.md#invalid_input), [`internal_error`](https://coldagentai.com/docs/errors.md#internal_error), [`provider_unavailable`](https://coldagentai.com/docs/errors.md#provider_unavailable). Every error uses the [single format](https://coldagentai.com/docs/errors.md#format).

### Rate limits

Never refused for load: this operation is not rate limited. See [Rate limits](https://coldagentai.com/docs/rate-limits.md).

### Examples

cURL:

```
curl -X POST "https://api.coldagentai.com/unsubscribe/$TOKEN"
```

JavaScript (fetch):

```
const token = 'abc123';
const res = await fetch(`https://api.coldagentai.com/unsubscribe/${token}`, {
  method: 'POST',
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.text();
```

## Related

- [API reference](https://coldagentai.com/docs/api.md)
- [API authentication](https://coldagentai.com/docs/authentication.md)
- [API errors](https://coldagentai.com/docs/errors.md)
- [Sending and unsubscribes](https://coldagentai.com/docs/sending-and-compliance.md)
- [Blocklist API reference](https://coldagentai.com/docs/api/blocklist.md)
