Create a webhook configuration.
POST
/api/admin/webhooks
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "url": "https://example.com", "events": [ "example" ], "secret": "example", "headers": { "additionalProperty": "example" }, "retryPolicy": { "maxRetries": 1, "initialDelayMs": 1, "backoffMultiplier": 1, "maxDelayMs": 1 }, "timeoutMs": 1, "clientId": "example" }'Create Webhook in the Webhooks area. The request body is JSON unless the detailed schema for this operation states otherwise.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” X-Tenant-Id
string
Tenant selector for multi-tenant admin requests.
Idempotency-Key
string
Idempotency key for state-changing operations that support replay protection.
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
url
required
string format: uri
events
required
Array<string>
secret
string
headers
object
key
additional properties
string
retryPolicy
object
maxRetries
integer
initialDelayMs
integer
backoffMultiplier
number
maxDelayMs
integer
key
additional properties
timeoutMs
integer
clientId
string
key
additional properties
Example generated
{ "name": "example", "url": "https://example.com", "events": [ "example" ], "secret": "example", "headers": { "additionalProperty": "example" }, "retryPolicy": { "maxRetries": 1, "initialDelayMs": 1, "backoffMultiplier": 1, "maxDelayMs": 1 }, "timeoutMs": 1, "clientId": "example"}Responses
Section titled “ Responses ”Webhook created.
Media type application/json
object
success
required
boolean
webhook
One of:
object
id
string
tenantId
string
clientId
string | null
scope
string
name
string
url
string format: uri
events
Array<string>
hasSecret
boolean
headers
object
key
additional properties
string
retryPolicy
object
maxRetries
integer
initialDelayMs
integer
backoffMultiplier
number
maxDelayMs
integer
key
additional properties
timeoutMs
integer
active
boolean
createdAt
string
updatedAt
string
lastSuccessAt
string | null
lastFailureAt
string | null
key
additional properties
null
Example generated
{ "success": true, "webhook": { "id": "example", "tenantId": "example", "clientId": "example", "scope": "example", "name": "example", "url": "https://example.com", "events": [ "example" ], "hasSecret": true, "headers": { "additionalProperty": "example" }, "retryPolicy": { "maxRetries": 1, "initialDelayMs": 1, "backoffMultiplier": 1, "maxDelayMs": 1 }, "timeoutMs": 1, "active": true, "createdAt": "example", "updatedAt": "example", "lastSuccessAt": "example", "lastFailureAt": "example" }}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}