Update a Webhook API

On this page

This API is used to update an existing Webhook.

You must specify all of the properties of the Webhook when calling this API with the PUT HTTP method. When used with PUT, this API doesn't merge the existing Webhook and your new data. It replaces the existing Webhook with your new data.

Utilize the PATCH HTTP method to send specific changes to merge into an existing Webhook.

Request#

Global API Key Authentication
Update a Webhook by Id
PUT/api/webhook/{webhookId}
OpenAPI Spec
PATCH/api/webhook/{webhookId}
OpenAPI Spec
Note

For backward compatibility, the PATCH method accepts the same media type (specified by a Content-Type of application/json) and body as the PUT request. You can also use the following media types for different behavior:

For details, see the PATCH documentation.

Using a media type of application/json merges the provided request parameters into the existing object. As a result, all parameters are optional with PATCH: only provide the values you want to change. To remove a value, provide a null value. Patching an Array appends all values in the new list to the old list.

Path Parameters#

webhookId
  • Type: UUID
  • Required
  • Immutable

The Id of the Webhook to update.

Request Body#

webhook.applicationIds
  • Type: Array<UUID>
  • Optional
  • Deprecated

The Ids of the Applications that this Webhook should be associated with. If no Ids are specified and the global field is false, this Webhook will not be used. Typically global should be set to true.

Removed in 1.37.0

In version 1.37.0 and beyond, Webhooks are optionally associated with Tenants instead of Applications. See new field tenantIds.

webhook.connectTimeout
  • Type: Integer
  • Required

The connection timeout in milliseconds used when FusionAuth sends events to the Webhook.

webhook.data
  • Type: Object
  • Optional
  • Available since 1.15.0

An object that can hold any information about the Webhook that should be persisted.

webhook.description
  • Type: String
  • Optional

A description of the Webhook. This is used for display purposes only.

webhook.eventsEnabled
  • Type: Object
  • Optional

A mapping for the events that are enabled for this Webhook. The key of the Object property is the name of the event and the value is a boolean. It should look like this:

{
  "user.create": true,
  "user.delete": false
}

