Hira Documentation
FR EN
Free trial

API reference

Every route, its fields and an example.

All routes live under https://hira.localtechstudio.com/api/v1 and need the Authorization: Bearer pk_live_… header. The full machine-readable specification is available as OpenAPI 3.1.

Messages#

GET/messages

Conversation history (connectionId + to E.164, cursor after)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/messages \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/messages

Send a message (exactly one content field; includes video, product, productList)

Request body

FieldType
connectionId *string
to *string
E.164
textstring
imageobject
documentobject
audioobject
templateobject
buttonsobject
listobject
ctaobject
smartobject
Texte libre si fenêtre 24 h ouverte, sinon template
otpobject
flowobject
callPermissionRequestobject
reactionobject
rawobject

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/messages \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"con_01H…","to":"+237600000000","text":"Bonjour"}'

Responses

  • 200 Accepté par Meta
  • 409 Connexion inactive
  • 422 Données invalides ou refus Graph
  • 402 Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
GET/messages/{id}

Message status

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/messages/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès

Connected numbers#

POST/connect-links

Create a one-time link to connect a number (partner key required). Optional externalRef and expiresInMinutes (60 by default, 10,080 max). The url is returned once and can be used for a single connection

Request body

FieldType
externalRefstring
expiresInMinutesinteger

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/connect-links \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"externalRef":"client-4821","expiresInMinutes":60}'

Responses

  • 201 Lien créé
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
GET/connections

List connected numbers

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/connections \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/connections/{id}

Connection details (never includes the token)

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/connections/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 404 Introuvable
DELETE/connections/{id}

Disconnect a number from the platform (token cleared). Reconnect later via Embedded Signup without using an extra slot

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/connections/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Déconnecté
  • 404 Introuvable
  • 409 Déjà déconnecté
GET/connections/{id}/catalogs

Meta product catalogs linked to the WABA

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/connections/…/catalogs \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 409 Connexion inactive
GET/connections/{id}/catalogs/{catalogId}/products

Products of a Meta catalog

Path parameters

  • id string
  • catalogId string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/connections/…/catalogs/…/products \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/connections/{id}/calling

Calling settings of the number

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/connections/…/calling \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 409 Numéro inactif ou en coexistence (calling_not_supported)
PATCH/connections/{id}/calling

Update calling settings: activation, call icon, opening hours, callback permission

Path parameters

  • id string

Request body

FieldType
statusENABLED | DISABLED
callIconVisibilityDEFAULT | DISABLE_ALL
callbackPermissionStatusENABLED | DISABLED
callHoursobject

Example

Terminal
curl -X PATCH https://hira.localtechstudio.com/api/v1/connections/…/calling \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"status":"ENABLED","callIconVisibility":"DEFAULT","callbackPermissionStatus":"ENABLED","callHours":{"status":"ENABLED","timezoneId":"string","weeklyOperatingHours":["string"],"holidaySchedule":["string"]}}'

Responses

  • 200 Succès
  • 409 Numéro inactif ou en coexistence (calling_not_supported)
GET/connections/{id}/call-permissions

A customer's call permission (query parameter to) and remaining limits

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/connections/…/call-permissions \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès

Contacts and tags#

GET/contacts

List contacts (filters companyId, tag, q, optedOut)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/contacts \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Liste paginée
POST/contacts

Create or update a contact by number (normalised, one contact per number)

Request body

FieldType
companyIdstring
phone *string
countrystring
Pays du numéro s'il est écrit sans indicatif : code ISO ou indicatif
namestring
fieldsobject
tagsarray
consentboolean

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/contacts \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"companyId":"cmp_01H…","phone":"+237 6 99 12 34 56","name":"Awa","tags":["VIP"],"consent":true}'

Responses

  • 201 Créé
  • 200 Mis à jour
  • 422 Numéro invalide
POST/contacts/import

Import contacts (JSON rows or csv text, 50,000 rows max). Recognised columns: number, name, tags, consent, country (CM, SN, FR or 237, row by row); other columns become fields usable in variables

Request body

