Hooks

hooks

Methods

Create A Hook ->
post/hooks

Create a new hook.

Delete A Hook ->
delete/hooks/{id}

Delete a hook.

Get Hooks -> HooksPageNumberPage<>
get/hooks

Retrieve all hooks. Accepts a list of fields to include or exclude in the result.

Security

Example: Authorization: Bearer My Bearer Token

Parameters
enabled: boolean
Optional

Optional filter on whether a hook is enabled (true) or disabled (false).

fields: string
Optional

Comma-separated list of fields to include in the result. Leave empty to retrieve all fields.

include_totals: boolean
Optional

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

page: number
Optional
(minimum: 0)

Page index of the results to return. First page is 0.

per_page: number
Optional
(maximum: 100, minimum: 0)

Number of results per page.

triggerId:
Optional

Retrieves hooks that match the trigger

"credentials-exchange"
"pre-user-registration"
"post-user-registration"
"post-change-password"
"send-phone-message"
Response fields
UnionMember0 = Array<>
UnionMember1 = { hooks, limit, start, 1 more... }
Request example
200Example
Get A Hook ->
get/hooks/{id}

Retrieve a hook by its ID. Accepts a list of fields to include in the result.

Update A Hook ->
patch/hooks/{id}

Update an existing hook.

Domain types

Hook = { id, dependencies, enabled, 3 more... }
Hooks

Secrets

hooks.secrets

Methods

Add Hook Secrets ->
post/hooks/{id}/secrets

Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets.

Delete Hook Secrets ->
delete/hooks/{id}/secrets

Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete.

Get Hook Secrets -> Record<string, unknown>
get/hooks/{id}/secrets

Retrieve a hook's secrets by the ID of the hook.

Update Hook Secrets ->
patch/hooks/{id}/secrets

Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret.