Skip to main content

Create Endpoint

POST /v1/webhooks/endpoints

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

application/json

Resolved schema:

{
"properties": {
"url": {
"type": "string",
"title": "Url"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"event_patterns": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Event Patterns"
},
"timeout_seconds": {
"type": "integer",
"maximum": 60,
"minimum": 3,
"title": "Timeout Seconds",
"default": 10
},
"max_retries": {
"type": "integer",
"maximum": 7,
"minimum": 1,
"title": "Max Retries",
"default": 7
}
},
"type": "object",
"required": [
"url"
],
"title": "WebhookEndpointCreateRequest"
}

Field details:

FieldTypeRequiredDescriptionConstraints
urlstringYes
descriptionstring | nullNonullable
event_patternsarray<string> | nullNonullable
event_patterns[]stringNo
timeout_secondsintegerNodefault=10, min=3, max=60
max_retriesintegerNodefault=7, min=1, max=7

Responses

200

Successful Response

application/json

Resolved schema:

{
"properties": {
"endpoint": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"user_id": {
"type": "integer",
"title": "User Id"
},
"url": {
"type": "string",
"title": "Url"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"status": {
"type": "string",
"title": "Status"
},
"enabled": {
"type": "boolean",
"title": "Enabled"
},
"subscribed_event_patterns": {
"items": {
"type": "string"
},
"type": "array",
"title": "Subscribed Event Patterns"
},
"signing_version": {
"type": "string",
"title": "Signing Version"
},
"secret_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Secret Hint"
},
"timeout_seconds": {
"type": "integer",
"title": "Timeout Seconds"
},
"max_retries": {
"type": "integer",
"title": "Max Retries"
},
"consecutive_failures": {
"type": "integer",
"title": "Consecutive Failures"
},
"last_verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Verified At"
},
"last_delivery_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Delivery At"
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Last Error"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
}
},
"type": "object",
"required": [
"id",
"user_id",
"url",
"status",
"enabled",
"signing_version",
"timeout_seconds",
"max_retries",
"consecutive_failures",
"created_at",
"updated_at"
],
"title": "WebhookEndpointResponse"
},
"secret": {
"type": "string",
"title": "Secret"
}
},
"type": "object",
"required": [
"endpoint",
"secret"
],
"title": "WebhookEndpointCreateResponse"
}

Field details:

FieldTypeRequiredDescriptionConstraints
endpointobjectYes
endpoint.idstringYes
endpoint.user_idintegerYes
endpoint.urlstringYes
endpoint.descriptionstring | nullNonullable
endpoint.statusstringYes
endpoint.enabledbooleanYes
endpoint.subscribed_event_patternsarray<string>No
endpoint.subscribed_event_patterns[]stringNo
endpoint.signing_versionstringYes
endpoint.secret_hintstring | nullNonullable
endpoint.timeout_secondsintegerYes
endpoint.max_retriesintegerYes
endpoint.consecutive_failuresintegerYes
endpoint.last_verified_atstring | nullNoformat=date-time, nullable
endpoint.last_delivery_atstring | nullNoformat=date-time, nullable
endpoint.last_errorstring | nullNonullable
endpoint.created_atstringYesformat=date-time
endpoint.updated_atstringYesformat=date-time
secretstringYes

422

Validation Error

application/json

Resolved schema:

{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}

Field details:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo