Skip to main content
PUT
/
api
/
partner
/
v2
/
webhook-settings
cURL
curl --request PUT \
  --url https://staging-api.capa.fi/api/partner/v2/webhook-settings \
  --header 'Content-Type: application/json' \
  --header 'partner-api-key: <partner-api-key>' \
  --data '{
  "url": "https://some-webhook-endpoint.url"
}'
{
  "success": true,
  "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"
  }
}

🔐 Headers

HeaderDescription
partner-api-keyAPI key associated with your partner account. Required. See API Key Generation Guide.
This endpoint requires authentication using a valid partner-api-key.

📥 Request Body

FieldTypeRequiredDescription
urlstringThe URL where webhook notifications will be sent. To disable webhook delivery, send null.

📘 Example

curl --request PUT \
     --url https://staging-api.capa.fi/api/partner/v2/webhook-settings \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'partner-api-key: API-KEY' \
     --data '
{
  "url": "https://some-webhook-endpoint.url"
}
'

📤 Response Body

FieldTypeDescription
idstringThe entity ID. Example: 12a121ad-cbea-4ec4-9e0a-5c861e528bba
partnerIdstringID of the partner that owns the settings. Example: 12a121ad-cbea-4ec4-9e0a-5c861e528bba
urlstringThe webhook URL. Example: https://some-webhook-endpoint.url
createdAtstringTimestamp of when the settings were created. Example: 2024-04-05 13:45:27.063
updatedAtstringTimestamp of the last update. Example: 2024-04-05 13:45:27.063

📘 Example Response

{
  "success": true,
  "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"
  }
}

✅ Use Cases

  • Set a Webhook URL: Partners who want to start receiving webhook notifications can use this endpoint to register their desired URL.
  • Update the Webhook URL : If the webhook destination changes (e.g., server migration), partners can update the URL by sending a new value.

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.

success
boolean
Example:

true

data
object
I