Loyalty
Create a campaign
Create a wallet marketing campaign for the application. The campaign starts as a draft; targeting and message content can be refined before it is sent. The content (headline + body) is optional while drafting; its presence is validated at send time, not at draft creation, so a draft may carry no content. Scheduling (sendAt) is server-managed and handled by a dedicated future endpoint — it is not accepted here.
post/v1/loyalty/campaigns
Request
- Base URL: https://api.prod.keyban.io
- URL: https://api.prod.keyban.io/v1/loyalty/campaigns
- Auth: API key in header X-Api-Key
Request body
Example request
{
"application": "550e8400-e29b-41d4-a716-446655440000",
"name": "Summer menu launch",
"description": "Promote the new summer menu to recent visitors.",
"channels": [
"google",
"apple"
],
"targeting": {
"minPoints": 100,
"maxPoints": 500,
"minVisits": 3,
"rewardTierIds": [
"550e8400-e29b-41d4-a716-446655440000"
]
},
"content": {
"header": "New summer menu",
"body": "Come and taste our new summer menu this week."
}
}Response
Campaign created successfully
Example response
{
"application": "550e8400-e29b-41d4-a716-446655440000",
"name": "Summer menu launch",
"description": "Promote the new summer menu to recent visitors.",
"channels": [
"google",
"apple"
],
"targeting": {
"minPoints": 100,
"maxPoints": 500,
"minVisits": 3,
"rewardTierIds": [
"550e8400-e29b-41d4-a716-446655440000"
]
},
"content": {
"header": "New summer menu",
"body": "Come and taste our new summer menu this week."
},
"sendAt": "2026-06-23T10:00:00Z",
"status": "draft",
"audienceSnapshotCount": 1234,
"conversionWindowDays": 7,
"sentAt": "2026-06-15T14:30:00Z",
"scheduledImmediately": true
}Changes
No recorded changes to this operation across all 1 revision of this API.