You can register webhook endpoints via the API to be notified about workflow events that happen in your workspace.

Register Webhook

To register a webhook, send a POST request to https://api.copy.ai/api/webhook with a JSON body containing your webhook URL, the event type you want to be notified about, and an optional workflow ID.

For example:

{
  "url": "<https://mywebsite.com/webhook>",
  "eventType": "workflowRun.completed",
  "workflowId": "<my-workflow-id>"
}

You will receive a response with the details of your registered webhook:

{
  "status": "success",
  "data": {
    "id": "<id of webhook>",
    "url": "<https://mywebsite.com/webhook>",
    "eventType": "workflowRun.completed",
    "workflowId": "<my-workflow-id>"
  }
}

Note: If a workflow ID is not included, you will receive events for all workflows in your workspace.

Event Types

Event TypeDescription
workflowRun.startedSends an event anytime a workflow run is started.
workflowRun.completedSends an event anytime a workflow run is completed.
workflowRun.failedSends an event anytime a workflow run fails.
workflowCreditLimit.reachedSends an event when your workspace reaches the credit limit.
Language
Authorization
Header
Click Try It! to start a request and see the response here!