The possible event types are listed below. For each event's payload, see Events.

  • audit-log.create - When an audit log is created Available since 1.30.0
  • entity.create - When an entity is created Available since 1.69.0
  • entity.create.complete - When an entity create transaction has completed Available since 1.69.0
  • entity.delete - When an entity is deleted Available since 1.69.0
  • entity.delete.complete - When an entity delete transaction has completed Available since 1.69.0
  • entity.update - When an entity is updated Available since 1.69.0
  • entity.update.complete - When an entity update transaction has completed Available since 1.69.0
  • event-log.create - When an event log is created Available since 1.30.0
  • jwt.public-key.update - When a JWT signing Public / Private keypair may have been changed
  • jwt.refresh - When an access token is refreshed using a refresh token Available since 1.16.0
  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked
  • kickstart.success - When kickstart has successfully completed Available since 1.30.0
  • user.action - When a user action is triggered
  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)
  • user.create - When a user is created
  • user.create.complete - When a user create transaction has completed Available since 1.30.0
  • user.deactivate - When a user is deactivated
  • user.delete - When a user is deleted
  • user.delete.complete - When a user delete transaction has completed Available since 1.30.0
  • user.email.update - When a user updates their email address Available since 1.30.0
  • user.email.verified - When a user verifies their email address Available since 1.8.0
  • user.identity-provider.link - When a link is created from a user to an Identity Provider Available since 1.36.0
  • user.identity-provider.unlink - When an existing Identity Provider link is removed from a User Available since 1.36.0
  • user.identity.verified - When a user's identity is verified Available since 1.59.0
  • user.loginId.duplicate.create - When a request to create a user with a login Id (email or username) which is already in use has been received Available since 1.30.0

    Enterprise plan To use the user.loginId.duplicate.create event , you'll need an Enterprise plan.

  • user.loginId.duplicate.update - When a request to update a user and change their login Id (email or username) to one that is already in use has been received Available since 1.30.0

    Enterprise plan To use the user.loginId.duplicate.update event , you'll need an Enterprise plan.

  • user.login.failed - When a user fails a login request Available since 1.6.0
  • user.login.new-device - When a user begins a login request with a new device Available since 1.30.0

    Enterprise plan To use the user.login.new-device event , you'll need an Enterprise plan.

  • user.login.success - When a user completes a login request Available since 1.6.0
  • user.login.suspicious - When a user logs in and is considered to be a potential threat (requires an activated Enterprise license) Available since 1.30.0

    Enterprise plan To use the user.login.suspicious event , you'll need an Enterprise plan.

  • user.password.breach - When Reactor detects a user is using a potentially breached password (requires an activated license) Available since 1.15.0

    To use the user.password.breach event , you'll need .

  • user.password.reset.send - When a forgot password email has been sent to a user Available since 1.30.0

    Enterprise plan To use the user.password.reset.send event, you'll need an Enterprise plan.

  • user.password.reset.start - When the process to reset a user password has started Available since 1.30.0

    Enterprise plan To use the user.password.reset.start event, you'll need an Enterprise plan.

  • user.password.reset.success - When a user has successfully reset their password Available since 1.30.0

    Enterprise plan To use the user.password.reset.success event, you'll need an Enterprise plan.

  • user.password.update - When a user has updated their password Available since 1.30.0

    Enterprise plan To use the user.password.update event, you'll need an Enterprise plan.

  • user.reactivate - When a user is reactivated
  • user.registration.create - When a user registration is created Available since 1.6.0
  • user.registration.create.complete - When a user registration create transaction has completed Available since 1.30.0
  • user.registration.delete - When a user registration is deleted Available since 1.6.0
  • user.registration.delete.complete - When a user registration delete transaction has completed Available since 1.30.0
  • user.registration.update - When a user registration is updated Available since 1.6.0
  • user.registration.update.complete - When a user registration update transaction has completed Available since 1.30.0
  • user.registration.verified - When a user completes registration verification Available since 1.8.0
  • user.two-factor.challenge - When a user is presented a two-factor challenge Available since 1.68.0

    Enterprise plan To use the user.two-factor.challenge event, you'll need an Enterprise plan.

  • user.two-factor.failed-attempt - When a user submits an incorrect answer to a two-factor challenge Available since 1.68.0

    Enterprise plan To use the user.two-factor.failed.attempt event, you'll need an Enterprise plan.

  • user.two-factor.method.add - When a user has added a two-factor method Available since 1.30.0

    Enterprise plan To use the user.two-factor.method.add event, you'll need an Enterprise plan.

  • user.two-factor.method.remove - When a user has removed a two-factor method Available since 1.30.0

    Enterprise plan To use the user.two-factor.method.remove event, you'll need an Enterprise plan.

  • user.two-factor.success - When a user submits a correct answer to a two-factor challenge Available since 1.68.0

    Enterprise plan To use the user.two-factor.success event, you'll need an Enterprise plan.

  • user.update - When a user is updated
  • user.update.complete - When a user update transaction has completed Available since 1.30.0
webhook.global
  • Type: Boolean
  • Optional
  • Defaults to false

Whether or not this Webhook is used for all Tenants or just for specific Tenants.

Before version 1.37.0

Whether or not this Webhook is used for all events or just for specific Applications. In almost all cases you want to set this field to true and filter on the application Id when processing the webhook.

webhook.headers
  • Type: Map<String, String>
  • Optional

An object that contains headers that are sent as part of the HTTP request for the events. See Secure Webhooks for using headers to authenticate requests.

webhook.httpAuthenticationPassword
  • Type: String
  • Optional

The HTTP basic authentication password that is sent as part of the HTTP request for the events.

webhook.httpAuthenticationUsername
  • Type: String
  • Optional

The HTTP basic authentication username that is sent as part of the HTTP request for the events.

webhook.readTimeout
  • Type: Integer
  • Required

