---
title: "Create a webhook secret"
method: POST
path: "/webhook/v3/secret"
tags: ["Webhook Service"]
---

# Create a webhook secret

`POST /webhook/v3/secret`

## Request

- Base URL: `https://api.nexiopaysandbox.com`
- URL: `https://api.nexiopaysandbox.com/webhook/v3/secret`
- Auth: HTTP basic

Creates a secret to be used in legacy webhooks for a merchant account or payout account. 

Set up a webhook secret for additional security. After you create a secret, each webhook includes a header containing a signature. You can use the signature to verify that all data received is authentic.

For a tutorial about configuring and using webhooks, see [Configuring legacy webhooks](doc:configuring-legacy-webhooks) in Guides.

<!-- theme: info -->
> 📘 Note
> 
> For the current workflow, see the [Register webhook URLs](ref:registerwebhookurls) endpoint instead.

<!-- theme: warning -->
> ⚠️ Try It
> 
> To use the Try It feature for this endpoint, you must use the credentials for your [Sandbox API user](doc:sandbox-environments).


<div style="display:none;">

## Request parameters
- merchantId
- payoutAccountId

## Response parameters
- secret

</div>

## Request body

- union
  - object
    - `merchantId` string: The merchant ID to create a secret for. The ID parameter name to use is `merchantId`. Either this parameter or `payoutAccountId` is required.
  - object
    - `payoutAccountId` string: The Nexio ID for the payout account. The ID parameter name to use is `payoutAccountId`. Either this parameter or `merchantId` is required.

## Response `200`

Success

- object
  - `secret` string: The secret to be used in verifying the webhook's signature. Store the secret in a secure location in order to use it for that verification process. For a tutorial about verifying the signature, see [Receiving webhooks](doc:receiving-webhooks) in Guides.

## Other responses

- `401`: Unauthorized. For help with this error and other error codes, see [Common errors](doc:common-errors) in the Guides area.

---

[API](https://skmtc.dev/nexiopay/apis/dev-tools-api-reference.md) - [All operations](https://skmtc.dev/nexiopay/apis/dev-tools-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/nexiopay/apis/dev-tools-api-reference/revisions/0ef89814f57f?raw)
