PUT
/
api
/
partner
/
v1
/
webhook-settings
cURL
curl --request PUT \
  --url https://staging-api.capa.fi/api/partner/v1/webhook-settings \
  --header 'Content-Type: application/json' \
  --header 'partner-api-key: <partner-api-key>' \
  --data '{
  "url": "https://some-webhook-endpoint.url"
}'
{
  "status": "ok",
  "data": {
    "id": "12a121ad-cbea-4ec4-9e0a-5c861e528bba",
    "partnerId": "12a121ad-cbea-4ec4-9e0a-5c861e528bba",
    "url": "https://some-webhook-endpoint.url",
    "createdAt": "2024-04-05 13:45:27.063",
    "updatedAt": "2024-04-05 13:45:27.063"
  }
}
Allows an affiliated partner to update the settings for receiving webhook notifications. This endpoint enables a partner to set or reset the URL where webhook notifications will be sent.

Headers

PartnerApiKey (string) - API key associated with the partner.
Partner API Key RequiredRequires partner-api-key for authentication to ensure only authorized partners can access this data.See ๐Ÿ”‘ API Key Generation Guide for getting your API key

Body:

  • url (string or null) - The URL where webhook notifications will be sent. To reset the webhook URL, a value of null can be sent.

Example

JSON
{
  "url": "https://some-webhook-endpoint.url",
}

Use cases

Setting a Webhook URL for Notification Delivery A partner wants to start receiving webhook notifications at a specific URL. They use this endpoint to set the url to their desired endpoint, allowing them to receive notifications directly. Resetting the Webhook URL If a partner decides they no longer want to receive webhook notifications, they can reset the url by sending null in the body. This action stops the delivery of webhook notifications. Updating the Webhook URL A partner changes their server or endpoint and needs to update the URL where webhook notifications are sent. They use this endpoint to provide a new url.

Headers

partner-api-key
string
required

Api key for the affiliated partner that is performing the request

Body

application/json
url
string | null
required

the url where the webhook notifications will be sent to. To reset the value null can be sent in the body.

Example:

"https://some-webhook-endpoint.url"

Response

200 - application/json

Allows an affiliated partner to update the settings for receiving webhook notifications.

status
string
Example:

"ok"

data
object