Skip to Content

Set a flow's endpoint

Sets the HTTPS endpoint Samva forwards the flow's data-exchange requests to, signed like a webhook delivery.

PUT
/v1/whatsapp/flows/{id}/endpoint

Sets the HTTPS endpoint Samva forwards the flow's data-exchange requests to, signed like a webhook delivery. The flow's first endpoint is issued a signing secret, returned once; changing the URL keeps the secret.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^waflow_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
url*string

Response Body

WhatsAppFlowEndpointSettings

application/json
  1. response
url*string
updatedAt*string
secret?string
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.whatsappFlows.setEndpoint({
  "id": "example",
  "url": "example"
});
Example Response
{
  "url": "string",
  "updatedAt": "string",
  "secret": "string"
}

Related documentation