The read timeout in milliseconds used when FusionAuth sends events to the Webhook.

webhook.signatureConfiguration.enabled
  • Type: Boolean
  • Optional
  • Defaults to false
  • Available since 1.48.0

Whether or not webhook events are signed. See Sign Webhooks to set up signing and verify signatures.

webhook.signatureConfiguration.signingKeyId
  • Type: UUID
  • Optional
  • Defaults to false
  • Available since 1.48.0

The Id of the key used to sign webhook events. Required when webhook.signatureConfiguration is set to true.

webhook.sslCertificate
  • Type: String
  • Optional
  • Deprecated

An SSL certificate in PEM format that is used to establish the SSL (TLS specifically) connection to the Webhook.

Deprecated since 1.48.0

In version 1.48.0 and beyond, the webhook SSL certificate can be managed via webhook.sslCertificateKeyId. This field is not allowed on a request when webhook.sslCertificateKeyId is provided.

webhook.sslCertificateKeyId
  • Type: UUID
  • Optional
  • Available since 1.48.0

The Id of an existing Key. The X.509 certificate is used for client certificate authentication in requests to the Webhook. See Secure Webhooks.

webhook.tenantIds
  • Type: Array<UUID>
  • Optional
  • Available since 1.37.0

The Ids of the Tenants that this Webhook should be associated with. If no Ids are specified and the global field is false, this Webhook will not be used.

webhook.url
  • Type: String
  • Required

The fully qualified URL of the Webhook's endpoint that will accept the event requests from FusionAuth. See Write a Webhook for what this endpoint must handle.

Example Request JSON
{
  "webhook": {
    "connectTimeout": 1000,
    "data": {
      "updatedBy": "richard"
    },
    "description": "The standard game Webhook",
    "eventsEnabled": {
      "user.create": true,
      "user.delete": false
    },
    "global": false,
    "headers": {
      "Header 1": "value 1",
      "Header 2": "value 2"
    },
    "httpAuthenticationPassword": "password",
    "httpAuthenticationUsername": "username",
    "readTimeout": 2000,
    "signatureConfiguration": {
      "enabled": true,
      "signingKeyId": "401c9046-b274-403f-963d-adc5024c6ef0"
    },
    "sslCertificateKeyId": "e31e242b-4eca-4309-921f-48cb72ec9bfb",
    "tenantIds": [
      "32306536-3036-6431-3865-646430303332",
      "30663132-6464-6665-3032-326466613934"
    ],
    "url": "http://mygameserver.local:7001/fusionauth-webhook"
  }
}

Response#

The response for this API contains the new information for the Webhook that was updated.

Response Codes
CodeDescription
200The request was successful. The response will contain a JSON body.
400The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present.
401You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See Authentication.
500There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.
503The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body.

Response Body#

webhook.applicationIds
  • Type: Array<UUID>
  • Optional
  • Deprecated

The Ids of the Applications that this Webhook is associated with. If no Ids are returned and the global field is false, this Webhook is not used. Typically global should be set to true.

Removed in 1.37.0

In version 1.37.0 and beyond, Webhooks are optionally associated with Tenants instead of Applications. See new field tenantIds.

webhook.connectTimeout
  • Type: Integer

The connection timeout in milliseconds used when FusionAuth sends events to the Webhook.

webhook.data
  • Type: Object
  • Available since 1.15.0

An object that can hold any information about the Webhook that should be persisted.

webhook.description
  • Type: String

A description of the Webhook. This is used for display purposes only.

webhook.eventsEnabled
  • Type: Object

A mapping for the events that are enabled for this Webhook. The key of the Object property is the name of the event and the value is a boolean. It should look like this:

{
  "user.create": true,
  "user.delete": false
}

