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

# Get Campaign

> Retrieve a single campaign by ID

## Headers

<ParamField header="Authorization" type="string" required>
  `Bearer YOUR_API_KEY`
</ParamField>

<ParamField header="X-Project-ID" type="string">
  Your project UUID. Not required if the API key already encodes the project.
</ParamField>

## Path Parameters

<ParamField path="campaignId" type="string" required>
  Campaign UUID
</ParamField>

## Response

Returns the full campaign object. See [List Campaigns](/docs/api-reference/campaigns/list) for field descriptions.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.usegately.com/api/v1/campaigns/CAMPAIGN_ID" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "X-Project-ID: YOUR_PROJECT_ID"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    'https://api.usegately.com/api/v1/campaigns/CAMPAIGN_ID',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'X-Project-ID': 'YOUR_PROJECT_ID',
      }
    }
  )
  const campaign = await res.json()
  ```

  ```typescript SDK theme={null}
  import { GatelyCampaigns } from '@gately/sdk'

  const campaigns = new GatelyCampaigns({ projectId: 'YOUR_PROJECT_ID' })
  const campaign = await campaigns.get('CAMPAIGN_ID')
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890",
    "project_id": "proj-uuid-here",
    "name": "Product Launch",
    "subject": "Introducing our new feature!",
    "content": "<h1>Hello!</h1><p>Check out what we built.</p>",
    "html_content": "<h1>Hello!</h1><p>Check out what we built.</p>",
    "status": "sent",
    "total_recipients": 842,
    "delivered_count": 835,
    "recipient_filter": {
      "type": "mixed",
      "emails": [],
      "list_ids": ["list-uuid"],
      "segment_ids": [],
      "all_contacts": false
    },
    "scheduled_at": null,
    "sent_at": "2025-06-01T10:00:00.000Z",
    "created_at": "2025-05-30T14:22:00.000Z",
    "updated_at": "2025-06-01T10:04:11.000Z"
  }
  ```

  ```json Not found theme={null}
  {
    "error": "Campaign not found"
  }
  ```
</ResponseExample>
