curl --request POST \
--url https://api.platform.dakota.xyz/webhooks/targets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"url": "https://example.com/webhooks/receive",
"global": false,
"event_types": [
"api_key.created"
]
}
'const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com/webhooks/receive',
global: false,
event_types: ['api_key.created']
})
};
fetch('https://api.platform.dakota.xyz/webhooks/targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/webhooks/targets"
payload = {
"url": "https://example.com/webhooks/receive",
"global": False,
"event_types": ["api_key.created"]
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/webhooks/targets"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks/receive\",\n \"global\": false,\n \"event_types\": [\n \"api_key.created\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"url": "https://example.com/webhooks/receive",
"global": false,
"event_types": [
"api_key.created"
],
"time_last_healthy": 0,
"time_last_attempted": 0
}{
"type": "https://docs.dakota.xyz/api-reference/errors#invalid-request",
"title": "Invalid request",
"status": 400,
"detail": "Invalid request",
"instance": "https://api.platform.dakota.xyz/webhooks/targets",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#authentication-error",
"title": "Unauthorized",
"status": 401,
"detail": "Unauthorized",
"instance": "https://api.platform.dakota.xyz/webhooks/targets",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Forbidden",
"instance": "https://api.platform.dakota.xyz/webhooks/targets",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}Create a webhook target
Create a new webhook target for receiving webhooks
curl --request POST \
--url https://api.platform.dakota.xyz/webhooks/targets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"url": "https://example.com/webhooks/receive",
"global": false,
"event_types": [
"api_key.created"
]
}
'const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com/webhooks/receive',
global: false,
event_types: ['api_key.created']
})
};
fetch('https://api.platform.dakota.xyz/webhooks/targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/webhooks/targets"
payload = {
"url": "https://example.com/webhooks/receive",
"global": False,
"event_types": ["api_key.created"]
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/webhooks/targets"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks/receive\",\n \"global\": false,\n \"event_types\": [\n \"api_key.created\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"url": "https://example.com/webhooks/receive",
"global": false,
"event_types": [
"api_key.created"
],
"time_last_healthy": 0,
"time_last_attempted": 0
}{
"type": "https://docs.dakota.xyz/api-reference/errors#invalid-request",
"title": "Invalid request",
"status": 400,
"detail": "Invalid request",
"instance": "https://api.platform.dakota.xyz/webhooks/targets",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#authentication-error",
"title": "Unauthorized",
"status": 401,
"detail": "Unauthorized",
"instance": "https://api.platform.dakota.xyz/webhooks/targets",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Forbidden",
"instance": "https://api.platform.dakota.xyz/webhooks/targets",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Customer Not Found",
"status": 404,
"detail": "Customer cst_2abc123 was not found in your organization.",
"instance": "https://api.platform.dakota.xyz/customers/cst_2abc123",
"request_id": "req_7f3a8b2c"
}Authorizations
Headers
Unique key (UUID) to ensure request idempotency on POST, PUT and PATCH requests.
A key is scoped to your client, the HTTP method and the path, and is remembered for 24 hours after a
successful (below 400) response. Repeating the same request (same JSON body, whatever the key order or
whitespace) with the same key within that window returns the original response with
X-Idempotent-Replayed: true instead of executing the request again. Using the same key on the same
endpoint with a different body returns 422 with problem type idempotency-key-reused; the request is
not executed. Error responses (4xx and 5xx) are not remembered, so a request refused for a fixable reason
can be corrected and retried under the same key. Request bodies that are not JSON (for example file
uploads) are not compared.
Body
Request to create a new webhook target
The URL where webhook events will be sent
"https://example.com/webhooks/receive"
If true, this target will receive all event types
false
List of event types this target cares about (ignored if global is true)
Canonical outbound event type identifier.
user.created, user.updated, user.deleted, api_key.created, api_key.deleted, customer.created, customer.updated, customer.kyb_link.created, customer.kyb_link.updated, customer.kyb_status.created, customer.kyb_status.updated, customer.kyb_application.submitted, customer.capability_status.updated, customer.rfi.requested, customer.rfi.responded, customer.application.withdrawn, customer.application.imported, auto_account.created, auto_account.updated, auto_account.deleted, transaction.auto.created, transaction.auto.updated, transaction.one_off.created, transaction.one_off.updated, recipient.created, recipient.updated, recipient.deleted, destination.created, destination.deleted, target.created, target.updated, target.deleted, exception.created, exception.cleared, wallet.created, wallet.updated, wallet.signer_group.created, wallet.signer_group.updated, wallet.policy.created, wallet.policy.updated, wallet.transaction.created, wallet.transaction.updated, wallet.deposit, rd_payout_destination.updated, deployment_payout_destination.updated, fee_payout_destination.updated, fee_payout_destination.deleted, scheduled_payment.failed, cardholder.created, cardholder.updated, cardholder.information_requested, card.created, card.updated, card_transaction.created, card_transaction.updated, wallet.card_enablement.completed, deposit.held, deposit.returned Response
Webhook target created successfully
A webhook target for receiving outbound webhook events
KSUID is a 27-character globally unique ID that combines a timestamp with a random component. Used for all entity identifiers in the Dakota platform.
27^[0-9A-Za-z]{27}$"1NFHrqBHb3cTfLVkFSGmHZqdDPi"
The URL where webhook events will be sent
"https://example.com/webhooks/receive"
If true, this target will receive all event types
false
Unix timestamp when this target last received a successful delivery (defaults to creation time if never healthy)
Unix timestamp when a delivery to this target was last attempted (defaults to creation time if never attempted)
List of event types this target cares about (ignored if global is true)
Canonical outbound event type identifier.
user.created, user.updated, user.deleted, api_key.created, api_key.deleted, customer.created, customer.updated, customer.kyb_link.created, customer.kyb_link.updated, customer.kyb_status.created, customer.kyb_status.updated, customer.kyb_application.submitted, customer.capability_status.updated, customer.rfi.requested, customer.rfi.responded, customer.application.withdrawn, customer.application.imported, auto_account.created, auto_account.updated, auto_account.deleted, transaction.auto.created, transaction.auto.updated, transaction.one_off.created, transaction.one_off.updated, recipient.created, recipient.updated, recipient.deleted, destination.created, destination.deleted, target.created, target.updated, target.deleted, exception.created, exception.cleared, wallet.created, wallet.updated, wallet.signer_group.created, wallet.signer_group.updated, wallet.policy.created, wallet.policy.updated, wallet.transaction.created, wallet.transaction.updated, wallet.deposit, rd_payout_destination.updated, deployment_payout_destination.updated, fee_payout_destination.updated, fee_payout_destination.deleted, scheduled_payment.failed, cardholder.created, cardholder.updated, cardholder.information_requested, card.created, card.updated, card_transaction.created, card_transaction.updated, wallet.card_enablement.completed, deposit.held, deposit.returned Was this page helpful?

