Campaigns
List campaigns
Changed onReturns a brand's AI campaigns, newest first, with each one's status and generation progress. Read one with its posts with GET /campaigns/{campaignId}.
get/campaigns
Request
- Base URLhttps://www.app.ocoya.com/api/_public/v1
- AuthAPI key in header X-API-Key
Query parameters
brandIdstring required
Example:cmayvq3hk00017apshay5qezu
Ocoya brand ID. Get one from GET /brands.
status'GENERATING' | 'GENERATED' | 'SCHEDULED' | 'ERROR'
Example:GENERATED
Only campaigns with this status.
pageinteger
Zero-based page number for paginated results.
perPageinteger
Example:20
Campaigns per page, up to 100. Defaults to 20.
Response
Success
Example response
{
"total": 12,
"perPage": 20,
"data": [
{
"id": "cmayxcmpn00087aps2m7hjs9z",
"type": "social",
"name": "Summer launch campaign",
"prompt": "Summer launch campaign for our ecommerce analytics dashboard.",
"goal": "launch",
"status": "GENERATED",
"duration": 7,
"startDate": "2026-11-02",
"postsPerDay": 1,
"plannedPostCount": 7,
"postCount": 7,
"postLength": "medium",
"channelIds": [
"clh49poxf008x8kov4ncbjty9"
],
"generation": {
"status": "GENERATING",
"phase": "posts",
"current": 3,
"total": 7,
"completed": 2,
"startedAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
"completedAt": "2024-01-01T00:00:00Z"
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
]
}Changes
- info
endpoint added
- info