4 endpoints · base URL https://flexysure.intrepidprojects.co.ke/api/v1
Send SMS from the organisation's sender ID and read the outbox, in Insurance Cloud's shapes. Each message costs one unit per 160-character segment from the organisation's SMS balance; a message that cannot be sent (bad number, no units, provider rejection) costs nothing. In the demo the provider is simulated and messages are marked sent at once.
Sends every item and reports each one. 200 when all were sent; 207 Multi-Status when any failed (the others still went). transaction labels the messages (default "API SMS"); an item's own transaction wins. uuid in each result can be fetched with GET /sms/{uuid}.
Scope
messaging
Authentication
Bearer token
Rate limit
60 requests per minute per token (per-client override)
Idempotency
Required: send an Idempotency-Key; a retry with the same key replays the first response.
Agent headers
Accepts X-Agent-Code and X-Agent-Key: the call runs as that agent and sees only the agent's own records.
Headers
Header
Meaning
Authorization
Bearer <access_token> (scope messaging)
Idempotency-Key
Required. A replay returns the first response and sends nothing.
X-Agent-Code
Optional. Agent code of the selling agent; the call runs with that agent's visibility.
X-Agent-Key
Optional, with X-Agent-Code. The agent's API key; a mismatch returns 403 agent_denied.
Body fields
Field
Type
Required
Description
transaction
string
No
Default label for the batch.
Example: Renewal reminder
sms
object[]
Yes
1 to 500 messages.
sms[].phone
string
Yes
Example: 0712345678
sms[].message
string
Yes
Example: Dear Wanjiru, your motor policy renews on 13 Oct.