View Categories

Subscribe to events

< 1 min read

POST/webhooks

Code Samples #

  • 💻 cURL
  • 📄 JavaScript
  • 🐍 Python
  • 🐘 PHP
  • 🔷 C#
  • Java
Copy
curl --request POST \
  --url 'https://api.taskflow.example.com/v2/webhooks' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "url": "https://example.com",
    "events": [
        "job.done"
    ]
}'

Response #

Copy
{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "url": "https://example.com",
    "events": [
        "string"
    ]
}

Request Body #

Content type: application/jsonrequired

FieldTypeRequiredDescription
urlstring (uri)Required
eventsarray of stringRequired
📋
Example request
Copy
{
    "url": "https://example.com",
    "events": [
        "job.done"
    ]
}

Responses #

201 — Subscribed #

FieldTypeRequiredDescription
idstring (uuid)Optional
urlstring (uri)Optional
eventsarray of stringOptional
📋
Example 201 response
Copy
{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "url": "https://example.com",
    "events": [
        "string"
    ]
}

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.