# Create a Webhook Create a to specify an endpoint where Finix can send events. Endpoint: POST /webhooks Version: 2022-02-01 Security: BasicAuth ## Header parameters: - `Finix-Version` (string) Specify the API version of your request. For more details, see Versioning. Example: "2022-02-01" ## Request fields (application/json): - `authentication` (object) The [authentication settings](/additional-resources/developers/webhooks/integrating-into-webhooks#authenticating-webhooks) that are used to send webhook events. - `authentication.basic` (object) The basic authentication configuration. Null if basic is not being used. - `authentication.basic.username` (string) The username that will be used for basic authentication - `authentication.basic.password` (string) The password to be used for basic authentication. - `authentication.bearer` (object) The bearer authentication configuration. - `authentication.bearer.token` (string) The string that Finix will send as the bearer token. - `authentication.type` (string) The type of authentication the webhook will use: - : No authentication will be used. - : Basic authentication. - : Oauth2's Bearer Token. Enum: "NONE", "BASIC", "BEARER" - `enabled` (boolean) Set to false to disable Webhooks. Default value when created is true. - `enabled_events` (array) A list of events the [webhook is explicitly enabled for](/additional-resources/developers/webhooks/integrating-into-webhooks#filtering-webhooks). - `enabled_events.entity` (string) The entity type for the enabled event, either or . There can only be one enabled event object for a given entity. - `enabled_events.types` (array) A list of event types you want to receive for the specified . - When is set to , the acceptable value is . - When is set to , the acceptable values are and . - `url` (string, required) The HTTP or HTTPS URL where callbacks (i.e. events) will be sent via POST request (max 120 characters). Example: "https://example.com/event_handler" ## Response 201 fields (application/json): - `id` (string) The ID of the resource. Example: "WHxxxxxxxxxxxxxxxxxx" - `created_at` (string) Timestamp of when the object was created. - `updated_at` (string) Timestamp of when the object was last updated. - `application` (string) The ID of the resource the was created under. - `authentication` (object) The [authentication settings](/additional-resources/developers/webhooks/integrating-into-webhooks#authenticating-webhooks) that are used to send webhook events. - `authentication.type` (string) The type of authentication the webhook will use: - NONE: No authentication will be used. - BASIC: Basic authentication. - BEARER: Oauth2's Bearer Token. Enum: "NONE", "BASIC", "BEARER" - `enabled` (boolean) Details if the is enabled:true: Events are being sent to the .false: Events are not being sent. - `enabled_events` (array) A list of events the [webhook is explicitly enabled for](/additional-resources/developers/webhooks/integrating-into-webhooks#filtering-webhooks). - `enabled_events.entity` (string) The entity type for the enabled event, either or . There can only be one enabled event object for a given entity. - `enabled_events.types` (array) A list of event types you want to receive for the specified . - When is set to , the acceptable value is . - When is set to , the acceptable values are and . - `is_accepting_events` (boolean) Whether the webhook is accepting events. - `nickname` (string) A human-readable name for the webhook. - `previous_secret_expires_at` (string,null) The time when the previous will expire. This is when the webhook is initially created. - `secret_signing_key` (string,null) The secret signing key that gets used to verify webhook events. - `url` (string) The HTTP or HTTPS URL where callbacks (i.e. events) will be sent via POST request (max 120 characters). - `_links` (object) For your convenience, every response includes several URLs which link to resources relevant to the request. You can use these to make your follow-up requests and quickly access relevant IDs. - `_links.application` (object) Link to the the resource was created under. - `_links.application.href` (string) - `_links.self` (object) Link to the resource that was used in the request. ## Response 400 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.logref` (object) - `_embedded.errors.message` (string) - `_embedded.errors.code` (string) Enum: "UNPROCESSABLE_ENTITY" - `_embedded.errors._links` (object) - `_embedded.errors._links.self` (object) - `_embedded.errors._links.self.href` (string) ## Response 401 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "UNKNOWN" - `_embedded.errors.logref` (object) - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.self` (object) - `_embedded.errors._links.self.href` (string) - `_embedded.errors._links.source` (object) ## Response 403 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "FORBIDDEN" - `_embedded.errors.logref` (object) - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.source` (object) - `_embedded.errors._links.source.href` (string) ## Response 406 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "NOT_FOUND" - `_embedded.errors.logref` (object) - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.source` (object) - `_embedded.errors._links.source.href` (string) ## Response 422 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "INVALID_FIELD" - `_embedded.errors.field` (string) - `_embedded.errors.logref` (object) - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.source` (object) - `_embedded.errors._links.source.href` (string)