{"components":{"schemas":{"Error":{"properties":{"error":{"properties":{"code":{"enum":["unauthorized","key_expired","idempotency_key_required","invalid_idempotency_key","insufficient_balance","sender_phone_not_verified","sender_name_required","sender_name_pending","organization_not_verified","ip_not_allowed","read_only_key","not_found","not_cancellable","request_in_progress","idempotency_key_reused","invalid_request","invalid_phone","credits_too_low","batch_too_large","nothing_to_schedule","content_not_allowed","key_unavailable","recipient_suppressed","no_recipients","too_many_recipients","message_too_long","invalid_template","nobody_to_send_to","delivery_risk_not_acknowledged","too_many_reminders","too_many_people","invite_limit","key_spend_cap_reached","hourly_cap_reached","rate_limited"],"type":"string"},"details":{"type":"object"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"},"Held":{"properties":{"hold_id":{"type":["integer","string"]},"status":{"examples":["held_for_review"],"type":"string"}},"type":"object"},"Quote":{"properties":{"can_afford":{"type":"boolean"},"invitations":{"type":"integer"},"kind":{"enum":["standard","personalised"],"type":"string"},"left_out":{"items":{"properties":{"index":{"type":"integer"},"reason":{"type":"string"},"recipient_phone":{"type":"string"}},"type":"object"},"type":"array"},"messages":{"type":"integer"},"people":{"type":"integer"},"sample":{"type":["string","null"]},"total_kes":{"type":"integer"},"wallet_balance_kes":{"type":"integer"}},"type":"object"},"Reminder":{"properties":{"credits_spent":{"type":"integer"},"id":{"type":"integer"},"livemode":{"type":"boolean"},"recipient_phone":{"type":"string"},"status":{"type":"string"},"target_date":{"format":"date","type":"string"}},"type":"object"},"ReminderBatchRequest":{"properties":{"reminders":{"items":{"$ref":"#/components/schemas/ReminderRequest"},"maxItems":50,"type":"array"}},"required":["reminders"],"type":"object"},"ReminderQuote":{"properties":{"can_afford":{"type":"boolean"},"delivery_risk":{"type":"boolean"},"invitation":{"type":"boolean"},"recipient_phone":{"type":"string"},"recipient_suppressed":{"type":"boolean"},"sms_scheduled":{"type":"integer"},"target_date":{"format":"date","type":"string"},"total_kes":{"type":"integer"},"wallet_balance_kes":{"type":"integer"},"warnings":{"items":{"type":"object"},"type":"array"}},"type":"object"},"ReminderRequest":{"properties":{"acknowledge_delivery_risk":{"type":"boolean"},"credits_kes":{"minimum":1,"type":"integer"},"message":{"type":"string"},"recipient_phone":{"type":"string"},"target_date":{"format":"date","type":"string"}},"required":["recipient_phone","message","target_date","credits_kes"],"type":"object"},"Send":{"properties":{"credits_spent":{"type":"integer"},"id":{"type":["integer","string"]},"invitations":{"type":"integer"},"kind":{"enum":["standard","personalised"],"type":"string"},"left_out":{"items":{"properties":{"index":{"type":"integer"},"reason":{"type":"string"},"recipient_phone":{"type":"string"}},"type":"object"},"type":"array"},"livemode":{"type":"boolean"},"messages":{"type":"integer"},"people":{"type":"integer"},"sample":{"type":["string","null"]},"status":{"type":"string"},"total_kes":{"type":"integer"},"wallet_balance_kes":{"type":"integer"}},"type":"object"},"SendRequest":{"description":"Give message or template, not both.","properties":{"max_credits_kes":{"description":"The most to spend. A dearer send is refused, never trimmed.","minimum":1,"type":"integer"},"message":{"description":"One SMS with the sender's name in front, at most 160 characters. No links, payment requests or offers.","type":"string"},"recipients":{"description":"With message: phone numbers. With template: objects with phone and values.","items":{"oneOf":[{"examples":["+254712345678"],"type":"string"},{"properties":{"phone":{"type":"string"},"values":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["phone"],"type":"object"}]},"minItems":1,"type":"array"},"template":{"description":"A text with {blanks}, up to 6, for a different message to each person.","type":"string"}},"required":["recipients"],"type":"object"},"SendStatus":{"properties":{"counts":{"additionalProperties":{"type":"integer"},"description":"accepted, waiting_for_answer, declined, expired, cancelled, left_out, pending","type":"object"},"credits_charged":{"type":"integer"},"id":{"type":["integer","string"]},"kind":{"type":"string"},"livemode":{"type":"boolean"},"people":{"type":"integer"},"recipients":{"items":{"properties":{"reason":{"type":["string","null"]},"recipient_phone":{"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"}},"type":"object"}},"securitySchemes":{"bearer":{"description":"An API key from the API keys page: uw_live_... sends for real, uw_test_... sends and charges nothing.","scheme":"bearer","type":"http"}}},"info":{"description":"Send an instant message, the same text to many people, or a personal message to each person from a template. Messages go out from one registered sender ID with the sender's name in front, paid in advance (KES 1 per SMS). Nobody is messaged until they agree: someone new gets one invitation (KES 1) and the message waits for their answer. Test keys (uw_test_...) answer like live keys but send and charge nothing. An MCP server for agents is at POST /mcp (see https://swiftcel.com/developers#agents).","summary":"SMS that just works, in Kenya.","title":"Swiftcel API","version":"1"},"openapi":"3.1.0","paths":{"/holds/{id}":{"get":{"operationId":"getHold","parameters":[{"description":"The hold's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}},"description":"The hold"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"A batch held for review, and what became of it"}},"/reminders":{"post":{"operationId":"createReminder","parameters":[{"description":"1 to 64 letters, digits and - _ : . Retrying with the same key returns the first answer and never sends twice.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":64,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reminder"}}},"description":"The reminder"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"Schedule a reminder for a date"}},"/reminders/batch":{"post":{"operationId":"createReminders","parameters":[{"description":"1 to 64 letters, digits and - _ : . Retrying with the same key returns the first answer and never sends twice.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":64,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderBatchRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reminder"}}},"description":"The reminders"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"Schedule many reminders at once (at most 50)"}},"/reminders/quote":{"post":{"operationId":"quoteReminder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderQuote"}}},"description":"The quote"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"What a reminder would do and cost (changes nothing)"}},"/reminders/{id}":{"delete":{"operationId":"cancelReminder","parameters":[{"description":"The reminder's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reminder"}}},"description":"The reminder, cancelled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"Cancel a reminder (unsent messages are refunded)"},"get":{"operationId":"getReminder","parameters":[{"description":"The reminder's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reminder"}}},"description":"The reminder"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"Retrieve a reminder"}},"/sends":{"post":{"description":"The same text to everyone (message), or a text with {blanks} and each person's values (template). Charged once, before anything is made. A text to two or more people may be read by a person first: the answer is then 202 held_for_review.","operationId":"createSend","parameters":[{"description":"1 to 64 letters, digits and - _ : . Retrying with the same key returns the first answer and never sends twice.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":64,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Send"}}},"description":"The send was made"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Held"}}},"description":"Held for review; nothing was charged"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"Send a message to one person or many"}},"/sends/quote":{"post":{"operationId":"quoteSend","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}},"description":"The quote"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"What a send would do and cost (changes nothing)"}},"/sends/{id}":{"get":{"operationId":"getSend","parameters":[{"description":"The send's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendStatus"}}},"description":"The send"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An error: see the codes listed in the Error schema"}},"summary":"How a send went, by person"}}},"security":[{"bearer":[]}],"servers":[{"url":"https://swiftcel.com/api/v1"}]}