Skip to content
Browse documentation

OpenAPI operations

Create an endpoint

POST
/v1/endpoints
curl --request POST \
--url https://api.hooks.events/v1/endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "environmentId": "example", "provider": "generic", "verificationMode": "none", "secret": "example", "sourceConfig": { "eventType": "example", "deliveryId": "example", "actor": "example", "subjectTitle": "example", "secretHeader": "example", "secretLocation": "header", "secretParam": "example", "basicUsername": "example", "dedupe": { "key": "example", "windowSeconds": 1 } }, "rateLimitPerMinute": 1, "rateLimitAction": "store", "hooks": { "stages": { "received": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "before_transform": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "before_deliver": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "after_deliver": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "on_failure": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "on_dead": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ] } }, "destinations": [ { "name": "example", "url": "example", "headers": { "additionalProperty": "example" }, "timeoutMs": 1, "delaySeconds": 1, "retryPolicy": { "maxAttempts": 1, "initialDelaySeconds": 1, "maxDelaySeconds": 1, "backoff": "fixed", "jitter": 1, "retryAfter": true }, "rateLimitPerMinute": 1, "maxConcurrency": 1, "type": "example", "config": { "additionalProperty": "example" }, "method": "GET", "params": [ { "key": "example", "value": "example", "enabled": true } ], "auth": { "mode": "none", "token": "example", "username": "example", "password": "example", "key": "example", "value": "example", "addTo": "header", "secret": "example", "header": "example", "tokenUrl": "example", "clientId": "example", "clientSecret": "example", "scope": "example", "region": "example", "service": "example", "accessKeyId": "example", "secretAccessKey": "example", "sessionToken": "example", "serviceAccountJson": "example" }, "bodyMode": "none", "bodyTemplate": "example", "templateStrict": true, "filters": { "allow": [ { "field": "example", "op": "equals", "value": [ "example" ] } ], "deny": [ { "field": "example", "op": "equals", "value": [ "example" ] } ], "ignoreActors": [ "example" ], "ignoreBots": true, "senders": { "allow": { "logins": [ "example" ], "organizations": [ "example" ], "associations": [ "OWNER" ] }, "requireAllowlist": true, "allowForkPrs": true, "frequency": { "max": 1, "windowMinutes": 1, "key": "actor" } } }, "hooks": { "stages": { "received": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "before_transform": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "before_deliver": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "after_deliver": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "on_failure": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ], "on_dead": [ { "type": "drop", "condition": { "field": "example", "op": "equals", "value": [ "example" ] } } ] } }, "signingFormat": "hooks", "transform": "example", "transformationId": "example" } ] }'

Requires the endpoints:write scope.

