curl "https://api.usegately.com/api/v1/campaigns" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Project-ID: YOUR_PROJECT_ID"
const res = await fetch('https://api.usegately.com/api/v1/campaigns', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'X-Project-ID': 'YOUR_PROJECT_ID',
}
})
const campaigns = await res.json()
import { GatelyCampaigns } from '@gately/sdk'
const campaigns = new GatelyCampaigns({ projectId: 'YOUR_PROJECT_ID' })
const list = await campaigns.list()
[
{
"id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890",
"project_id": "proj-uuid-here",
"name": "Product Launch",
"subject": "Introducing our new feature!",
"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": "Authentication required"
}
Email Campaigns
List Campaigns
Retrieve all email campaigns for a project, newest first
GET
/
api
/
v1
/
campaigns
curl "https://api.usegately.com/api/v1/campaigns" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Project-ID: YOUR_PROJECT_ID"
const res = await fetch('https://api.usegately.com/api/v1/campaigns', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'X-Project-ID': 'YOUR_PROJECT_ID',
}
})
const campaigns = await res.json()
import { GatelyCampaigns } from '@gately/sdk'
const campaigns = new GatelyCampaigns({ projectId: 'YOUR_PROJECT_ID' })
const list = await campaigns.list()
[
{
"id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890",
"project_id": "proj-uuid-here",
"name": "Product Launch",
"subject": "Introducing our new feature!",
"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": "Authentication required"
}
Headers
Response
Returns an array of campaign objects ordered bycreated_at descending.
curl "https://api.usegately.com/api/v1/campaigns" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Project-ID: YOUR_PROJECT_ID"
const res = await fetch('https://api.usegately.com/api/v1/campaigns', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'X-Project-ID': 'YOUR_PROJECT_ID',
}
})
const campaigns = await res.json()
import { GatelyCampaigns } from '@gately/sdk'
const campaigns = new GatelyCampaigns({ projectId: 'YOUR_PROJECT_ID' })
const list = await campaigns.list()
[
{
"id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890",
"project_id": "proj-uuid-here",
"name": "Product Launch",
"subject": "Introducing our new feature!",
"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": "Authentication required"
}
Was this page helpful?