1MSG

Get WhatsApp Flow Details

GET
/flows/{flowId}

Return a single WhatsApp Flow, including status, categories, and validation errors when requested via fields.

Authorization

JWT token
querytoken<token>

Path Parameters

flowId*string

Flow identifier

Query Parameters

fields?string

Comma list of fields to return (id,name,status,categories,preview,validation_errors,json_version,data_api_version,endpoint_uri,data_channel_uri,whatsapp_business_account)

Response Body

Flow details

application/json
  1. response
id?string
name?string
status?FlowStatus

WhatsApp Flow status

Value in"DRAFT""PUBLISHED""DEPRECATED"
categories?array<>
validationErrors?array<>
jsonVersion?string
dataApiVersion?string
endpointUri?string

HTTPS URL of your server for this Flow data channel. This is not a 1msg route, and these calls are not delivered to the channel webhookUrl.

WhatsApp POSTs JSON with encrypted_flow_data, encrypted_aes_key, and initial_vector. Decrypt encrypted_aes_key with the RSA private key that matches the uploaded business_public_key (RSA-OAEP, SHA-256), then decrypt encrypted_flow_data with AES-128-GCM (initial_vector is the IV; the last 16 bytes of the ciphertext are the auth tag). Respond with that ciphertext as a base64 string and header Content-Type: text/plain. Encrypt the response with the same AES key and the IV after inverting every byte. If decryption fails, respond with HTTP 421 so the WhatsApp app fetches the public key again.

The same URL receives the service ping. Answer it in the same encrypted form; the decrypted body is {"data":{"status":"active"}}. ping and screen exchanges do not arrive on the channel webhook. When the user submits the form, the result is delivered to the channel webhookUrl as messages[].interactive.type = nfm_reply.

Upload the public key with POST /whatsapp_business_encryption and call GET /whatsapp_business_encryption until business_public_key_signature_status is VALID.

Formaturi
dataChannelUri?string
Formaturi
preview?
whatsappBusinessAccount?
curl -X GET 'https://api.1msg.io/123/flows/string'
{  "id": "string",  "name": "string",  "status": "DRAFT",  "categories": [    "SIGN_UP"  ],  "validationErrors": [    {      "error": "string",      "errorType": "string",      "message": "string",      "lineStart": 0,      "lineEnd": 0,      "columnStart": 0,      "columnEnd": 0,      "pointers": [        {          "lineStart": 0,          "lineEnd": 0,          "columnStart": 0,          "columnEnd": 0,          "path": "string"        }      ]    }  ],  "jsonVersion": "string",  "dataApiVersion": "string",  "endpointUri": "http://example.com",  "dataChannelUri": "http://example.com",  "preview": {    "previewUrl": "http://example.com",    "expiresAt": "2019-08-24T14:15:22Z",    "id": "string"  },  "whatsappBusinessAccount": {}}