Skip to main content
POST

Basic Usage


Request Body


Instagram

Instagram webhook support is prepared for rollout and is not yet deployed.
Use platform: "instagram" to receive Instagram events. Registration, authentication and signatures work the same as WhatsApp.
Instagram supports message_received, sent_message, message_sent, message_delivered, message_read, message_failed and all. Receipt events fire only when the state is recorded. call is WhatsApp-only. See Instagram Events for payloads.

Authentication

By default deliveries are sent with no credentials. Set auth_type and auth_config to have FlowIQ authenticate to your server on every delivery. OAuth2 client credentials. FlowIQ requests a token from token_url with grant_type=client_credentials (plus scope / audience if set), sending the client credentials as HTTP Basic auth. Set client_auth to "body" if your server expects client_id and client_secret in the form body instead. Tokens are cached and refreshed shortly before expires_in runs out.
If FlowIQ can’t build the configured authentication (for example your token endpoint is down or rejects the credentials), that delivery is skipped. It is never sent without the credentials you configured.

Examples


Response

Returns 201 Created. Credentials and the signing secret are never returned.

Error: Incomplete Authentication (400)

Returned when auth_type is unknown or its required auth_config fields are missing:

Use type: "all" to receive every event type through a single webhook subscription.
Webhooks can’t be edited through the API. To change one, delete it and create it again, or edit it in the FlowIQ dashboard.

Authorizations

Authorization
string
header
required

Your FlowIQ API key (from Settings → Profile → API Keys), sent as a bearer token. Format: Bearer fiq_YOUR_API_KEY

Body

application/json
url
string
required

HTTPS endpoint to receive events

Example:

"https://your-server.com/webhook"

type
enum<string>
required

Event type to subscribe to. call is WhatsApp-only; Instagram receipt events fire only when that state is recorded.

Available options:
message_received,
message_sent,
sent_message,
message_delivered,
message_read,
message_failed,
call,
all
Example:

"message_received"

platform
enum<string>
default:whatsapp

whatsapp (default), web, or instagram.

Available options:
whatsapp,
web,
instagram
Example:

"whatsapp"

auth_type
enum<string>
default:none

How FlowIQ authenticates to your server on every delivery

Available options:
none,
bearer,
basic,
api_key,
oauth2_client_credentials
auth_config
object | null

Credentials for auth_type. bearer: token. basic: username, password. api_key: value, optional header_name (default X-API-Key). oauth2_client_credentials: token_url, client_id, client_secret, optional scope, audience, client_auth (basic default, or body).

Example:
headers
object | null

Extra static headers sent with every delivery

Example:
secret
string | null

Signing secret. When set, each delivery carries X-Flowiq-Signature: sha256=<hex HMAC-SHA256 of the raw body>.

Response

Webhook created successfully. Credentials and the signing secret are never returned.

success
boolean
message
string
webhook
object