BitelioBitelio

Claim surveys, help and offers for a mobile backend

Requires retention:view, retention:edit and retention:activate. Mobile API must be enabled. Claims up to20 current programme messages after current programme, withdrawal, actor and subsequent-purchase checks. Each message is handed off once. Deliver before claimExpiresAt and report an actual result; do not send an expired claim. The merchant must verify its native notification consent and use its own APNs/FCM provider. Store capability and receipt tokens securely; never put an sk_ key in the mobile app. Limit120 requests/minute shared perproject. The kind discriminator distinguishes SURVEY, HELP, ALTERNATIVE, REPLENISHMENT and RECOMMEND. Open url for the complete content; never render a help or offer message as a survey. Non-survey messages carry a pinned message snapshot and use a separate message capability. The legacy survey-deliveries claim endpoint remains invitation-only. Non-survey mobile messages additionally require an ACTIVE RETENTION permission for that customer, registered through /v1/retention/mobile-permissions. A revoked permission blocks every mobile claim, including legacy surveys.

POST
/v1/retention/messages/claim

Authorization

ApiKeyAuth

AuthorizationBearer <token>

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.

In: header

Request Body

application/json

after?string
Lengthlength <= 100
[key: string]?never

Response Body

application/json

curl -X POST "https://bitelio-api.heltia.com/v1/retention/messages/claim" \  -H "Content-Type: application/json" \  -d '{}'
{
  "items": [
    {
      "deliveryId": "string",
      "receiptToken": "string",
      "surveyUrl": "string",
      "surveyToken": "string",
      "contactId": "string",
      "locale": "string",
      "title": "string",
      "body": "string",
      "expiresAt": "2019-08-24T14:15:22Z",
      "claimExpiresAt": "2019-08-24T14:15:22Z",
      "kind": "SURVEY",
      "url": "http://example.com"
    }
  ]
}
Empty
Empty
Empty
Empty
Empty