The possible event types are:

  • audit-log.create - When an audit log is created Available since 1.30.0
  • entity.create - When an entity is created Available since 1.69.0
  • entity.create.complete - When an entity create transaction has completed Available since 1.69.0
  • entity.delete - When an entity is deleted Available since 1.69.0
  • entity.delete.complete - When an entity delete transaction has completed Available since 1.69.0
  • entity.update - When an entity is updated Available since 1.69.0
  • entity.update.complete - When an entity update transaction has completed Available since 1.69.0
  • event-log.create - When an event log is created Available since 1.30.0
  • jwt.public-key.update - When a JWT signing Public / Private keypair may have been changed
  • jwt.refresh - When an access token is refreshed using a refresh token Available since 1.16.0
  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked
  • kickstart.success - When kickstart has successfully completed Available since 1.30.0
  • user.action - When a user action is triggered
  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)
  • user.create - When a user is created
  • user.create.complete - When a user create transaction has completed Available since 1.30.0
  • user.deactivate - When a user is deactivated
  • user.delete - When a user is deleted
  • user.delete.complete - When a user delete transaction has completed Available since 1.30.0
  • user.email.update - When a user updates their email address Available since 1.30.0
  • user.email.verified - When a user verifies their email address Available since 1.8.0
  • user.identity-provider.link - When a link is created from a user to an Identity Provider Available since 1.36.0
  • user.identity-provider.unlink - When an existing Identity Provider link is removed from a User Available since 1.36.0
  • user.identity.verified - When a user's identity is verified Available since 1.59.0
  • user.loginId.duplicate.create - When a request to create a user with a login Id (email or username) which is already in use has been received Available since 1.30.0

    Enterprise plan To use the user.loginId.duplicate.create event , you'll need an Enterprise plan.

  • user.loginId.duplicate.update - When a request to update a user and change their login Id (email or username) to one that is already in use has been received Available since 1.30.0

    Enterprise plan To use the user.loginId.duplicate.update event , you'll need an Enterprise plan.

  • user.login.failed - When a user fails a login request Available since 1.6.0
  • user.login.new-device - When a user begins a login request with a new device Available since 1.30.0

    Enterprise plan To use the user.login.new-device event , you'll need an Enterprise plan.

  • user.login.success - When a user completes a login request Available since 1.6.0
  • user.login.suspicious - When a user logs in and is considered to be a potential threat (requires an activated Enterprise license) Available since 1.30.0

    Enterprise plan To use the user.login.suspicious event , you'll need an Enterprise plan.

  • user.password.breach - When Reactor detects a user is using a potentially breached password (requires an activated license) Available since 1.15.0

    To use the user.password.breach event , you'll need .

  • user.password.reset.send - When a forgot password email has been sent to a user Available since 1.30.0

    Enterprise plan To use the user.password.reset.send event, you'll need an Enterprise plan.

  • user.password.reset.start - When the process to reset a user password has started Available since 1.30.0

    Enterprise plan To use the user.password.reset.start event, you'll need an Enterprise plan.

  • user.password.reset.success - When a user has successfully reset their password Available since 1.30.0

    Enterprise plan To use the user.password.reset.success event, you'll need an Enterprise plan.

  • user.password.update - When a user has updated their password Available since 1.30.0

    Enterprise plan To use the user.password.update event, you'll need an Enterprise plan.

  • user.reactivate - When a user is reactivated
  • user.registration.create - When a user registration is created Available since 1.6.0
  • user.registration.create.complete - When a user registration create transaction has completed Available since 1.30.0
  • user.registration.delete - When a user registration is deleted Available since 1.6.0
  • user.registration.delete.complete - When a user registration delete transaction has completed Available since 1.30.0
  • user.registration.update - When a user registration is updated Available since 1.6.0
  • user.registration.update.complete - When a user registration update transaction has completed Available since 1.30.0
  • user.registration.verified - When a user completes registration verification Available since 1.8.0
  • user.two-factor.challenge - When a user is presented a two-factor challenge Available since 1.68.0

    Enterprise plan To use the user.two-factor.challenge event, you'll need an Enterprise plan.

  • user.two-factor.failed-attempt - When a user submits an incorrect answer to a two-factor challenge Available since 1.68.0

    Enterprise plan To use the user.two-factor.failed.attempt event, you'll need an Enterprise plan.

  • user.two-factor.method.add - When a user has added a two-factor method Available since 1.30.0

    Enterprise plan To use the user.two-factor.method.add event, you'll need an Enterprise plan.

  • user.two-factor.method.remove - When a user has removed a two-factor method Available since 1.30.0

    Enterprise plan To use the user.two-factor.method.remove event, you'll need an Enterprise plan.

  • user.two-factor.success - When a user submits a correct answer to a two-factor challenge Available since 1.68.0

    Enterprise plan To use the user.two-factor.success event, you'll need an Enterprise plan.

  • user.update - When a user is updated
  • user.update.complete - When a user update transaction has completed Available since 1.30.0
