> 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.

# Retrieve a campaign

GET https://api.jelliu.co/api/campaigns/{campaignId}

Returns the full campaign row: status, channel, schedule, retry settings, product context
and the WhatsApp or email content. Unlike the list, it has no contact aggregates. For those use
`GET /api/campaigns`, and for the contacts themselves `GET /api/campaigns/{campaignId}/contacts`.

Poll this after `PATCH /api/campaigns/{campaignId}/activate` to find out when `status` becomes
`completed`, or better, subscribe to the `campaign.completed` webhook. A `paused` campaign with
a non-null `blocked_reason` was paused by the system and needs the fix it describes.

**Consistency.** Cached for up to 120 seconds. API mutations clear the cache at once. A status
change the system makes by itself (auto-completion, system pause) can take up to 120 seconds to
appear here.

**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-by-campaign-id

## 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

### Path parameters

- `campaignId` (string, required) — UUID of the campaign, as returned in `id` by `GET /api/campaigns`. A campaign from another workspace or a deleted one answers 404; a value that is not a UUID answers 400.

## Response

### 200

The campaign.

- `data` (object, required) — A campaign row as returned by the retrieve, create, update, activate and pause endpoints. Keys are snake_case, exactly as stored. The list endpoint returns a lighter `CampaignListItem` instead.
  - `id` (string, optional) — Unique identifier of the campaign.
  - `tenant_id` (string, optional) — Workspace that owns the campaign.
  - `agent_id` (string, optional) — Agent that calls or chats with the contacts. Set at creation and cannot be changed.
  - `name` (string, optional) — Display name of the campaign.
  - `product_context` (string, optional) — What the campaign offers or is about. It is given to the agent as context for every conversation.
  - `target_audience` (string, optional) — Who the contacts are, given to the agent as context.
  - `status` (enum, optional) — Lifecycle state, changed only by activate, pause and the system: `draft` (created, nothing sent), `active` (running), `paused` (stopped, resumable), `completed` (no pending work left; frozen) or `archived` (frozen).
    - Allowed values: `draft`, `active`, `paused`, `completed`, `archived`
  - `channel` (enum, optional) — How the campaign reaches contacts: `voice` (phone calls), `whatsapp` (WhatsApp messages), `email` (email from the workspace's own mailbox) or `webchat` (inbound web chat only).
    - Allowed values: `voice`, `whatsapp`, `webchat`, `email`
  - `category` (enum, optional) — Purpose of the campaign; it decides how call and conversation outcomes are classified. One of `sales`, `support`, `scheduling`, `surveys`, `collections`, `retention`, `notifications`, `interview`, `language_assessment`, `general`, or the system-only `manual`.
    - Allowed values: `sales`, `support`, `scheduling`, `surveys`, `collections`, `retention`, `notifications`, `interview`, `language_assessment`, `general`, `manual`
  - `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.
  - `max_concurrent_calls` (integer, optional) — Maximum simultaneous calls for this campaign. The stored value is already lowered to the plan's ceiling (Starter 3, Growth 10, Business 25).
  - `max_retry_attempts` (integer, optional) — Maximum dial attempts per contact, counting the first. An unanswered, busy or unconnected call is redialed until this many calls exist; `0` or `1` means no redial. Voice only.
  - `retry_interval_minutes` (integer, optional) — Minutes to wait before redialing an unanswered contact (still subject to `schedule`).
  - `blocked_reason` (string, optional, nullable) — Why the **system** paused the campaign, in Spanish, naming the fix (for example, the workspace has no phone number, or the agent is paused). `null` when a person paused it or it was never blocked. It is not cleared on reactivation, so read it only while `status` is `paused`.
  - `retry_policy` (map from string to any, optional) — Legacy column, always `{}` for campaigns created through this API. Not used by the dialer.
  - `voicemail_action` (string, optional) — Legacy column, defaults to `retry`. Not settable and not used today; unanswered calls follow `max_retry_attempts`.
  - `voicemail_message` (string, optional, nullable) — Legacy column, always `null` for campaigns created through this API.
  - `whatsapp_template_id` (string, optional, nullable) — Approved WhatsApp template used for outbound sends. `null` keeps a WhatsApp campaign inbound-only.
  - `whatsapp_template_variables` (list of string or map from string to string, optional, nullable) — Campaign-wide values for the template placeholders, as an array (`{{1}}` is index 0) or an object keyed by placeholder index. The same value reaches every contact.
  - `whatsapp_template_variable_map` (map from string to any, optional, nullable) — Placeholders filled per contact, keyed by placeholder index. The value is a token, or `{ token, fallback }`. Indexes not in the map use `whatsapp_template_variables`.
  - `email_subject` (string, optional, nullable) — Subject of the outbound email, may contain `{{tokens}}`. Outbound email needs both subject and body.
  - `email_body` (string, optional, nullable) — Plain-text body of the outbound email, may contain `{{tokens}}`.
  - `created_at` (datetime, optional) — When the campaign was created.
  - `updated_at` (datetime, optional) — Last change to the row, including status changes.
  - `deleted_at` (datetime, optional, nullable) — Always `null` in responses; deleted campaigns are not returned.

## Errors

### 400 Bad Request Error

`campaignId` is not a UUID.

- `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).

### 404 Not Found Error

The campaign does not exist, was deleted, or belongs to another workspace.

- `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",
    "product_context": "Plan de datos móviles con 20 GB y llamadas ilimitadas por $59.900 al mes. Oferta válida hasta el 30 de septiembre.",
    "target_audience": "Clientes con plan vencido en los últimos 60 días",
    "status": "paused",
    "channel": "voice",
    "category": "sales",
    "schedule": {
      "timezone": "America/Bogota",
      "days": [
        {
          "day": "monday",
          "startHour": 9,
          "endHour": 18,
          "enabled": true
        },
        {
          "day": "tuesday",
          "startHour": 9,
          "endHour": 18,
          "enabled": true
        }
      ]
    },
    "max_concurrent_calls": 3,
    "max_retry_attempts": 3,
    "retry_interval_minutes": 120,
    "blocked_reason": "Falta un número de teléfono propio. Añade uno en Ajustes → Números (compra uno o conecta el tuyo) y reactiva la campaña.",
    "retry_policy": {},
    "voicemail_action": "retry",
    "voicemail_message": null,
    "whatsapp_template_id": null,
    "whatsapp_template_variables": {},
    "whatsapp_template_variable_map": {},
    "email_subject": null,
    "email_body": null,
    "created_at": "2026-09-10T14:02:11.000Z",
    "updated_at": "2026-09-14T15:30:02.000Z",
    "deleted_at": null
  }
}
```

**SDK Code**

```python Campaigns_getCampaignsByCampaignId_example
import requests

url = "https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10"

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

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

print(response.json())
```

```javascript Campaigns_getCampaignsByCampaignId_example
const url = 'https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10';
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_getCampaignsByCampaignId_example
package main

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

func main() {

	url := "https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10"

	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_getCampaignsByCampaignId_example
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10")

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_getCampaignsByCampaignId_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Campaigns_getCampaignsByCampaignId_example
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Campaigns_getCampaignsByCampaignId_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/campaigns/5b0c8f7e-2f4a-4d7e-9a53-0f6f2f3c1a10")! 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()
```