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

  • 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, or PostResetPassword.

  • events array[string]

    An array of updated hook events.

    Values are PostRegister, PostSignIn, or PostResetPassword.

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

Responses

  • 200 application/json

    The hook was updated successfully.

    Hide response attributes Show response attributes object
    • 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, or PostResetPassword.

    • events array[string] Required

      Values are PostRegister, PostSignIn, or PostResetPassword.

    • config object Required
      Hide config attributes Show config attributes
    • signingKey string Required

      Maximum length is 64.

    • enabled boolean Required
    • createdAt number Required
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

PATCH /api/hooks/{id}
curl \
 -X PATCH https://[tenant_id].logto.app/api/hooks/{id} \
 -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}'
Request example
{
  "name": "string",
  "event": "PostRegister",
  "events": [
    "PostRegister"
  ],
  "config": {
    "url": "string",
    "headers": {
      "key": "string"
    },
    "retries": 42.0
  },
  "enabled": true,
  "createdAt": 42.0
}
Response examples (200)
{
  "id": "string",
  "name": "string",
  "event": "PostRegister",
  "events": [
    "PostRegister"
  ],
  "config": {
    "url": "string",
    "headers": {
      "key": "string"
    },
    "retries": 42.0
  },
  "signingKey": "string",
  "enabled": true,
  "createdAt": 42.0
}