Skip to main content
POST
/
api
/
v1
/
webhooks
Create a webhook endpoint
curl --request POST \
  --url https://api.optimaldial.com/api/v1/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "description": "<string>",
  "events": [
    "upload.completed",
    "upload.failed"
  ]
}
'
{
  "webhook": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "url": "<string>",
    "events": [
      "upload.created"
    ],
    "is_active": true,
    "consecutive_failures": 1,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "verified_at": "2023-11-07T05:31:56Z",
    "last_success_at": "2023-11-07T05:31:56Z",
    "last_failure_at": "2023-11-07T05:31:56Z",
    "disabled_at": "2023-11-07T05:31:56Z"
  },
  "secret": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
}

Authorizations

Authorization
string
header
required

OptimalDial API key, prefixed od_live_, sent as Authorization: Bearer .... Mint keys in the in-app developer panel; they are scoped to a single organization.

Body

application/json
url
string<uri>
required

HTTPS URL on a publicly resolvable host.

description
string
Maximum string length: 500
events
enum<string>[]
Available options:
upload.created,
upload.completed,
upload.failed

Response

Endpoint created and ping-verified.

webhook
object
required
secret
string
required

64-char hex string. Returned only on creation.

Example:

"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"