FieldType
companyIdstring
rowsarray
csvstring
tagsarray
consentboolean
defaultCountryCodestring

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/contacts/import \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"companyId":"string","rows":[{}],"csv":"string","tags":["string"],"consent":true,"defaultCountryCode":"string"}'

Responses

  • 200 Résumé : created, updated, invalid, duplicates, errors
GET/contacts/{id}

Contact details

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/contacts/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
PATCH/contacts/{id}

Update a contact (name, fields, tags, addTags, removeTags, consent)

Path parameters

  • id string

Example

Terminal
curl -X PATCH https://hira.localtechstudio.com/api/v1/contacts/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
DELETE/contacts/{id}

Delete a contact

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/contacts/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/contacts/{id}/opt-out

Opt a contact out: set aside from every campaign, including running ones

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/contacts/…/opt-out \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/contacts/{id}/opt-in

Opt a contact back in after they gave consent again

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/contacts/…/opt-in \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/tags

List tags and their contact count

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/tags \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès

Campaigns#

GET/campaigns

List campaigns (filters status, connectionId)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/campaigns \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Liste paginée
POST/campaigns

Prepare a campaign (draft). Content: template (Meta) or text (free-form 24h: {{name}}, {{phone}}, {{city}} or {{field:city}}, {{date}}, {{company}}, {{numero}}…). Recipients: recipients and/or audience. STOP skipped; MARKETING needs consent. Outside window → window_closed

Request body

FieldType
connectionId *string
templateobject
tpl_… ou { name, language } (requis sans text)
textstring
Message libre personnalisé (requis sans template), max 4096
namestring
recipientsarray
audienceobject
variableMaparray
requireConsentboolean
defaultCountryCodestring
Pays des numéros sans indicatif : code ISO (CM, SN, FR) ou indicatif (237)

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"con_01H…","template":{"name":"promo","language":"fr"},"audience":{"tags":["VIP"]},"variableMap":[{"source":"name","default":"cliente"}]}'

Responses

  • 201 Brouillon créé
  • 422 Données invalides ou liste vide
GET/campaigns/{id}

Campaign details and its recipients

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/campaigns/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/campaigns/{id}/preview

Check before sending: recipients kept, skipped by reason, estimated duration, number tier and quality, quota

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/campaigns/…/preview \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/campaigns/{id}/launch

Launch a campaign, or schedule it with scheduledAt (up to 60 days). The list is checked against the quota and the number tier before the first send

Path parameters

  • id string

Request body

FieldType
scheduledAtstring

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/launch \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"scheduledAt":"2026-12-01T08:00:00Z"}'

Responses

  • 202 Lancée ou programmée
  • 409 Déjà lancée
  • 422 Aucun destinataire éligible ou palier dépassé (daily_limit_exceeded)
  • 402 Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
POST/campaigns/{id}/pause

Pause a running campaign (immediate effect)

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/pause \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 409 invalid_campaign_state
POST/campaigns/{id}/resume

Resume a paused campaign

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/resume \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 202 Succès
  • 409 invalid_campaign_state
POST/campaigns/{id}/cancel

Cancel a campaign: remaining sends are set aside

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/cancel \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 409 invalid_campaign_state
POST/campaigns/{id}/test

Send a test to a number (counts toward the quota)

Path parameters

  • id string

Request body

FieldType
to *string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/test \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"to":"string"}'

Responses

  • 202 Succès
  • 402 Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
GET/campaigns/{id}/report

Report: delivery, read, reply, click and STOP rates, hour-by-hour curve, failure causes

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/campaigns/…/report \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/campaigns/{id}/export

CSV export of every recipient and its status

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/campaigns/…/export \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Fichier CSV
POST/campaigns/{id}/retarget

Follow up: creates a draft with those who did not read (not_read), did not reply (not_replied) or failed (failed)

Path parameters

  • id string

Request body

FieldType
mode *not_read | not_replied | failed
namestring

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/retarget \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"mode":"not_read"}'

Responses

  • 201 Brouillon créé
  • 422 Aucun destinataire à relancer

Automations#

GET/automations

List automations (filter connectionId)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/automations \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Liste paginée
POST/automations

