---
title: "PUT /account/{accountId}/authorization-webhook"
method: PUT
path: "/account/{accountId}/authorization-webhook"
---

# PUT /account/{accountId}/authorization-webhook

`PUT /account/{accountId}/authorization-webhook`

Create or update the authorization webhook configuration for an account. This will upsert the webhook configuration, creating it if it doesn't exist or updating it if it does. 

The secret for a webhook remains static after it is initially created. If you would like to retrieve the secret before sending requests,
create the authorization webhook in status 'inactive' first and then update it to 'active' after.

## Request body

- object
  - `webhookUrl` string, required — The URL where authorization webhook events will be sent
  - `status` 'active' | 'inactive', required — Current status of the webhook
  - `config` object, required — Configuration specific to the authorization webhook
    - `fallbackBehavior` 'default' | 'reject', required — The fallback behavior will be used if the webhook fails to send a response in time, or sends an invalid response. Default behavior will continue to run the balance check in the auth loop. Reject behavior will reject the transaction.

## Response `200`

Authorization webhook created or updated successfully

- AuthorizationWebhook
  - `webhookUrl` string, required — The URL where authorization webhook events will be sent
  - `signingSecret` string, required — Secret used for signing webhook payloads
  - `status` 'active' | 'inactive', required — Current status of the webhook
  - `timeoutDurationMs` integer, required — The timeout duration in milliseconds for webhook requests
  - `config` object, required — Configuration specific to the authorization webhook
    - `fallbackBehavior` 'default' | 'reject', required — The fallback behavior will be used if the webhook fails to send a response in time, or sends an invalid response. Default behavior will continue to run the balance check in the auth loop. Reject behavior will reject the transaction.
  - `createdAt` string, date-time, required — When the webhook was created
  - `updatedAt` string, date-time, required — When the webhook was last updated

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `429` — TooManyRequests
- `500` — Internal Error

---

[API](https://skmtc.net/slashfi/apis/slash-public-api.md) · [All operations](https://skmtc.net/slashfi/apis/slash-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/slashfi/slash-public-api/versions/773c90f079c5/schema)
