webhook to workflow
# support
k
How can i add a webhook to a workflow via the client SDK?
v
To add a webhook to a workflow via the server SDK, include the
server
property with your webhook URL when creating or updating the workflow. Here’s a TypeScript example:
Copy code
typescript
await vapi.workflows.create({
  name: "My Workflow",
  nodes: [/* ... */],
  edges: [/* ... */],
  server: { url: "https://your-webhook-endpoint.com/webhook" }
});
Note: This is supported in the server SDK and REST API, but not documented for the browser client SDK. [See API reference](https://docs.vapi.ai/api-reference/workflow/workflow-controller-create) Sources: - [Create Workflow – API Reference](https://docs.vapi.ai/api-reference/workflow/workflow-controller-create) - [Update Workflow – API Reference](https://docs.vapi.ai/api-reference/workflow/workflow-controller-update)
k
@User Do I need to create a workflow in order to have a webhook? Or I'm trying to use a workflow from a json instead of having to create one through Vapi.
c
Hey Kai! Can you help me understand what you mean by how you can add a webhook to a workload? What exactly you are trying to achieve? This understanding will help me align with you and eventually suggest you better alternatives or solutions.
4 Views