Create an automation for a number: trigger (message_received, contact_created, campaign_completed, conversation_unanswered), up to 5 conditions and up to 5 actions (send_smart, send_template, add_tag, notify_team, webhook over https, send_flow, assign_conversation)

Request body

FieldType
connectionId *string
name *string
enabledboolean
trigger *message_received | contact_created | campaign_completed | conversation_unanswered
conditionsarray
actions *array

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/automations \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"con_01H…","name":"Accueil","trigger":"message_received","actions":[{"type":"add_tag","tag":"a_ecrit"}]}'

Responses

  • 201 Créée
  • 422 Données invalides
GET/automations/{id}

Automation details

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/automations/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
PATCH/automations/{id}

Update an automation (enabled: false pauses it)

Path parameters

  • id string

Example

Terminal
curl -X PATCH https://hira.localtechstudio.com/api/v1/automations/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
DELETE/automations/{id}

Delete an automation

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/automations/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/automations/{id}/runs

Run history: status, context, result per action and error

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/automations/…/runs \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Liste paginée

Templates and media#

POST/templates/sync

Sync templates from Meta

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/templates/sync \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/templates

List templates

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/templates \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/templates

Create a template

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/templates \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 201 Succès
GET/templates/{id}

Template details

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/templates/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
DELETE/templates/{id}

Delete a template

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/templates/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/media

Upload a media file (multipart, field file); deduplicated, quota counts new bytes only

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/media \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 201 Créé
  • 200 Déjà présent (dédupliqué)
  • 402 Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
POST/media/header-handle

Get a header_handle for a template

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/media/header-handle \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès

Webhooks#

GET/webhook-endpoints

List outgoing webhooks

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/webhook-endpoints \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/webhook-endpoints

Create a webhook (whsec_… secret shown once; deliveries signed with X-Wa-Signature)

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/webhook-endpoints \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/whatsapp","scope":"account"}'

Responses

  • 201 Succès
PATCH/webhook-endpoints/{id}

Update a webhook URL or events filter

Path parameters

  • id string

Example

Terminal
curl -X PATCH https://hira.localtechstudio.com/api/v1/webhook-endpoints/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
DELETE/webhook-endpoints/{id}

Delete a webhook

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/webhook-endpoints/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
GET/flow-endpoints

List Flow callbacks

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/flow-endpoints \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/flow-endpoints

Create a Flow callback

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/flow-endpoints \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 201 Succès
PATCH/flow-endpoints/{id}

Update a Flow callback URL

Path parameters

  • id string

Example

Terminal
curl -X PATCH https://hira.localtechstudio.com/api/v1/flow-endpoints/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
DELETE/flow-endpoints/{id}

Delete a Flow callback

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/flow-endpoints/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès

Calls#

GET/calls

List calls (filters connectionId, direction, status)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/calls \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Liste paginée
POST/calls

Start an outbound call with an SDP offer (the customer's permission is required)

Request body

FieldType
connectionId *string
to *string
E.164
sdpOffer *string
bizOpaqueCallbackDatastring

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/calls \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"con_01H…","to":"+237600000000","sdpOffer":"v=0…"}'

Responses

  • 201 Appel créé
  • 402 Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
GET/calls/{id}

Call details (a cal_… identifier or Meta's wacid… identifier)

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/calls/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 404 Introuvable
POST/calls/{id}/pre-accept

Pre-accept an inbound call with the SDP answer

Path parameters

  • id string

Request body

FieldType
sdpAnswer *string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/calls/…/pre-accept \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"sdpAnswer":"string"}'

Responses

  • 200 Succès
  • 409 Appel déjà terminé (invalid_call_state)
POST/calls/{id}/accept

Accept an inbound call with the SDP answer

Path parameters

  • id string

Request body

FieldType
sdpAnswer *string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/calls/…/accept \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"sdpAnswer":"v=0…"}'

Responses

  • 200 Succès
  • 409 Appel déjà terminé (invalid_call_state)
POST/calls/{id}/reject

Reject an inbound call

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/calls/…/reject \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 409 Appel déjà terminé (invalid_call_state)
POST/calls/{id}/terminate

Hang up a call

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/calls/…/terminate \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 409 Appel déjà terminé (invalid_call_state)

