Body Required
-
tenantId string
Maximum length is
21
. -
name string
The name of the hook.
Minimum length is
1
, maximum length is256
. -
Use
events
instead.Values are
PostRegister
,PostSignIn
,PostResetPassword
,User.Created
,User.Deleted
,User.Data.Updated
,User.SuspensionStatus.Updated
,Role.Created
,Role.Deleted
,Role.Data.Updated
,Role.Scopes.Updated
,Scope.Created
,Scope.Deleted
,Scope.Data.Updated
,Organization.Created
,Organization.Deleted
,Organization.Data.Updated
,Organization.Membership.Updated
,OrganizationRole.Created
,OrganizationRole.Deleted
,OrganizationRole.Data.Updated
,OrganizationRole.Scopes.Updated
,OrganizationScope.Created
,OrganizationScope.Deleted
, orOrganizationScope.Data.Updated
. -
events array[string]
An array of hook events.
Values are
PostRegister
,PostSignIn
,PostResetPassword
,User.Created
,User.Deleted
,User.Data.Updated
,User.SuspensionStatus.Updated
,Role.Created
,Role.Deleted
,Role.Data.Updated
,Role.Scopes.Updated
,Scope.Created
,Scope.Deleted
,Scope.Data.Updated
,Organization.Created
,Organization.Deleted
,Organization.Data.Updated
,Organization.Membership.Updated
,OrganizationRole.Created
,OrganizationRole.Deleted
,OrganizationRole.Data.Updated
,OrganizationRole.Scopes.Updated
,OrganizationScope.Created
,OrganizationScope.Deleted
, orOrganizationScope.Data.Updated
. -
Additional properties are allowed.
-
enabled boolean
-
createdAt number
curl \
-X POST https://[tenant_id].logto.app/api/hooks \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tenantId":"string","name":"string","event":"PostRegister","events":["PostRegister"],"config":{"url":"string","headers":{"additionalProperty1":"string","additionalProperty2":"string"},"retries":42.0},"enabled":true,"createdAt":42.0}'
{
"tenantId": "string",
"name": "string",
"event": "PostRegister",
"events": [
"PostRegister"
],
"config": {
"url": "string",
"headers": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"retries": 42.0
},
"enabled": true,
"createdAt": 42.0
}
{
"tenantId": "string",
"id": "string",
"name": "string",
"event": "PostRegister",
"events": [
"PostRegister"
],
"config": {
"url": "string",
"headers": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"retries": 42.0
},
"signingKey": "string",
"enabled": true,
"createdAt": 42.0
}