webhook.global
  • Type: Boolean

Whether or not this Webhook is used for all Tenants or just for specific Tenants.

Before version 1.37.0

Whether or not this Webhook is used for all events or just for specific Applications.

webhook.headers
  • Type: Map<String, String>

An object that contains headers that are sent as part of the HTTP request for the events.

webhook.httpAuthenticationPassword
  • Type: String

The HTTP basic authentication password that is sent as part of the HTTP request for the events.

webhook.httpAuthenticationUsername
  • Type: String

The HTTP basic authentication username that is sent as part of the HTTP request for the events.

webhook.id
  • Type: UUID

The Id of the Webhook.

webhook.insertInstant
  • Type: Long

The instant that the Webhook was added to the FusionAuth database.

webhook.lastUpdateInstant
  • Type: Long

The instant that the Webhook was last updated in the FusionAuth database.

webhook.readTimeout
  • Type: Integer

The read timeout in milliseconds used when FusionAuth sends events to the Webhook.

webhook.signatureConfiguration.enabled
  • Type: Boolean
  • Defaults to false

Whether or not webhook events are signed.

webhook.signatureConfiguration.signingKeyId
  • Type: UUID
  • Optional

The Id of the key used to sign webhook events.

webhook.sslCertificate
  • Type: String
  • Deprecated

An SSL certificate in PEM format that is used to establish the SSL (TLS specifically) connection to the Webhook.

Deprecated since 1.48.0

In version 1.48.0 and beyond, the webhook SSL certificate can be managed via webhook.sslCertificateKeyId.

webhook.sslCertificateKeyId
  • Type: UUID
  • Available since 1.48.0

The Id of an existing Key. The X.509 certificate is used for client certificate authentication in requests to the Webhook.

webhook.tenantIds
  • Type: Array<UUID>
  • Optional
  • Available since 1.37.0

The Ids of the Tenants that this Webhook is associated with. If no Ids are returned and the global field is false, this Webhook is not used.

webhook.url
  • Type: String

The fully qualified URL of the Webhook's endpoint that will accept the event requests from FusionAuth.

Example Response JSON for a Single Webhook
{
  "webhook": {
    "connectTimeout": 1000,
    "data": {
      "updatedBy": "richard"
    },
    "description": "The standard game Webhook",
    "eventsEnabled": {
      "user.create": true,
      "user.delete": false
    },
    "global": false,
    "headers": {
      "Header 1": "value 1",
      "Header 2": "value 2"
    },
    "httpAuthenticationPassword": "password",
    "httpAuthenticationUsername": "username",
    "id": "00000000-0000-0000-0000-000000000042",
    "insertInstant": 1471786482322,
    "lastUpdateInstant": 1595361143101,
    "readTimeout": 2000,
    "signatureConfiguration": {
      "enabled": true,
      "signingKeyId": "401c9046-b274-403f-963d-adc5024c6ef0"
    },
    "sslCertificateKeyId": "e31e242b-4eca-4309-921f-48cb72ec9bfb",
    "tenantIds": [
      "32306536-3036-6431-3865-646430303332",
      "30663132-6464-6665-3032-326466613934"
    ],
    "url": "http://mygameserver.local:7001/fusionauth-webhook"
  }
}