Media typeapplication/json
object
name
required
string
>= 1 characters <= 100 characters
environmentId
Any of:
string
>= 1 characters
provider
string
Allowed values: generic github gitlab hubspot shopify intercom zendesk stripe slack linear notion sentry jira pagerduty standard-webhooks svix vercel twilio discord bitbucket typeform calendly resend clerk cloudflare polar lemon-squeezy paddle supabase posthog azure-devops zoom fireflies recall-ai auth0 stytch asana clickup monday square paypal grafana airtable cal-com wechat line aws-sns aws-eventbridge heroku mongodb-atlas sendgrid mailgun figma postmark mailchimp customer-io brevo pubsub railway neon planetscale adyen checkout chargebee razorpay mollie gocardless coinbase-commerce recurly revenuecat woocommerce recharge shipstation aftership bigcommerce pipedrive freshdesk helpscout front gorgias trello todoist attio box dropbox shortcut circleci buildkite confluence dockerhub okta telegram segment mux rudderstack sanity workos openai webflow beehiiv meta x-twitter sendbird telnyx linkedin replicate tiktok elevenlabs vapi retell-ai ghost docusign assemblyai contentful firecrawl browserbase exa fal huggingface
verificationMode
string
Allowed values: none hmac shared-secret basic
secret
string
>= 16 characters <= 256 characters
sourceConfig
object
eventType
string
>= 1 characters <= 200 characters
deliveryId
string
>= 1 characters <= 200 characters
actor
string
>= 1 characters <= 200 characters
subjectTitle
string
>= 1 characters <= 200 characters
secretHeader
string
>= 1 characters <= 64 characters
secretLocation
string
Allowed values: header query
secretParam
string
>= 1 characters <= 64 characters
basicUsername
string
>= 1 characters <= 256 characters
dedupe
object
key
required
string
>= 1 characters <= 500 characters
windowSeconds
integer
>= 1 <= 86400
rateLimitPerMinute
Any of:
integer
>= 1 <= 100000
rateLimitAction
string
Allowed values: store drop
hooks
Any of:
object
stages
required
object
received
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
before_transform
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
before_deliver
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
after_deliver
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
on_failure
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
on_dead
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
destinations
Array<object>
<= 10 items
object
name
string
>= 1 characters <= 60 characters
url
required
string
<= 2000 characters
headers
object
key
additional properties
string | null
timeoutMs
integer
>= 100 <= 30000
delaySeconds
Any of:
integer
<= 604800
retryPolicy
object
maxAttempts
integer
>= 1 <= 10
initialDelaySeconds
integer
>= 1 <= 60
maxDelaySeconds
integer
>= 5 <= 3600
backoff
string
Allowed values: fixed exponential
jitter
number
<= 0.5
retryAfter
boolean
rateLimitPerMinute
Any of:
integer
>= 1 <= 100000
maxConcurrency
Any of:
integer
>= 1 <= 100
type
string
>= 1 characters <= 50 characters
config
object
key
additional properties
method
string
Allowed values: GET POST PUT PATCH DELETE
params
Array<object>
<= 20 items
object
key
required
string
>= 1 characters <= 100 characters
value
required
string
<= 2000 characters
enabled
boolean
auth
object
mode
string
Allowed values: none bearer basic apikey hmac oauth2 aws-sigv4 gcp-service-account
token
string
<= 4000 characters
username
string
<= 500 characters
password
string
<= 500 characters
key
string
<= 100 characters
value
string
<= 4000 characters
addTo
string
Allowed values: header query
secret
string
<= 1000 characters
header
string
<= 100 characters
tokenUrl
string
<= 2000 characters
clientId
string
<= 500 characters
clientSecret
string
<= 1000 characters
scope
string
<= 500 characters
region
string
<= 64 characters
service
string
<= 64 characters
accessKeyId
string
<= 500 characters
secretAccessKey
string
<= 1000 characters
sessionToken
string
<= 4000 characters
serviceAccountJson
string
<= 20000 characters
bodyMode
string
Allowed values: none json form raw binary multipart
bodyTemplate
string
<= 100000 characters
templateStrict
boolean
filters
Any of:
object
allow
Array
<= 20 items
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
deny
Array
<= 20 items
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
ignoreActors
Array<string>
<= 20 items
ignoreBots
boolean
senders
object
allow
object
logins
Array<string>
>= 1 items <= 50 items
organizations
Array<string>
>= 1 items <= 20 items
associations
Array<string>
>= 1 items <= 6 items
Allowed values: OWNER MEMBER COLLABORATOR CONTRIBUTOR FIRST_TIME_CONTRIBUTOR NONE
requireAllowlist
boolean
allowForkPrs
boolean
frequency
object
max
required
integer
>= 1 <= 1000
windowMinutes
required
integer
>= 1 <= 1440
key
string
Allowed values: actor subject
hooks
Any of:
object
stages
required
object
received
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
before_transform
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
before_deliver
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
after_deliver
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
on_failure
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
on_dead
Array
<= 10 items
One of:
object
type
required
string
Allowed value: drop
condition
Any of:
object
field
required
string
>= 1 characters <= 200 characters
op
required
string
Allowed values: equals not_equals in contains matches exists
value
Any of:
string
<= 1000 characters
signingFormat
string
Allowed values: hooks standard-webhooks
transform
Any of:
string
<= 20000 characters
transformationId
Any of:
string
>= 1 characters

Success

Media typeapplication/json
object
id
required

Resource id

string
projectId
required
string
environmentId
required
string | null
environment
required

Resolved environment name

string
name
required
string
publicId
required

Path segment of the inbound /in/{publicId} URL

string
publicUrl
required
string
provider
required
string
status
required
string
Allowed values: active paused archived
verificationMode
required
string
Allowed values: none hmac shared-secret basic
hasSecret
required
boolean
hasPreviousSecret
required

A rotation is in progress; both secrets verify

boolean
secretRotatedAt
required
Any of:

ISO-8601 timestamp

string
sourceConfig
required
object
key
additional properties
hooks
required
object
key
additional properties
rateLimitPerMinute
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
rateLimitAction
required
string
Allowed values: store drop
createdAt
required

ISO-8601 timestamp

string
updatedAt
required

ISO-8601 timestamp

string
key
additional properties

Example

{
"status": "active",
"verificationMode": "none",
"rateLimitAction": "store"
}

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
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "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
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "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
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "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
issues

Per-field validation details for VALIDATION_ERROR

Array<object>
object
path
required

Body or query field that failed validation

string
message
required
string
key
additional properties
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example",
"issues": [
{
"path": "example",
"message": "example"
}
]
}
}
X-RateLimit-Limit
integer

Requests allowed per window

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

Seconds until the window resets

Retry-After
integer

Seconds to wait before retrying. Absent when the rejection has no retry time (for example the Free lifetime quota).

X-Quota-Limit
integer

Request allowance for the workspace’s plan

X-Quota-Remaining
integer

Requests left in the allowance after this request