Get hooks

GET /api/hooks

Get a list of hooks with optional pagination.

Query parameters

  • Whether to include execution stats in the response.

  • page integer

    Page number (starts from 1).

    Minimum value is 1. Default value is 1.

  • page_size integer

    Entries per page.

    Minimum value is 1. Default value is 20.

Responses

  • 200 application/json

    A list of hooks.

    Hide response attributes Show response attributes object
    • tenantId string Required

      Maximum length is 21.

    • id string Required

      Minimum length is 1, maximum length is 21.

    • name string Required

      Maximum length is 256.

    • event string | null Required

      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.

    • events array[string] Required

      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
      Hide config attributes Show config attributes object
    • signingKey string Required

      Maximum length is 64.

    • enabled boolean Required
    • createdAt number Required
    • Hide executionStats attributes Show executionStats attributes object
  • Bad Request

  • Unauthorized

  • Forbidden

GET /api/hooks
curl \
 -X GET https://[tenant_id].logto.app/api/hooks \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "tenantId": "string",
    "id": "string",
    "name": "string",
    "event": "PostRegister",
    "events": [
      "PostRegister"
    ],
    "config": {
      "url": "string",
      "headers": {
        "key": "string"
      },
      "retries": 42.0
    },
    "signingKey": "string",
    "enabled": true,
    "createdAt": 42.0,
    "executionStats": {
      "successCount": 42.0,
      "requestCount": 42.0
    }
  }
]