WhatsApp Flows#

GET/flows

List Flows

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/flows \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/flows

Create a Flow

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/flows \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 201 Succès
GET/flows/{id}

Flow details

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/flows/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
PATCH/flows/{id}

Update a Flow

Path parameters

  • id string

Example

Terminal
curl -X PATCH https://hira.localtechstudio.com/api/v1/flows/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
DELETE/flows/{id}

Delete a Flow

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/flows/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/flows/{id}/publish

Publish a Flow

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/flows/…/publish \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès

Companies and countries#

GET/companies

List companies

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/companies \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
POST/companies

Create a company (partner key). From the second company onward, requires multi_company (Business plan)

Request body

FieldType
name *string
externalRefstring
defaultCountrystring

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/companies \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","externalRef":"string","defaultCountry":"string"}'

Responses

  • 201 Créée
  • 402 Feature ou abonnement
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
PATCH/companies/{id}

Set the company default country (defaultCountry, ISO code or dial code, null to go back to the service default). It is used for numbers written without a country code

Path parameters

  • id string

Request body

FieldType
defaultCountry *string | null

Example

Terminal
curl -X PATCH https://hira.localtechstudio.com/api/v1/companies/… \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"defaultCountry":"string"}'

Responses

  • 200 Succès
  • 422 Pays inconnu
GET/countries

Countries recognised for phone number normalisation (code, name, dial code)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/countries \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès

API keys#

GET/api-keys

List API keys

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/api-keys \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Liste paginée
POST/api-keys

Create a key (the secret is shown once, partner key required)

Request body

FieldType
scopepartner | company
companyIdstring
namestring

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/api-keys \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"scope":"partner","companyId":"string","name":"string"}'

Responses

  • 201 Clé créée
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
DELETE/api-keys/{id}

Revoke a key

Path parameters

  • id string

Example

Terminal
curl -X DELETE https://hira.localtechstudio.com/api/v1/api-keys/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Révoquée
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
POST/api-keys/{id}/rotate

Renouveler une clé : une nouvelle clé est créée (secret en clair une seule fois) et l'ancienne reste valable 24 heures (clé partenaire requise)

Path parameters

  • id string

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/api-keys/…/rotate \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 201 Nouvelle clé
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)

Subscription and billing#

GET/plans

Plans and prices per currency (PROVISIONAL)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/plans \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
GET/subscription

Subscription, limits and usage of the account (partner key)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/subscription \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Abonnement
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
GET/invoices

List invoices (partner key)

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/invoices \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Succès
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
GET/invoices/{id}

Invoice details (partner key)

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/invoices/… \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Facture
  • 404 Introuvable
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
GET/invoices/{id}/pdf

PDF of a paid invoice, numbered WA-YYYY-NNNNNN (partner key)

Path parameters

  • id string

Example

Terminal
curl https://hira.localtechstudio.com/api/v1/invoices/…/pdf \
  -H "Authorization: Bearer pk_live_…"

Responses

  • 200 Fichier PDF
  • 404 Introuvable
  • 409 Facture non payée : invoice_not_paid
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)
POST/billing/checkout

Start a payment. XAF/XOF/KES → pawaPay (international Mobile Money phone, 202). EUR/USD → Stripe (payment.checkoutUrl, 201)

Request body

FieldType
plan *string
interval *monthly | yearly
currency *XAF | XOF | KES | EUR | USD
XAF/XOF/KES → pawaPay ; EUR/USD → Stripe
extraNumbersinteger
phonestring
Obligatoire pour XAF/XOF/KES (MSISDN international), interdit pour Stripe.
successUrlstring
cancelUrlstring

Example

Terminal
curl -X POST https://hira.localtechstudio.com/api/v1/billing/checkout \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"plan":"string","interval":"monthly","currency":"XAF","extraNumbers":0,"phone":"string","successUrl":"string","cancelUrl":"string"}'

Responses

  • 201 Stripe : session Checkout créée
  • 202 pawaPay : USSD envoyé
  • 422 Devise, plan ou numéro invalide
  • 503 Fournisseur de paiement indisponible
  • 403 Clé entreprise : clé partenaire requise (partner_key_required)