Body Required
-
name string
The name of the hook.
Minimum length is
1
, maximum length is256
. -
event string Deprecated
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
. -
config object Required
-
enabled boolean
-
createdAt number
curl \
-X POST https://[tenant_id].logto.app/api/hooks \
-H "Content-Type: application/json" \
-d '{"name":"string","event":"PostRegister","events":["PostRegister"],"config":{"url":"string","headers":{"key":"string"},"retries":42.0},"enabled":true,"createdAt":42.0}'
{
"name": "string",
"event": "PostRegister",
"events": [
"PostRegister"
],
"config": {
"url": "string",
"headers": {
"key": "string"
},
"retries": 42.0
},
"enabled": true,
"createdAt": 42.0
}