Toutes les routes sont sous https://hira.localtechstudio.com/api/v1 et demandent l'en-tête Authorization: Bearer pk_live_…. La spécification complète, lisible par vos outils, est disponible en OpenAPI 3.1.
Messages#
/messagesHistorique d'une conversation (connectionId + to E.164, curseur after)
Exemple
curl https://hira.localtechstudio.com/api/v1/messages \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/messagesEnvoyer un message (un seul champ de contenu ; types : text, image, video, document, audio, template, product, productList, …)
Corps de la requête
| Champ | Type |
|---|---|
connectionId * | string |
to * | string E.164 |
text | string |
image | object |
document | object |
audio | object |
template | object |
buttons | object |
list | object |
cta | object |
smart | object Texte libre si fenêtre 24 h ouverte, sinon template |
otp | object |
flow | object |
callPermissionRequest | object |
reaction | object |
raw | object |
Exemple
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"}'Réponses
200Accepté par Meta409Connexion inactive422Données invalides ou refus Graph402Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
/messages/{id}Statut d'un message
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/messages/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
Numéros connectés#
/connect-linksCréer un lien de connexion à usage unique (clé partenaire requise). externalRef et expiresInMinutes sont optionnels (60 par défaut, 10 080 au maximum) ; l'url n'est renvoyée qu'une fois
Corps de la requête
| Champ | Type |
|---|---|
externalRef | string |
expiresInMinutes | integer |
Exemple
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}'Réponses
201Lien créé403Clé entreprise : clé partenaire requise (partner_key_required)
/connectionsLister les numéros connectés
Exemple
curl https://hira.localtechstudio.com/api/v1/connections \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/connections/{id}Détail d'une connexion (sans token)
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/connections/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès404Introuvable
/connections/{id}Déconnecter un numéro de la plateforme (jeton vidé, statut disconnected). La reconnexion via Embedded Signup réutilise le même enregistrement et ne consomme pas de slot supplémentaire
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/connections/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Déconnecté404Introuvable409Déjà déconnecté
/connections/{id}/catalogsCatalogues produits Meta liés à la WABA
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/connections/…/catalogs \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès409Connexion inactive
/connections/{id}/catalogs/{catalogId}/productsProduits d'un catalogue Meta
Paramètres de chemin
idstringcatalogIdstring
Exemple
curl https://hira.localtechstudio.com/api/v1/connections/…/catalogs/…/products \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/connections/{id}/callingRéglages d'appel du numéro
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/connections/…/calling \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès409Numéro inactif ou en coexistence (calling_not_supported)
/connections/{id}/callingModifier les réglages d'appel : activation, icône d'appel, heures d'ouverture, permission de rappel
Paramètres de chemin
idstring
Corps de la requête
| Champ | Type |
|---|---|
status | ENABLED | DISABLED |
callIconVisibility | DEFAULT | DISABLE_ALL |
callbackPermissionStatus | ENABLED | DISABLED |
callHours | object |
Exemple
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"]}}'Réponses
200Succès409Numéro inactif ou en coexistence (calling_not_supported)
/connections/{id}/call-permissionsPermission d'appel d'un client (paramètre to) et limites restantes
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/connections/…/call-permissions \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
Contacts et tags#
/contactsLister les contacts (filtres companyId, tag, q, optedOut)
Exemple
curl https://hira.localtechstudio.com/api/v1/contacts \
-H "Authorization: Bearer pk_live_…"Réponses
200Liste paginée
/contactsCréer ou mettre à jour un contact par numéro (normalisé, un seul contact par numéro)
Corps de la requête
| Champ | Type |
|---|---|
companyId | string |
phone * | string |
country | string Pays du numéro s'il est écrit sans indicatif : code ISO ou indicatif |
name | string |
fields | object |
tags | array |
consent | boolean |
Exemple
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}'Réponses
201Créé200Mis à jour422Numéro invalide
/contacts/importImporter des contacts (rows JSON ou csv texte, 50 000 lignes max). Colonnes reconnues : numéro, nom, tags, consentement, pays (CM, SN, FR ou 237, ligne par ligne) ; les autres colonnes deviennent des champs utilisables dans les variables
Corps de la requête
| Champ | Type |
|---|---|
companyId | string |
rows | array |
csv | string |
tags | array |
consent | boolean |
defaultCountryCode | string |
Exemple
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"}'Réponses
200Résumé : created, updated, invalid, duplicates, errors
/contacts/{id}Détail d'un contact
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/contacts/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/contacts/{id}Modifier un contact (name, fields, tags, addTags, removeTags, consent)
Paramètres de chemin
idstring
Exemple
curl -X PATCH https://hira.localtechstudio.com/api/v1/contacts/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/contacts/{id}Supprimer un contact
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/contacts/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/contacts/{id}/opt-outDésinscrire un contact : écarté de toute campagne, y compris en cours
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/contacts/…/opt-out \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/contacts/{id}/opt-inRéinscrire un contact qui a redonné son consentement
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/contacts/…/opt-in \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/tagsLister les tags et le nombre de contacts
Exemple
curl https://hira.localtechstudio.com/api/v1/tags \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
Campagnes#
/campaignsLister les campagnes (filtres status, connectionId)
Exemple
curl https://hira.localtechstudio.com/api/v1/campaigns \
-H "Authorization: Bearer pk_live_…"Réponses
200Liste paginée
/campaignsPréparer une campagne (brouillon). Contenu : template (Meta) ou text (message libre 24 h : {{name}}, {{phone}}, {{ville}} ou {{field:ville}}, {{date}}, {{entreprise}}, {{numero}}…). Destinataires : recipients et/ou audience. STOP écarté ; MARKETING : consentement. Hors fenêtre → window_closed.
Corps de la requête
| Champ | Type |
|---|---|
connectionId * | string |
template | object tpl_… ou { name, language } (requis sans text) |
text | string Message libre personnalisé (requis sans template), max 4096 |
name | string |
recipients | array |
audience | object |
variableMap | array |
requireConsent | boolean |
defaultCountryCode | string Pays des numéros sans indicatif : code ISO (CM, SN, FR) ou indicatif (237) |
Exemple
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"}]}'Réponses
201Brouillon créé422Données invalides ou liste vide
/campaigns/{id}Détail de la campagne et de ses destinataires
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/campaigns/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/campaigns/{id}/previewVérifier avant envoi : destinataires retenus, écartés par raison, durée estimée, palier et qualité du numéro, quota
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/campaigns/…/preview \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/campaigns/{id}/launchLancer une campagne, ou la programmer avec scheduledAt (jusqu'à 60 jours). La liste est vérifiée contre le quota et le palier d'envoi du numéro avant le premier envoi
Paramètres de chemin
idstring
Corps de la requête
| Champ | Type |
|---|---|
scheduledAt | string |
Exemple
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"}'Réponses
202Lancée ou programmée409Déjà lancée422Aucun destinataire éligible ou palier dépassé (daily_limit_exceeded)402Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
/campaigns/{id}/pauseMettre en pause une campagne en cours (effet immédiat)
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/pause \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès409invalid_campaign_state
/campaigns/{id}/resumeReprendre une campagne en pause
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/resume \
-H "Authorization: Bearer pk_live_…"Réponses
202Succès409invalid_campaign_state
/campaigns/{id}/cancelAnnuler une campagne : les envois restants sont écartés
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/cancel \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès409invalid_campaign_state
/campaigns/{id}/testEnvoyer un test à un numéro (compte dans le quota)
Paramètres de chemin
idstring
Corps de la requête
| Champ | Type |
|---|---|
to * | string |
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/campaigns/…/test \
-H "Authorization: Bearer pk_live_…" \
-H "Content-Type: application/json" \
-d '{"to":"string"}'Réponses
202Succès402Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
/campaigns/{id}/reportRapport : taux de livraison, lecture, réponse, clic, STOP, courbe heure par heure, causes d'échec
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/campaigns/…/report \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/campaigns/{id}/exportExport CSV de chaque destinataire et de son statut
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/campaigns/…/export \
-H "Authorization: Bearer pk_live_…"Réponses
200Fichier CSV
/campaigns/{id}/retargetRelancer : crée un brouillon avec ceux qui n'ont pas lu (not_read), pas répondu (not_replied) ou en échec (failed)
Paramètres de chemin
idstring
Corps de la requête
| Champ | Type |
|---|---|
mode * | not_read | not_replied | failed |
name | string |
Exemple
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"}'Réponses
201Brouillon créé422Aucun destinataire à relancer
Automations#
/automationsLister les automations (filtre connectionId)
Exemple
curl https://hira.localtechstudio.com/api/v1/automations \
-H "Authorization: Bearer pk_live_…"Réponses
200Liste paginée
/automationsCréer une automation. Déclencheurs : message_received, contact_created, campaign_completed, conversation_unanswered. Actions (max 5) : send_smart, send_template, add_tag, notify_team, webhook, send_flow, assign_conversation. Conditions optionnelles : text_contains, has_tag, not_has_tag, unanswered_minutes.
Corps de la requête
| Champ | Type |
|---|---|
connectionId * | string |
name * | string |
enabled | boolean |
trigger * | message_received | contact_created | campaign_completed | conversation_unanswered |
conditions | array |
actions * | array |
Exemple
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"}]}'Réponses
201Créée422Données invalides
/automations/{id}Détail d'une automation
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/automations/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/automations/{id}Modifier une automation
Paramètres de chemin
idstring
Exemple
curl -X PATCH https://hira.localtechstudio.com/api/v1/automations/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/automations/{id}Supprimer une automation
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/automations/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/automations/{id}/runsHistorique des exécutions
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/automations/…/runs \
-H "Authorization: Bearer pk_live_…"Réponses
200Liste paginée
Templates et médias#
/templates/syncSynchroniser les templates depuis Meta
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/templates/sync \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/templatesLister les templates
Exemple
curl https://hira.localtechstudio.com/api/v1/templates \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/templatesCréer un template
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/templates \
-H "Authorization: Bearer pk_live_…"Réponses
201Succès
/templates/{id}Détail d'un template
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/templates/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/templates/{id}Supprimer un template
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/templates/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/mediaTéléverser un média (multipart, champ file) ; dédupliqué, quota en octets neufs
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/media \
-H "Authorization: Bearer pk_live_…"Réponses
201Créé200Déjà présent (dédupliqué)402Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
/media/header-handleObtenir un header_handle pour un template
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/media/header-handle \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
Webhooks#
/webhook-endpointsLister les webhooks sortants
Exemple
curl https://hira.localtechstudio.com/api/v1/webhook-endpoints \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/webhook-endpointsCréer un webhook (secret whsec_… affiché une fois ; livraisons signées X-Wa-Signature)
Exemple
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"}'Réponses
201Succès
/webhook-endpoints/{id}Modifier l'URL ou le filtre events d'un webhook
Paramètres de chemin
idstring
Exemple
curl -X PATCH https://hira.localtechstudio.com/api/v1/webhook-endpoints/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/webhook-endpoints/{id}Supprimer un webhook
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/webhook-endpoints/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/flow-endpointsLister les callbacks Flows
Exemple
curl https://hira.localtechstudio.com/api/v1/flow-endpoints \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/flow-endpointsCréer un callback Flows
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/flow-endpoints \
-H "Authorization: Bearer pk_live_…"Réponses
201Succès
/flow-endpoints/{id}Modifier l'URL d'un callback Flows
Paramètres de chemin
idstring
Exemple
curl -X PATCH https://hira.localtechstudio.com/api/v1/flow-endpoints/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/flow-endpoints/{id}Supprimer un callback Flows
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/flow-endpoints/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
Appels#
/callsLister les appels (filtres connectionId, direction, status)
Exemple
curl https://hira.localtechstudio.com/api/v1/calls \
-H "Authorization: Bearer pk_live_…"Réponses
200Liste paginée
/callsLancer un appel sortant avec une offre SDP (permission du client requise)
Corps de la requête
| Champ | Type |
|---|---|
connectionId * | string |
to * | string E.164 |
sdpOffer * | string |
bizOpaqueCallbackData | string |
Exemple
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…"}'Réponses
201Appel créé402Quota ou abonnement : error.code = plan_limit_numbers | plan_limit_messages | plan_limit_media | subscription_past_due
/calls/{id}Détail d'un appel (identifiant cal_… ou identifiant Meta wacid…)
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/calls/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès404Introuvable
/calls/{id}/pre-acceptPré-accepter un appel entrant avec la réponse SDP
Paramètres de chemin
idstring
Corps de la requête
| Champ | Type |
|---|---|
sdpAnswer * | string |
Exemple
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"}'Réponses
200Succès409Appel déjà terminé (invalid_call_state)
/calls/{id}/acceptAccepter un appel entrant avec la réponse SDP
Paramètres de chemin
idstring
Corps de la requête
| Champ | Type |
|---|---|
sdpAnswer * | string |
Exemple
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…"}'Réponses
200Succès409Appel déjà terminé (invalid_call_state)
/calls/{id}/rejectRefuser un appel entrant
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/calls/…/reject \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès409Appel déjà terminé (invalid_call_state)
/calls/{id}/terminateRaccrocher un appel
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/calls/…/terminate \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès409Appel déjà terminé (invalid_call_state)
WhatsApp Flows#
/flowsLister les Flows
Exemple
curl https://hira.localtechstudio.com/api/v1/flows \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/flowsCréer un Flow
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/flows \
-H "Authorization: Bearer pk_live_…"Réponses
201Succès
/flows/{id}Détail d'un Flow
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/flows/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/flows/{id}Modifier un Flow
Paramètres de chemin
idstring
Exemple
curl -X PATCH https://hira.localtechstudio.com/api/v1/flows/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/flows/{id}Supprimer un Flow
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/flows/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/flows/{id}/publishPublier un Flow
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/flows/…/publish \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
Entreprises et pays#
/companiesLister les entreprises
Exemple
curl https://hira.localtechstudio.com/api/v1/companies \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
/companiesCréer une entreprise (clé partenaire). À partir de la 2ᵉ, exige la feature multi_company (plan Business)
Corps de la requête
| Champ | Type |
|---|---|
name * | string |
externalRef | string |
defaultCountry | string |
Exemple
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"}'Réponses
201Créée402Feature ou abonnement403Clé entreprise : clé partenaire requise (partner_key_required)
/companies/{id}Définir le pays par défaut de l'entreprise (defaultCountry, code ISO ou indicatif, null pour revenir au défaut du service) : il sert aux numéros écrits sans indicatif
Paramètres de chemin
idstring
Corps de la requête
| Champ | Type |
|---|---|
defaultCountry * | string | null |
Exemple
curl -X PATCH https://hira.localtechstudio.com/api/v1/companies/… \
-H "Authorization: Bearer pk_live_…" \
-H "Content-Type: application/json" \
-d '{"defaultCountry":"string"}'Réponses
200Succès422Pays inconnu
/countriesPays reconnus pour la normalisation des numéros (code, nom, indicatif)
Exemple
curl https://hira.localtechstudio.com/api/v1/countries \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès
Clés d'accès#
/api-keysLister les clés API
Exemple
curl https://hira.localtechstudio.com/api/v1/api-keys \
-H "Authorization: Bearer pk_live_…"Réponses
200Liste paginée
/api-keysCréer une clé (secret en clair une seule fois, clé partenaire requise)
Corps de la requête
| Champ | Type |
|---|---|
scope | partner | company |
companyId | string |
name | string |
Exemple
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"}'Réponses
201Clé créée403Clé entreprise : clé partenaire requise (partner_key_required)
/api-keys/{id}Révoquer une clé
Paramètres de chemin
idstring
Exemple
curl -X DELETE https://hira.localtechstudio.com/api/v1/api-keys/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Révoquée403Clé entreprise : clé partenaire requise (partner_key_required)
/api-keys/{id}/rotateRenouveler une clé : une nouvelle clé est créée (secret en clair une seule fois) et l'ancienne reste valable 24 heures (clé partenaire requise)
Paramètres de chemin
idstring
Exemple
curl -X POST https://hira.localtechstudio.com/api/v1/api-keys/…/rotate \
-H "Authorization: Bearer pk_live_…"Réponses
201Nouvelle clé403Clé entreprise : clé partenaire requise (partner_key_required)
Abonnement et facturation#
/plansPlans et prix par devise (PROVISOIRES)
Exemple
curl https://hira.localtechstudio.com/api/v1/plans \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès403Clé entreprise : clé partenaire requise (partner_key_required)
/subscriptionAbonnement, limites et consommation du compte (clé partenaire)
Exemple
curl https://hira.localtechstudio.com/api/v1/subscription \
-H "Authorization: Bearer pk_live_…"Réponses
200Abonnement403Clé entreprise : clé partenaire requise (partner_key_required)
/invoicesLister les factures (clé partenaire)
Exemple
curl https://hira.localtechstudio.com/api/v1/invoices \
-H "Authorization: Bearer pk_live_…"Réponses
200Succès403Clé entreprise : clé partenaire requise (partner_key_required)
/invoices/{id}Détail d'une facture (clé partenaire)
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/invoices/… \
-H "Authorization: Bearer pk_live_…"Réponses
200Facture404Introuvable403Clé entreprise : clé partenaire requise (partner_key_required)
/invoices/{id}/pdfPDF d'une facture payée, numérotée WA-AAAA-NNNNNN (clé partenaire)
Paramètres de chemin
idstring
Exemple
curl https://hira.localtechstudio.com/api/v1/invoices/…/pdf \
-H "Authorization: Bearer pk_live_…"Réponses
200Fichier PDF404Introuvable409Facture non payée : invoice_not_paid403Clé entreprise : clé partenaire requise (partner_key_required)
/billing/checkoutDémarrer un paiement. XAF/XOF/KES → pawaPay (phone international, 202). EUR/USD → Stripe Checkout (payment.checkoutUrl, 201, phone interdit). Activation à la confirmation (callback pawaPay / webhook Stripe), idempotente.
Corps de la requête
| Champ | Type |
|---|---|
plan * | string |
interval * | monthly | yearly |
currency * | XAF | XOF | KES | EUR | USD XAF/XOF/KES → pawaPay ; EUR/USD → Stripe |
extraNumbers | integer |
phone | string Obligatoire pour XAF/XOF/KES (MSISDN international), interdit pour Stripe. |
successUrl | string |
cancelUrl | string |
Exemple
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"}'Réponses
201Stripe : session Checkout créée202pawaPay : USSD envoyé422Devise, plan ou numéro invalide503Fournisseur de paiement indisponible403Clé entreprise : clé partenaire requise (partner_key_required)