Graine AI
API referenceCampaigns

List campaigns

List this organization's campaigns, newest first.

List this organization's campaigns, newest first.

total is an honest count of the matching campaigns, not a page-size echo, so total_pages and has_more can be trusted.

The counters on each row (completed_calls, failed_calls and the rest) are the campaign's stored roll-ups: cheap, and accurate to within the last webhook. For the live, contact-level numbers a progress bar should use — the ones that always sum to the total — read GET /v2/campaigns/{campaign_id}/stats.

Rate limit: 1000 requests per minute per organization (bucket default). Exceeding it returns 429 with Retry-After; the X-RateLimit-* response headers report your remaining allowance on every call.

GET
/v2/campaigns
/v2/campaigns?status=active&page=1&page_size=20

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

Your Graine API key. Create one in the dashboard under Developers, or via POST /v2/api-keys. Send it as Authorization: Bearer <key>.

In: header

Query Parameters

statusStatus

Filter by state: created | active | paused | completed | cancelled | expired | archived.

organization_idOrganization Id

Must match the organisation the API key belongs to.

pagePage

1-indexed page number (max 10000 — narrow the window instead)

Default: 1Minimum: 1Maximum: 10000

page_sizePage Size

Items per page (max 100)

Default: 20Minimum: 1Maximum: 100

Response Body

200

A page of campaigns, newest first.

data
Required
Data

The campaigns on this page, newest first.

pagination
Required
Pagination

page, page_size, total, total_pages, has_more.

400

1000 — malformed or contradictory input: an unknown timezone, a working-hours window that is not 24-hour HH:MM, an end_time at or before start_time, or an empty patch body. 1002 — a required parameter is missing.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

401

1100 — missing, unknown or inactive API key. 1101 — a browser session token was presented.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

403

1102 — the key is valid but lacks the scope this endpoint requires, or names another organisation. GET /v2/scopes reports which scopes the key holds.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

404

1200 — no such campaign, or no such agent, in this organisation. A campaign belonging to another organisation answers 404, never 403, so ids cannot be probed.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

422

1001 — the body or query failed validation; the message names the first offending field.

error
Required
integer

Stable integer code from the error table. Branch on this, not on the message.

message
Required
string

One human-readable sentence. Wording may change; the code will not.

429

1300 — per-organisation rate limit exceeded. Carries Retry-After.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

503

1501 — the agent service is unreachable or returned a 5xx.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

504

1502 — the agent service did not respond in time.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

curl -X GET "https://api.graine.ai/v2/campaigns?status=active&organization_id=string&page=1&page_size=20" \
  -H "Authorization: Bearer <token>"

A page of campaigns, newest first.

{
  "data": [
    {
      "batch_id": "fa08ae9d-239f-4a99-8d76-d4dec51311b4",
      "total_contacts": 3000,
      "campaign_id": "31ff3ea9-8bb5-433f-868f-286ac3c31328",
      "name": "Slot-2-Uttar-Pradesh",
      "agent_id": "6c6f4cc3-f56c-479d-8422-7f76694daa29",
      "phone_numbers": [
        "+917971442184"
      ],
      "phone_number_strategy": "round_robin",
      "phone_number_index": 0,
      "timezone": "Asia/Kolkata",
      "working_hours_enforced": true,
      "working_hours": {
        "monday": {
          "start": "08:00",
          "end": "20:00",
          "enabled": true
        },
        "saturday": {
          "start": "10:00",
          "end": "16:00",
          "enabled": true
        },
        "sunday": {
          "start": "10:00",
          "end": "16:00",
          "enabled": false
        }
      },
      "max_concurrent_calls": 10,
      "retry_policy": {
        "max_retries": 5,
        "strategy": "fixed_delay",
        "cooldown_minutes": 45,
        "base_delay_minutes": 15,
        "max_delay_minutes": 240,
        "respect_working_hours": true
      },
      "follow_up_policy": {
        "enabled": false,
        "max_attempts": 2,
        "cooldown_minutes": 1440,
        "triggers": [
          "after_retries_exhausted"
        ],
        "next_working_day_only": true,
        "follow_up_agent_id": "6c6f4cc3-f56c-479d-8422-7f76694daa29",
        "follow_up_prompt": "You spoke to this person yesterday. Open by referring to that call.",
        "follow_up_extra_logic": {}
      },
      "transliteration": {
        "enabled": true,
        "fields": [
          "callee_name"
        ],
        "target_language_code": "hi-IN",
        "source_language_code": "en-IN",
        "keep_original": true
      },
      "start_time": "2026-08-27T05:30:00.000Z",
      "end_time": "2026-08-31T11:00:00.000Z",
      "default_call_variables": {
        "campaign_offer": "monsoon-renewal"
      },
      "default_call_context": {},
      "status": "paused",
      "metadata": {
        "region": "uttar-pradesh",
        "slot": "2"
      },
      "total_batches": 1,
      "active_batches": 1,
      "completed_contacts": 412,
      "completed_calls": 451,
      "failed_calls": 88,
      "busy_calls": 37,
      "no_answer_calls": 120,
      "voicemail_calls": 14,
      "in_progress_calls": 3,
      "follow_up_calls": 0,
      "follow_up_exhausted": 0,
      "created_at": "2026-08-26T10:48:18.239Z",
      "updated_at": "2026-08-26T10:51:46.003Z"
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 20,
    "total": 137,
    "total_pages": 7,
    "has_more": true
  }
}