# List 10DLC Campaigns

`POST /campaigns/dlc/list`

List all 10DLC campaigns with optional filtering and pagination. Results are sorted by creation date, newest first.

## Authentication

Send your API key in the `PINNACLE-API-KEY` header.

## Request body

Required.

Content type: `application/json`.

### Fields

- `pageIndex` — `integer`, optional, default: 0; minimum: 0
- `pageSize` — `integer`, optional, default: 20; minimum: 1; maximum: 100
- `status` — `string`, optional, values: `INCOMPLETE`, `IN REVIEW`, `VERIFIED`, `FAILED`
- `brandId` — `string`, optional
- `name` — `string`, optional. Filter by campaign name (partial match, case-insensitive).

### Example

```json
{
  "pageIndex": 0,
  "pageSize": 20,
  "status": "INCOMPLETE",
  "brandId": "resource_01J8K3R7M9",
  "name": "Acme Support"
}
```

## Responses

### 200

Returns paginated list of 10DLC campaigns.

Content type: `application/json`. Schema: `ListDlcCampaignsResponse`.

- `data` — `object[]`
- `data[].campaignId` — `string`. Unique identifier for the 10DLC campaign.
- `data[].name` — `string`, optional. Name of the campaign.
- `data[].status` — `string`, values: `INCOMPLETE`, `IN REVIEW`, `VERIFIED`, `FAILED`. Current status of the campaign.
- `data[].brandId` — `string`, optional. Brand ID associated with this campaign.
- `data[].useCase` — `string`, optional. Primary use case for this campaign.
- `data[].createdAt` — `string`. ISO 8601 timestamp of when the campaign was created.
- `data[].updatedAt` — `string`. ISO 8601 timestamp of when the campaign was last updated.
- `hasMore` — `boolean`
- `count` — `integer`

Example:

```json
{
  "data": [
    {
      "campaignId": "dlc_abc123",
      "name": "Customer Notifications",
      "status": "VERIFIED",
      "brandId": "brand_abc123",
      "useCase": "CUSTOMER_CARE",
      "createdAt": "2025-01-15T10:30:00Z",
      "updatedAt": "2025-02-20T14:00:00Z"
    },
    {
      "campaignId": "dlc_def456",
      "name": "Marketing Alerts",
      "status": "IN REVIEW",
      "brandId": "brand_abc123",
      "useCase": "MARKETING",
      "createdAt": "2025-02-01T08:00:00Z",
      "updatedAt": "2025-02-01T08:00:00Z"
    }
  ],
  "hasMore": false,
  "count": 2
}
```

### 400

Validation failed. The payload has missing required fields and/or invalid types.

See https://zod.dev/error-formatting for more information.

Content type: `application/json`. Schema: `object`.

- `description` — `string`. Human-readable summary of validation failures.
- `errors` — `object`. Structured dictionary of issues containing two main sections:
- `errors`: Array of global validation errors not tied to specific fields
- `properties`: Object mapping field names to their specific validation errors, where each field contains an `errors` array

Example:

```json
{
  "description": "✖ Invalid input: expected string, received number\n  → at example_field",
  "errors": {
    "errors": [
      "Unrecognized key: 'extraKey'"
    ],
    "properties": {
      "example_field": {
        "errors": [
          "Invalid input: expected string, received NaN"
        ]
      }
    }
  }
}
```

### 401

The request lacks valid authentication credentials or the provided credentials are invalid.

Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Invalid API key."
}
```

### 500

An unexpected error occurred on Pinnacle's servers while processing your request.

If this error persists, please contact support with the request details.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "An unexpected error occurred while processing your request."
}
```

## SDK examples

### TypeScript

```typescript
import { PinnacleClient } from "rcs-js";

const client = new PinnacleClient({
  apiKey: process.env.PINNACLE_API_KEY!,
});

await client.campaigns.dlc.list();
```

### Python

```python
import os
from rcs import Pinnacle

client = Pinnacle(
    api_key=os.environ["PINNACLE_API_KEY"],
)

client.campaigns.dlc.list()
```

### Ruby

```ruby
require "rcs"

client = Pinnacle::Client.new(
  api_key: ENV.fetch("PINNACLE_API_KEY")
)

client.campaigns.dlc.list
```

## Machine-readable schema

[OpenAPI 3.1 JSON](https://docs.pinnacle.sh/openapi.json)
