Campaigns
Get a campaign
Changed onReturns one campaign with its brief, status, generation progress and posts. Each saved post has a postGroupId you can use with the post endpoints.
get/campaigns/{campaignId}
Request
- Base URLhttps://www.app.ocoya.com/api/_public/v1
- AuthAPI key in header X-API-Key
Path parameters
campaignIdstring required
Example:cmayxcmpn00087aps2m7hjs9z
Ocoya campaign ID, from GET /campaigns or POST /campaigns.
Query parameters
brandIdstring required
Example:cmayvq3hk00017apshay5qezu
Ocoya brand ID. Get one from GET /brands.
Response
Success
Example response
{
"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",
"posts": [
{
"sequence": 1,
"captionPreview": "Our analytics dashboard is live. Here is what it shows you on day one...",
"scheduledAt": "2024-01-01T00:00:00Z",
"approved": true,
"postGroupId": "cmajvvb9q0003ja5vh0538j6r",
"status": "SCHEDULED",
"mediaCount": 1
}
]
}Changes
- info
endpoint added
- info