Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.
List all emails
Returns a brand's emails, newest first, without their documents, each with its results.
List all emails
curl --request GET \
--url https://www.app.ocoya.com/api/_public/v1/email \
--header 'X-API-Key: <api-key>'[
{
"id": "cmwdkjtfh005gy0k4ggzzg1bs",
"brandId": "cmayvq3hk00017apshay5qezu",
"type": "<string>",
"name": "Autumn sale",
"subject": "Our autumn sale starts today",
"preheader": "<string>",
"status": "draft",
"scheduledAt": "2024-01-01T00:00:00Z",
"sentAt": "<string>",
"error": "<string>",
"campaignId": "<string>",
"audience": {
"all": true,
"groupIds": [
"<string>"
],
"excludeGroupIds": [
"<string>"
]
},
"createdBy": {
"id": "<string>",
"name": "<string>"
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
"summary": {
"recipients": 123,
"sent": 123,
"delivered": 123,
"opened": 123,
"clicked": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123,
"failed": 123,
"queued": 123,
"openRate": 123,
"clickRate": 123
}
}
]Authorizations
Query Parameters
Response
application/json
Success
object[]
generating while AI writes it (POST /email/ai), then draft, scheduled, sending, sent; failed when writing or sending failed (see error), canceled.
When it is scheduled, or, for a campaign email not scheduled yet, its planned time.
Was this page helpful?