Test hook

POST /api/hooks/{id}/test

Test the specified hook with the given events and config.

Path parameters

  • id string Required

    The unique identifier of the hook.

application/json

Body Required

  • events array[string] Required

    An array of hook events for testing.

    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, or OrganizationScope.Data.Updated.

  • config object Required

    The hook configuration for testing.

    Hide config attributes Show config attributes object
  • event Deprecated

    Use events instead.

Responses

POST /api/hooks/{id}/test
curl \
 -X POST https://[tenant_id].logto.app/api/hooks/{id}/test \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"events":["PostRegister"],"config":{"url":"string","headers":{"key":"string"},"retries":42.0}}'
Request examples
{
  "events": [
    "PostRegister"
  ],
  "config": {
    "url": "string",
    "headers": {
      "key": "string"
    },
    "retries": 42.0
  }
}