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

# List voice campaigns

> List this account’s voice campaigns, newest first. This bounded list has no offset or cursor.

**FIXED · campaign** **MUST** Resume covers only unattempted work in the existing running launch, and neither resume nor reuse replays completed work.\
reuse\_campaign\_id replaces settings and recipients atomically only on an owned, never-launched voice draft or scheduled campaign. A launch claim prevents replacement. SMS creation always generates a fresh ID, even if the request forwards this field. Omit it for SMS.

**NOT OFFERED → do this instead · campaign** A launched or finished campaign cannot run again. For another run create a campaign with a fresh ID, selected recipients and reviewed settings. The dashboard’s Use again button follows the same rule for voice: it edits a campaign that never launched, otherwise it opens a new campaign filled with the original settings and recipients for review before launch. SMS campaigns have no Use again button.

**YOU CAN CHANGE · campaign** Use schedule\_type=schedule, scheduled\_date (YYYY-MM-DD), timezone, window\_days and optional paired window\_start\_minutes/window\_end\_minutes. UTC date checks, local windows and capacity apply.

**SCOPE · campaign** `DELETE /v1/calls/batch/{id}` deletes a voice campaign. Voice and SMS have separate cancel routes. Cancel stops future work. Running attempts may finish.

For one owned sender, send business\_number (encode + as %2B) on `GET /v1/campaigns` or `GET /v1/sms/campaigns`. Omit for account scope. Keep the same number and status through SMS cursors. Restart paging if either changes. Voice include\_totals=true covers returned campaigns only (default 50, max 200).

Pickup rate = answered attempts / all attempts, including failed starts. Answered means over five seconds with no detected voicemail. Sum counts before dividing. Zero attempts means no rate. SMS delivery rate = delivered / (delivered + failed).

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#campaigns)

List this account’s voice campaigns, newest first. This bounded list has no offset or cursor.

Method: **GET** · Success: **200** · Scope: **Owning account**

**The important part**

* Read saved campaign state before any launch, cancel or resume action.
* The campaign list does not confirm every recipient finished.

