Saltar al contenido principal
POST
/
v1
/
webhook
Create Webhook
import requests

url = "http://localhost:3000/v1/webhook/"

payload = {
    "url": "<string>",
    "subscribed_events": ["status_changed"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "url": "<string>",
  "subscribed_events": [
    "status_changed"
  ],
  "created_date": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string<uri>
required

The URL that the webhook will call to send the events specified in the subscribed_events field

Minimum string length: 1
subscribed_events
enum<string>[]
required

The events that the webhook will send to the URL. Specify the different events you want the webhook to send to the URL

Opciones disponibles:
status_changed

Response

Successful Response

id
string<uuid>
required

The unique identifier for the webhook

url
string
required

The URL that the webhook will call to send the events specified in the subscribed_events field

subscribed_events
enum<string>[]
required

The events that the webhook will send to the URL. Specify the different events you want the webhook to send to the URL

Opciones disponibles:
status_changed
created_date
string<date-time>
required

The datetime when the webhook was created