Skip to content
Browse documentation

OpenAPI operations

Update or deprecate an event type

PATCH
/v1/event-types/{id}
curl --request PATCH \
--url https://api.hooks.events/v1/event-types/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "description": "example", "schema": { "additionalProperty": "example" }, "deprecated": true }'

Requires the endpoints:write scope.

id
required
string
Media typeapplication/json
object
description
Any of:
string
<= 500 characters
schema
Any of:
object
key
additional properties
deprecated
boolean

Example generated

{
"description": "example",
"schema": {
"additionalProperty": "example"
},
"deprecated": true
}

Success

Media typeapplication/json

Project event-type registry entry

object
id
required
string
name
required

Event type name, e.g. invoice.paid

string
description
required
string | null
schema
required
Any of:
object
key
additional properties
deprecatedAt
required
Any of:

ISO-8601 timestamp

string
createdAt
required

ISO-8601 timestamp

string
updatedAt
required

ISO-8601 timestamp

string
key
additional properties

Example generated

{
"id": "example",
"name": "example",
"description": "example",
"schema": {
"additionalProperty": "example"
},
"deprecatedAt": "example",
"createdAt": "example",
"updatedAt": "example"
}

Validation error

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}

Missing or invalid credentials

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}

The credential lacks the required scope, or the workspace is not writable

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}

Resource not found

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}

Rate limited

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}
X-RateLimit-Limit
integer

Requests allowed per window

X-RateLimit-Remaining
integer
X-RateLimit-Reset
integer

Seconds until the window resets