[Business guide](https://docs.nixflex.com/guides/business/voice-campaigns.md) · [Developer guide](https://docs.nixflex.com/guides/developer/campaigns.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Authentication

Send `Authorization: Bearer KEY_ID:KEY_SECRET` using the owning account’s server-side credential.

## Request fields

| Field | Type | Required | Default | Limits and meaning |
| - | - | - | - | - |
| `status` (query) | string | No | Omitted | Optional exact status filter. Unknown values normally return no matches. |
| `limit` (query) | integer | No | `50` | Parsed as an integer; missing, invalid or nonpositive uses 50; capped at 200. Minimum 1. Maximum 200. |

Do not send a request body.

Sort order is created\_at descending. There is no tie-break cursor, offset, total or full-history paging contract. Unknown query keys are ignored. Counts describe stored campaign state, not delivery guarantees.

## Response fields

`200 OK` returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.

| Field | Type | Meaning |
| - | - | - |
| `campaigns` | array of object | Saved value. |
| `campaigns[].campaign_id` | string | Public campaign ID. |
| `campaigns[].agent_id` | string | Owning agent ID. |
| `campaigns[].name` | string or null | Saved campaign label. |
| `campaigns[].from_number` | string or null | International number with + and digits; no spaces. Pattern: `^\+[1-9][0-9]{6,14}$`. |
| `campaigns[].schedule_type` | string | Saved now or schedule mode. |
| `campaigns[].scheduled_date` | string or null | Saved scheduled date. |
| `campaigns[].window_start_minutes` | integer or null | Configured start minute. |
| `campaigns[].window_end_minutes` | integer or null | Configured end minute. |
| `campaigns[].window_days` | array or null | Saved value. |
| `campaigns[].timezone` | string or null | Saved campaign time zone. |
| `campaigns[].source` | string | Saved origin label. |
| `campaigns[].status` | string | Current state; for example scheduled, launching, running, done, failed or cancelled. Treat new states conservatively. |
| `campaigns[].total_count` | integer | Count. Minimum 0. |
| `campaigns[].started_at` | string or null | Saved timestamp, or null. Format: date-time. |
| `campaigns[].completed_at` | string or null | Saved timestamp, or null. Format: date-time. |
| `campaigns[].created_at` | string or null | Saved timestamp, or null. Format: date-time. |
| `campaigns[].updated_at` | string or null | Saved timestamp, or null. Format: date-time. |
| `campaigns[].allow_wider_hours` | boolean | True only with confirmation evidence for the current policy revision. |
| `campaigns[].prompt` | string or null | Default voice instructions. |
| `campaigns[].done_count` | integer | Count. Minimum 0. |
| `campaigns[].failed_count` | integer | Count. Minimum 0. |
| `campaigns[].voicemail_count` | integer | Count. Minimum 0. |

## Example request

These examples require Node/CLI 0.11.0 or later, Python 0.4.0 or later and MCP 0.5.0 or later. Keep `NIXFLEX_API_KEY` private. cURL uses Bash; CLI uses PowerShell and reads the key through `NIXFLEX_API_KEY`. Replace fixture identifiers and reserved example numbers with approved account-owned values. Configure the existing MCP installation for the same account at `https://api.nixflex.com` before using the shown tool arguments. Python shows the synchronous client; `AsyncNixflex` uses the same method with `async with` and `await`.

```bash cURL theme={"dark"}
curl --request GET \
  --url "https://api.nixflex.com/v1/campaigns?status=running&limit=2" \
  --header "Authorization: Bearer $NIXFLEX_API_KEY"
```

```javascript Node theme={"dark"}
import Nixflex from 'nixflex';

const c = new Nixflex({
  apiKey: process.env.NIXFLEX_API_KEY,
  baseUrl: 'https://api.nixflex.com',
  maxRetries: 0,
});
const result = await c.campaigns.list({"status": "running", "limit": 2});
```

```python Python theme={"dark"}
import os
from nixflex import Nixflex

with Nixflex(
    api_key=os.environ["NIXFLEX_API_KEY"],
    base_url="https://api.nixflex.com",
    max_retries=0,
) as c:
    result = c.campaigns.list(status='running', limit=2)
```

```powershell CLI (PowerShell) theme={"dark"}
nixflex campaigns list --status running --limit 2 --json --base-url "https://api.nixflex.com"
```

```json MCP theme={"dark"}
{
  "name": "list_campaigns",
  "arguments": {
    "status": "running",
    "limit": 2
  }
}
```

## Example response

Illustrative `200` response. Identifiers and values are examples; some optional or compatibility fields are omitted.

```json Response theme={"dark"}
{
  "campaigns": []
}
```

## Errors

Failures return an `error` object with `code`, `message`, `doc_url` and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.

| Status | Code | Meaning | What to do |
| - | - | - | - |
| 500 | [`server_error`](https://docs.nixflex.com/api-reference/errors#server_error) | The result could not be confirmed. | Read the current state before repeating a write. |
| 401 | [`unauthorized`](https://docs.nixflex.com/api-reference/errors#unauthorized) | The credential is missing or invalid. | Check the full account credential. |
| 429 | [`rate_limit_exceeded`](https://docs.nixflex.com/api-reference/errors#rate_limit_exceeded) | The account request limit was reached. | Wait for Retry-After. Reconcile uncertain writes before resending. |

## Retry and idempotency

This is a read-only request. Retry transient connection or server failures with bounded backoff; respect Retry-After for 429. Do not retry validation or ownership errors unchanged. A later read can return newer state.

## Related endpoints

* [Create a voice campaign](https://docs.nixflex.com/api-reference/calls/batch-create.md)
* [Launch a voice campaign](https://docs.nixflex.com/api-reference/calls/batch-launch.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md#error-envelope)


## OpenAPI

````yaml api-reference/public.openapi.json GET /campaigns
openapi: 3.1.0
info:
  title: Nixflex public API
  version: 1.0.0
  description: >-
    Nixflex API reference for agents, calls, messaging, knowledge, organisations
    and integrations. Authenticate with the owning account and follow each
    operation’s permissions, response and retry contract.
servers:
  - url: https://api.nixflex.com/v1
security:
  - bearerAuth: []
paths:
  /campaigns:
    get:
      tags:
        - Voice campaigns
      summary: List voice campaigns
      description: >-
        List this account’s voice campaigns, newest first. This bounded list has
        no offset or cursor. Sort order is created_at descending. There is no
        tie-break cursor, offset, total or full-history paging contract. Unknown
        query keys are ignored. Counts describe stored campaign state, not
        delivery guarantees.
      operationId: listCampaigns
      parameters:
        - name: status
          in: query
          required: false
          schema:
            type: string
            description: >-
              Optional exact status filter. Unknown values normally return no
              matches.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            description: >-
              Parsed as an integer; missing, invalid or nonpositive uses 50;
              capped at 200.
            default: 50
            minimum: 1
            maximum: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaigns:
                    type: array
                    items:
                      type: object
                      properties:
                        campaign_id:
                          type: string
                          description: Public campaign ID.
                        agent_id:
                          type: string
                          description: Owning agent ID.
                        name:
                          type:
                            - string
                            - 'null'
                          description: Saved campaign label.
                        from_number:
                          type:
                            - string
                            - 'null'
                          description: International number with + and digits; no spaces.
                          pattern: ^\+[1-9][0-9]{6,14}$
                        schedule_type:
                          type: string
                          description: Saved now or schedule mode.
                        scheduled_date:
                          type:
                            - string
                            - 'null'
                          description: Saved scheduled date.
                        window_start_minutes:
                          type:
                            - integer
                            - 'null'
                          description: Configured start minute.
                        window_end_minutes:
                          type:
                            - integer
                            - 'null'
                          description: Configured end minute.
                        window_days:
                          type:
                            - array
                            - 'null'
                          items:
                            type: string
                            description: Weekday.
                          description: ''
                        timezone:
                          type:
                            - string
                            - 'null'
                          description: Saved campaign time zone.
                        source:
                          type: string
                          description: Saved origin label.
                        status:
                          type: string
                          description: >-
                            Current state; for example scheduled, launching,
                            running, done, failed or cancelled. Treat new states
                            conservatively.
                        total_count:
                          type: integer
                          description: Count.
                          minimum: 0
                        started_at:
                          type:
                            - string
                            - 'null'
                          description: Saved timestamp, or null.
                          format: date-time
                        completed_at:
                          type:
                            - string
                            - 'null'
                          description: Saved timestamp, or null.
                          format: date-time
                        created_at:
                          type:
                            - string
                            - 'null'
                          description: Saved timestamp, or null.
                          format: date-time
                        updated_at:
                          type:
                            - string
                            - 'null'
                          description: Saved timestamp, or null.
                          format: date-time
                        allow_wider_hours:
                          type: boolean
                          description: >-
                            True only with confirmation evidence for the current
                            policy revision.
                        prompt:
                          type:
                            - string
                            - 'null'
                          description: Default voice instructions.
                        done_count:
                          type: integer
                          description: Count.
                          minimum: 0
                        failed_count:
                          type: integer
                          description: Count.
                          minimum: 0
                        voicemail_count:
                          type: integer
                          description: Count.
                          minimum: 0
                      required:
                        - campaign_id
                        - agent_id
                        - name
                        - from_number
                        - schedule_type
                        - scheduled_date
                        - window_start_minutes
                        - window_end_minutes
                        - window_days
                        - timezone
                        - source
                        - status
                        - total_count
                        - started_at
                        - completed_at
                        - created_at
                        - updated_at
                        - allow_wider_hours
                        - prompt
                        - done_count
                        - failed_count
                        - voicemail_count
                      description: ''
                      additionalProperties: false
                    description: ''
                required:
                  - campaigns
                description: ''
                additionalProperties: false
              example:
                campaigns: []
        '401':
          description: 'unauthorized: The credential is missing or invalid.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code.
                      message:
                        type: string
                        description: Explanation.
                      doc_url:
                        type: string
                        description: Error reference link.
                      details:
                        type: object
                        properties: {}
                        description: >-
                          Optional context; inspect campaign_id, status, outcome
                          and safe_to_retry for uncertain writes.
                        additionalProperties: true
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '429':
          description: 'rate_limit_exceeded: The account request limit was reached.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code.
                      message:
                        type: string
                        description: Explanation.
                      doc_url:
                        type: string
                        description: Error reference link.
                      details:
                        type: object
                        properties: {}
                        description: >-
                          Optional context; inspect campaign_id, status, outcome
                          and safe_to_retry for uncertain writes.
                        additionalProperties: true
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '500':
          description: 'server_error: The result could not be confirmed.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code.
                      message:
                        type: string
                        description: Explanation.
                      doc_url:
                        type: string
                        description: Error reference link.
                      details:
                        type: object
                        properties: {}
                        description: >-
                          Optional context; inspect campaign_id, status, outcome
                          and safe_to_retry for uncertain writes.
                        additionalProperties: true
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A
        verified personal dashboard Bearer session may be used where the
        operation documents role-based access.

````

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