> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.jelliu.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.jelliu.co/_mcp/server.

# List campaigns

GET https://api.jelliu.co/api/campaigns

Returns the workspace's campaigns, newest first (`created_at` descending). Each item carries
the agent's name and live contact aggregates (`total_contacts`, `pending_contacts`,
`called_contacts`, `converted_contacts`, `conversion_rate`). Use it for a dashboard or
to find a campaign's `id`. For the full row, including the product context and the
WhatsApp or email content, call `GET /api/campaigns/{campaignId}`.

Pagination is by page number: `page` and `limit` are echoed back in `meta`, but there is
**no total count**. Keep requesting the next page until you get fewer than `limit` items.
Soft-deleted campaigns and the system-owned `manual` campaign (it holds ad-hoc
conversations) are never listed.

**Consistency.** Pages are cached for up to 60 seconds. API mutations clear the cache at once.
Changes the system makes by itself, like auto-completion or a system pause, can take up to 60
seconds to appear.

**Access**

* **Required scope:** `read` (or `write`/`full`).
* **Rate limit:** General API — 120 to 600 requests/min per workspace depending on plan. See [Rate limits](/rate-limits).
* **Plan:** Available on every plan.

Reference: https://developer.jelliu.co/api-reference/campaigns/get-campaigns

## Authentication

- `Authorization` header (bearer token, required) — Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

## Request

### Query parameters

- `page` (integer, optional, default: 1) — 1-indexed page number. A value that is not an integer between 1 and 100000 is rejected with 400.
- `limit` (integer, optional, default: 20) — Campaigns per page. A value that is not an integer between 1 and 100 is rejected with 400 (it is not clamped).

## Response

### 200

One page of campaigns.

