POST /v1/admin/campaigns
Service: comms · operationId: (none)
Required scopes
(no scope declared — review service config)
Request body
{
"type": "object",
"properties": {
"brand_id": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
},
"subject": {
"type": "string",
"minLength": 1
},
"channel": {
"type": "string",
"default": "email"
},
"template_key": {
"type": "string",
"minLength": 1
},
"segment_criteria": {
"type": "object",
"additionalProperties": {},
"default": {}
},
"variables": {
"type": "object",
"additionalProperties": {},
"default": {}
}
},
"required": [
"brand_id",
"name",
"subject",
"template_key"
]
}Responses
201 Campaign created
{
"type": "object",
"properties": {
"campaign": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"brand_id": {
"type": "string"
},
"name": {
"type": "string"
},
"subject": {
"type": "string"
},
"channel": {
"type": "string"
},
"template_key": {
"type": "string"
},
"segment_criteria": {
"type": "object",
"additionalProperties": {}
},
"variables": {
"type": "object",
"additionalProperties": {}
},
"status": {
"type": "string"
},
"scheduled_at": {
"type": [
"string",
"null"
]
},
"sent_at": {
"type": [
"string",
"null"
]
},
"cancelled_at": {
"type": [
"string",
"null"
]
},
"created_by": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"brand_id",
"name",
"subject",
"channel",
"template_key",
"segment_criteria",
"variables",
"status",
"scheduled_at",
"sent_at",
"cancelled_at",
"created_by",
"created_at",
"updated_at"
]
}
},
"required": [
"campaign"
]
}500 Creation failed
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://comms.platform.loop.health/v1/admin/campaigns \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/comms— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced