curl "https://api.usegately.com/api/v1/campaigns/CAMPAIGN_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Project-ID: YOUR_PROJECT_ID"
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()
import { GatelyCampaigns } from '@gately/sdk'
const campaigns = new GatelyCampaigns({ projectId: 'YOUR_PROJECT_ID' })
const campaign = await campaigns.get('CAMPAIGN_ID')
{
"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"
}
{
"error": "Campaign not found"
}
Email Campaigns
Get Campaign
Retrieve a single campaign by ID
GET
/
api
/
v1
/
campaigns
/
{campaignId}
curl "https://api.usegately.com/api/v1/campaigns/CAMPAIGN_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Project-ID: YOUR_PROJECT_ID"
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()
import { GatelyCampaigns } from '@gately/sdk'
const campaigns = new GatelyCampaigns({ projectId: 'YOUR_PROJECT_ID' })
const campaign = await campaigns.get('CAMPAIGN_ID')
{
"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"
}
{
"error": "Campaign not found"
}
Headers
string
required
Bearer YOUR_API_KEYstring
Your project UUID. Not required if the API key already encodes the project.
Path Parameters
string
required
Campaign UUID
Response
Returns the full campaign object. See List Campaigns for field descriptions.curl "https://api.usegately.com/api/v1/campaigns/CAMPAIGN_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Project-ID: YOUR_PROJECT_ID"
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()
import { GatelyCampaigns } from '@gately/sdk'
const campaigns = new GatelyCampaigns({ projectId: 'YOUR_PROJECT_ID' })
const campaign = await campaigns.get('CAMPAIGN_ID')
{
"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"
}
{
"error": "Campaign not found"
}
Was this page helpful?
⌘I