- `data` (list of object, required)
  - `id` (string, optional) — Unique identifier of the campaign.
  - `tenant_id` (string, optional) — Workspace that owns the campaign.
  - `agent_id` (string, optional) — Agent bound to the campaign.
  - `name` (string, optional) — Display name.
  - `status` (enum, optional) — Lifecycle state (`draft`, `active`, `paused`, `completed`, `archived`); see `Campaign.status`.
    - Allowed values: `draft`, `active`, `paused`, `completed`, `archived`
  - `category` (string, optional) — Purpose of the campaign; see `Campaign.category`.
  - `channel` (enum, optional) — `voice`, `whatsapp`, `webchat` or `email`; see `Campaign.channel`.
    - Allowed values: `voice`, `whatsapp`, `webchat`, `email`
  - `max_concurrent_calls` (integer, optional) — Maximum simultaneous calls, already lowered to the plan's ceiling.
  - `max_retry_attempts` (integer, optional) — Maximum dial attempts per contact, counting the first.
  - `schedule` (object, optional) — Weekly calling window, stored and returned exactly as sent (camelCase inside the object). The dialer starts a call only when the local hour in `timezone` is `>= startHour` and `< endHour` on an enabled day; outside it, the call is rescheduled to the next window. A call that started inside the window may run past `endHour`. Days that are left out count as disabled. Validation: `timezone` must be a valid IANA zone (`Invalid IANA timezone`), every enabled day needs `startHour < endHour`, and at least one day must be enabled (`At least one day must be enabled`). WhatsApp and email sends are not bound to this window.
    - `timezone` (string, required) — IANA timezone the hours are expressed in.
    - `days` (list of object, required) — One entry per weekday. Only the first entry for a given day is used.
      - `day` (enum, required) — Day of the week, lowercase English.
        - Allowed values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`
      - `startHour` (integer, required) — First hour (inclusive) in which calls may start.
      - `endHour` (integer, required) — Hour (exclusive) at which calls stop starting. `18` means the last call starts before 18:00.
      - `enabled` (boolean, required) — Whether calls may be placed on this day.
  - `blocked_reason` (string, optional, nullable) — Why the system paused the campaign; `null` when a person paused it. Meaningful only while `status` is `paused`.
  - `created_at` (datetime, optional) — When the campaign was created. The list is sorted by it, newest first.
  - `updated_at` (datetime, optional) — Last change to the row.
  - `deleted_at` (datetime, optional, nullable) — Always `null`; deleted campaigns are not listed.
  - `agent_name` (string, optional, nullable) — Name of the bound agent; `null` if the agent row no longer exists.
  - `total_contacts` (integer, optional) — Contacts in the campaign (deleted ones excluded).
  - `pending_contacts` (integer, optional) — Contacts still `pending`.
  - `called_contacts` (integer, optional) — Contacts with at least one recorded call attempt (`call_attempts > 0`). WhatsApp and email sends are not counted here.
  - `converted_contacts` (integer, optional) — Contacts in `converted` status.
  - `conversion_rate` (double, optional) — converted ÷ called × 100, rounded to one decimal; `0` when nothing was called.
- `meta` (object, required) — The pagination parameters that were applied. There is no total.
  - `page` (integer, optional) — Page that was returned.
  - `limit` (integer, optional) — Page size that was applied.

## Errors

### 400 Bad Request Error

`page` or `limit` is out of range or not an integer.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 401 Unauthorized Error

No usable credential. Either the `Authorization` header is missing or is not a well-formed `Bearer jl_…` key, or the key is unknown, revoked or expired. Do not retry with the same key. See [Authentication](/authentication#401-unauthorized).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 403 Forbidden Error

Authenticated, but not allowed: the key's scope does not cover the method, the route is restricted to workspace admins/owners and the key is not `full`, or the workspace is suspended (`TENANT_SUSPENDED`). See [Authentication](/authentication#scopes).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 429 Too Many Requests Error

General API rate limit exceeded.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10",
      "tenant_id": "0e9d7c3b-8a1f-4c55-b7a2-3c4d5e6f7a8b",
      "agent_id": "9f1e2d3c-4b5a-4968-8776-655443322110",
      "name": "Renovaciones septiembre",
      "status": "active",
      "category": "sales",
      "channel": "voice",
      "max_concurrent_calls": 3,
      "max_retry_attempts": 3,
      "schedule": {
        "timezone": "America/Bogota",
        "days": [
          {
            "day": "monday",
            "startHour": 9,
            "endHour": 18,
            "enabled": true
          },
          {
            "day": "tuesday",
            "startHour": 9,
            "endHour": 18,
            "enabled": true
          }
        ]
      },
      "blocked_reason": null,
      "created_at": "2026-09-10T14:02:11.000Z",
      "updated_at": "2026-09-14T15:30:02.000Z",
      "deleted_at": null,
      "agent_name": "Sofía – Ventas",
      "total_contacts": 1153,
      "pending_contacts": 412,
      "called_contacts": 741,
      "converted_contacts": 89,
      "conversion_rate": 12
    },
    {
      "id": "c4e1a2b3-7d6f-4a8e-b1c2-d3e4f5a6b7c8",
      "tenant_id": "0e9d7c3b-8a1f-4c55-b7a2-3c4d5e6f7a8b",
      "agent_id": "2a3b4c5d-6e7f-4081-9a2b-3c4d5e6f7081",
      "name": "Recordatorio de pago WhatsApp",
      "status": "draft",
      "category": "collections",
      "channel": "whatsapp",
      "max_concurrent_calls": 3,
      "max_retry_attempts": 0,
      "schedule": {
        "timezone": "America/Mexico_City",
        "days": [
          {
            "day": "friday",
            "startHour": 10,
            "endHour": 16,
            "enabled": true
          }
        ]
      },
      "blocked_reason": null,
      "created_at": "2026-09-08T19:45:00.000Z",
      "updated_at": "2026-09-08T19:45:00.000Z",
      "deleted_at": null,
      "agent_name": "Cobranza amable",
      "total_contacts": 0,
      "pending_contacts": 0,
      "called_contacts": 0,
      "converted_contacts": 0,
      "conversion_rate": 0
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20
  }
}
```

**SDK Code**

```python Campaigns_getCampaigns_example
import requests

url = "https://api.jelliu.co/api/campaigns"

querystring = {"limit":"20","page":"1"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Campaigns_getCampaigns_example
const url = 'https://api.jelliu.co/api/campaigns?limit=20&page=1';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Campaigns_getCampaigns_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/campaigns?limit=20&page=1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Campaigns_getCampaigns_example
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/campaigns?limit=20&page=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Campaigns_getCampaigns_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.jelliu.co/api/campaigns?limit=20&page=1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Campaigns_getCampaigns_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.jelliu.co/api/campaigns?limit=20&page=1', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Campaigns_getCampaigns_example
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/campaigns?limit=20&page=1");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Campaigns_getCampaigns_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/campaigns?limit=20&page=1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```