Register and publish a flow
Creates the flow's current version as a Meta flow on the business account of the named number, or of the default number, and publishes it.
POST
Creates the flow's current version as a Meta flow on the business account of the named number, or of the default number, and publishes it. A version already published there returns its registration. Meta's validator findings answer a validation error and stay on the draft registration.
apiKeyheader
x-api-key<token>id*stringMatch
^waflow_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
businessAccountId?WhatsAppBusinessAccountIdMatch
^waba_[0-9a-hjkmnp-tv-z]{16,24}$WhatsAppFlowRegistration
application/json- response
id*WhatsAppFlowRegistrationIdMatch
^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$flowId*WhatsAppFlowIdMatch
^waflow_[0-9a-hjkmnp-tv-z]{16,24}$versionId*WhatsAppFlowVersionIdMatch
^wafver_[0-9a-hjkmnp-tv-z]{16,24}$versionNumber*integerRange
-9007199254740991 <= value <= 9007199254740991wabaId*stringproviderFlowId*string|nullname*stringstatus*stringValue in
"draft""published""throttled""blocked""deprecated"validationErrors*array<>endpointAlerts*array<>publishedAt*string|nullstatusChangedAt*stringcreatedAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.whatsappFlows.register({
"id": "example"
});Example Response
{
"id": "string",
"flowId": "string",
"versionId": "string",
"versionNumber": -9007199254740991,
"wabaId": "string",
"providerFlowId": "string",
"name": "string",
"status": "draft",
"validationErrors": [
{
"error": "string",
"message": "string",
"path": "string",
"line": -9007199254740991,
"column": -9007199254740991
}
],
"endpointAlerts": [
{
"kind": "string",
"message": "string",
"value": 0,
"threshold": 0,
"activatedAt": "string"
}
],
"publishedAt": "string",
"statusChangedAt": "string",
"createdAt": "string",
"updatedAt": "string"
}