Campaigns
Update a campaign
Only draft and paused campaigns can be edited; any other status is `409 invalid_state`.
PATCH
Only draft and paused campaigns can be edited; any other status is
409 invalid_state.
httpheader
AuthorizationBearer <token>id*integerapplication/json- body
name?stringLength
length <= 200channel?"whatsapp"Value in
"whatsapp"audience_type?stringValue in
"segment""contact_list""tag""csv"audience_ref?string|nulltemplate?array<string>|nullpayload?array<string>|nullschedule_at?|Format
date-timetimezone?|Length
length <= 64Campaign
application/json- response
data*curl -X PATCH 'https://app.orqo.site/api/v1/campaigns/0' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "data": { "id": 0, "name": "string", "channel": "string", "status": "string", "audience_type": "string", "audience_ref": "string", "template": [ null ], "payload": [ null ], "schedule_at": "string", "timezone": "string", "stats": { "total": 0, "queued": 0, "sent": 0, "delivered": 0, "read": 0, "failed": 0 }, "created_at": "string", "updated_at": "string" }}Retrieve a campaign GET
`stats` are recomputed from the recipients on every call.
Create or update a contact POST
Contacts are matched like everywhere else in ORQO: by `phone_e164`, or by `email` when no phone is given. A new contact is `201`; an existing one (or a deleted one with that number, which is restored) is updated and returned with `200`. `custom_fields` keys must be contact fields defined in Settings. Send an `Idempotency-Key` header to retry safely.