Update hook

PATCH /api/hooks/{id}

Update hook details by ID with the given data.

Path parameters

  • id string Required

    The unique identifier of the hook.

application/json

Body Required

  • tenantId string

    Maximum length is 21.

  • name string

    The updated name of the hook.

    Minimum length is 1, maximum length is 256.

  • event string | null 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, or OrganizationScope.Data.Updated.

  • events array[string]

    An array of updated 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, or OrganizationScope.Data.Updated.

  • config object
    Hide config attributes Show config attributes object
  • enabled boolean

Responses

  • 200 application/json

    The hook was updated successfully.

    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
  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

PATCH /api/hooks/{id}
curl \
 -X PATCH https://[tenant_id].logto.app/api/hooks/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"tenantId":"string","name":"string","event":"PostRegister","events":["PostRegister"],"config":{"url":"string","headers":{"key":"string"},"retries":42.0},"enabled":true,"createdAt":42.0}'
Request examples
{
  "tenantId": "string",
  "name": "string",
  "event": "PostRegister",
  "events": [
    "PostRegister"
  ],
  "config": {
    "url": "string",
    "headers": {
      "key": "string"
    },
    "retries": 42.0
  },
  "enabled": true,
  "createdAt": 42.0
}
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
}