Skip to main content

Endpoint

POST /api/v1/statuses
Authentification : x-api-key: <api_key>
Les statuts nécessitent le plan Starter ou supérieur.

Paramètres

Body

ChampTypeRequisDescription
instanceIdUUIDouiInstance source
typetext | imageouiType du statut
contentstringouiTexte ou URL publique de l’image
captionstringnonLégende si image
backgroundColorstringnonCouleur hex si texte

Statut texte

curl -X POST https://srv.msgflash.com/api/v1/statuses \
  -H "x-api-key: msgf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "instanceId": "YOUR_INSTANCE_ID",
    "type": "text",
    "content": "Nouvelle collection disponible.",
    "backgroundColor": "#00a884"
  }'

Statut image

curl -X POST https://srv.msgflash.com/api/v1/statuses \
  -H "x-api-key: msgf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "instanceId": "YOUR_INSTANCE_ID",
    "type": "image",
    "content": "https://cdn.example.com/promo.jpg",
    "caption": "Promo du weekend"
  }'

Réponse

{
  "data": {
    "instanceId": "YOUR_INSTANCE_ID",
    "providerMessageId": "BAE5D1A2B3C4D5E6"
  }
}
Les statuts consomment le même quota mensuel que les messages.

Erreurs courantes

CodeHTTPQuand
STATUSES_NOT_AVAILABLE_ON_PLAN403Plan trop faible
NOT_FOUND404Instance introuvable
MONTHLY_OUTBOUND_QUOTA_EXCEEDED429Quota mensuel épuisé