Developer docs

Donato Developer Docs

Go to the terminal tour →or read the two rules below first.terminal tour

openapi.jsonCreate key
1.0 · Start here

Let the AI write the integration

Give Claude, Cursor or ChatGPT these two things before the first question — a short prompt with the rules that break integrations most often, and this whole page as Markdown.

Code
You are helping me integrate the Donato.click donation API.

Signed: IJe-Donato-click v1.0.1-1

Base URL: https://donato.click/api/v1
Sandbox:  https://sandbox-api.donato.click/api/v1
Full machine-readable schema: https://donato.click/api/v1/openapi.json
Auth: every request sends `Authorization: Bearer $DONATO_API_KEY`.

Rules that decide whether the integration is correct:
1. Webhooks are the truth. A 201 from POST /donations means "payment requested",
   not "money arrived". Only the `donation.completed` webhook means paid.
2. Money is satang (integer). 10000 = ฿100.00. Never parse amounts as floats.
3. Delivery guarantee: at-least-once — deduplicate on event_id
4. Verify every webhook before trusting it:
   - header: `X-IJe-Donato-click-Signature`
   - format: t=<unix-seconds>,v1.0.1-1=<hex hmac-sha256>
   - signed payload: `${timestamp}.${rawBody}` — sign the RAW body, not a re-serialised object.
   - reject anything older than 300s, and compare digests
     in constant time.
5. Reply 2xx within 10s. Failed attempts retry on
   1m → 5m → 15m → 1h → 24h, and an endpoint is disabled
   after 5 consecutive failures.
6. Send an `Idempotency-Key` on every write.
7. Errors are RFC 9457 problem documents. Branch on `type`, never on the prose:
   `invalid_request`, `invalid_api_key`, `insufficient_scope`, `insufficient_tier`, `sandbox_only`, `not_found`, `conflict`, `unprocessable`, `rate_limited`, `quota_exceeded`, `internal_error`.
   `rate_limited` clears in seconds; `quota_exceeded` does not clear until the
   quota resets, and retrying it only burns requests.

Webhook events: donation.completed, donation.refunded, withdraw.completed, ping.

Tooling you can use instead of writing HTTP by hand: the `donatoclick` CLI
(`donato init` scaffolds a receiver that already verifies signatures) and the
`donatoclick-mcp` MCP server, which can create endpoints and send test events.

When you are unsure about a route, read openapi.json rather than guessing.

Both the prompt and the Markdown are generated from openapi.json, the event list and the retry schedule — the same source this page renders. When the code changes, the text you copy changes with it.There is no way to tell the AI the wrong signature header name.4.2 CLI & MCPIf you would rather have the agent do it end to end — create an endpoint, fire a test, watch the event log — use the MCP server at terminal tour

1.1 · The two rules

The two rules that decide it

Everything else is detail. These two are where integrations actually break — the same picture the terminal tour teaches with donato check.

1. A webhook is the truth

means "please charge", not "the money is in". Wait forPOST /donationsand nothing else.donation.completedSee the event catalogue →see the event catalogue →

2. Money is an integer count of satang

10000means ฿100.00. Never parse it as a float — one rounding step and the totals stop matching.

Code
curl https://donato.click/api/v1/usage \
  -H "Authorization: Bearer dnt_live_..."

Try the same command in your shell atcli → overview

1.2 · Authentication

Authentication

A plain bearer token, but with two dimensions people get wrong constantly: the environment is bound to the host rather than the header, and the scope is bound to the key at creation time.

What it is forHostWhat it is for
dnt_test_https://sandbox-api.donato.click/api/v1Sandbox — every plan works
dnt_live_https://donato.click/api/v1Production — needs a Rise plan or above

Sending a test key to the production host returns a 403 with type sandbox_only — on purpose. If the environment could be swapped with a header or a query, someone would eventually believe a real donation was a test.403Scopes come in three levels: read, write and withdraw — grant only what you need.sandbox_onlyIf a request fails, the problem document is RFC 9457 problem+json — the request_id is the first thing support will ask for.

The environment is bound to the host, not to the header, and the scope is bound to the key at creation time.read · write · withdrawCreate a real key at

Code
curl https://donato.click/api/v1/donations \
  -H "Authorization: Bearer $DONATO_API_KEY"

dashboard → developersdashboard → developers

2.0 · Reference

Endpoint reference

35 operations — read straight from the openapi.json the server is serving.

/analytics

get/analytics/overviewRevenue KPIsread

Clamped to the plan analytics retention window.

Parameters

  • months · query

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/analytics/overview" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/creator

get/creator/profileThe key owner's profileread

The creator the key belongs to: username, display name, avatar, tier and the public donation link. Another creator’s profile is not readable with this key — a key only ever sees its own.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/creator/profile" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/custom-domains

get/custom-domainsList custom domainsread

The domains pointed at this creator's donation pages, with the state of each DNS check.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/custom-domains" \
  -H "Authorization: Bearer $DONATO_API_KEY"
patch/custom-domainsVerify or remove a custom domainwrite

The id travels in the body, not the path. Action `verify` checks DNS and `remove` deletes.

Responses

  • 200 — Verified or removed
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X PATCH "https://donato.click/api/v1/custom-domains" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
post/custom-domainsAdd a custom domainwrite

Rise+ only. Max 3.

Responses

  • 201 — Domain added
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/custom-domains" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

/donation-urls

get/donation-urlsList donation linksread

Every donation link on the account: the random one, and any custom slugs. A link that is not online still appears here, with the state it is in.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/donation-urls" \
  -H "Authorization: Bearer $DONATO_API_KEY"
patch/donation-urlsUpdate a donation linkwrite

Two shapes, both accepted. The `action` shape updates one thing per request; the multi-field shape updates everything in one request. Never mix `action: revoke` with other fields. min_amount is the one field on this API that takes BAHT: 100 means ฿100.00. Every other money field is integer satang, where 10000 means ฿100.00.

Responses

  • 200 — Updated
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X PATCH "https://donato.click/api/v1/donation-urls" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
post/donation-urlsCreate a donation linkwrite

Rise+ only. Always starts offline — toggle online requires verification.

Responses

  • 201 — Link created
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/donation-urls" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
get/donation-urls/check-slugCheck whether a custom slug is available

Public — no API key needed. Rate limited per signed-in creator, and per IP for a caller with no session. Call it before you commit to a slug, not in a loop.

Parameters

  • slug · queryrequired

Responses

  • 200 — Availability result
  • 400 — Missing slug
Code
curl -X GET "https://donato.click/api/v1/donation-urls/check-slug" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/donations

get/donationsList donationsread

Newest first, cursor-paginated.

Parameters

  • limit · query
  • cursor · query — Opaque cursor from a previous response. There is no offset paging.
  • status · query
  • from · query
  • to · query

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/donations" \
  -H "Authorization: Bearer $DONATO_API_KEY"
post/donationsCreate a donation requestwrite

Returns a payment URL. NOT a confirmation of payment — wait for the donation.completed webhook.

Parameters

  • Idempotency-Key · header — Optional. A UUID you generate per intent. Retrying with the same key replays the first response for 24h. Omitting this header disables idempotency protection for that request.

Responses

  • 201 — Donation request created
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — Idempotency-Key reused with a different body
  • 422 — Amount outside the allowed range
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/donations" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
get/donations/{id}Get one donationread

One donation by id. A donation that belongs to another creator is answered exactly like one that does not exist, so an id cannot be probed.

Parameters

  • id · pathrequired

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/donations/{id}" \
  -H "Authorization: Bearer $DONATO_API_KEY"
get/donations/statisticsDonation statisticsread

Totals bucketed by day, week, or month. Counts only revenue-bearing statuses, matching the creator dashboard.

Parameters

  • period · query
  • from · query
  • to · query

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/donations/statistics" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/events

get/eventsEvent log (catch-up feed)read

Every event this account produced, oldest first. Use it to recover events missed while your server was down: persist the last event_id you processed and pass it as `after`.

Parameters

  • after · query — Last event_id you processed.
  • event · query
  • limit · query

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/events" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/goals

delete/goalsDelete a goalwrite

The id travels as `?id=`, not as a path segment — there is no /goals/{id} route.

Parameters

  • id · queryrequired

Responses

  • 200 — Deleted
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X DELETE "https://donato.click/api/v1/goals" \
  -H "Authorization: Bearer $DONATO_API_KEY"
get/goalsList goalsread

All goals for the key owner.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/goals" \
  -H "Authorization: Bearer $DONATO_API_KEY"
patch/goalsUpdate a goalwrite

The id travels in the body, not the path — there is no /goals/{id} route. ends_at follows the same rule as create: ISO 8601 in the future to set, null to remove, absent to leave the existing deadline alone.

Responses

  • 200 — Updated
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X PATCH "https://donato.click/api/v1/goals" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
post/goalsCreate a goalwrite

Rise+ only — free is read-only. Idempotent by name+slug. ends_at is the instant the goal closes, ISO 8601, and must be in the future. Omit it for a goal that never expires; send null to clear one. A deadline is not a switch: money already raised is never clawed back, and a donation arriving after it lands as unattributed support.

Responses

  • 201 — Goal created
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/goals" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

/keys

get/keysList API keysread

Metadata only. A key is never readable after it is issued.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/keys" \
  -H "Authorization: Bearer $DONATO_API_KEY"
post/keysCreate an API key — not available to API keyswrite

Returns 501. A key that could mint keys would survive revoking the original, so issuing is a dashboard-session operation.

Responses

  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
  • 501 — Dashboard session required
Code
curl -X POST "https://donato.click/api/v1/keys" \
  -H "Authorization: Bearer $DONATO_API_KEY"
delete/keys/{id}Revoke an API keywrite

Idempotent, and allowed where creation is not: revoking narrows access. A key may revoke itself, after which the next call with it returns 401.

Parameters

  • id · pathrequired

Responses

  • 200 — Revoked
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X DELETE "https://donato.click/api/v1/keys/{id}" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/presets

delete/presetsDelete a widget presetwrite

The id travels in the ?id= query param — there is no /presets/{id} route.

Parameters

  • id · queryrequired

Responses

  • 200 — Deleted
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X DELETE "https://donato.click/api/v1/presets" \
  -H "Authorization: Bearer $DONATO_API_KEY"
get/presetsList widget presetsread

Empty canvas by default.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/presets" \
  -H "Authorization: Bearer $DONATO_API_KEY"
patch/presetsUpdate a widget presetwrite

The id travels in the body, not the path — there is no /presets/{id} route.

Responses

  • 200 — Updated
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X PATCH "https://donato.click/api/v1/presets" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
post/presetsCreate a widget preset (blank)write

Rise+ only — free is read-only. Empty canvas_elements.

Responses

  • 201 — Preset created
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/presets" \
  -H "Authorization: Bearer $DONATO_API_KEY"
get/presets/revisionsList a preset’s past versionsread

Newest first, up to 20. A snapshot is taken on every write to the preset, so this is the only way back to a document an overwrite destroyed. 409 never applies here — the id is a query param, as everywhere else.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/presets/revisions" \
  -H "Authorization: Bearer $DONATO_API_KEY"
post/presets/revisionsRestore a past version of a presetwrite

Rise+ only. The restore is an ordinary save, so the version it replaces lands in the history too — an undo of an undo is possible. Returns 409 when the preset moved since `base_updated_at`.

Responses

  • 200 — Restored
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/presets/revisions" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

/usage

get/usageCurrent limits and usageread

Exempt from the quotas it reports, so it stays callable when a quota is exhausted.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/usage" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/wallet

get/walletWallet balanceread

Balances in satang.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/wallet" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/webhooks

get/webhooksList webhook endpointsread

Signing secrets are never included — they are returned once, by POST, and never again.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/webhooks" \
  -H "Authorization: Bearer $DONATO_API_KEY"
post/webhooksRegister a webhook endpointwrite

Returns the signing secret ONCE, in `data.secret`. Store it before you read anything else in the response. The environment is decided by the host you called, not by the body.

Responses

  • 201 — Endpoint registered; `data.secret` is present exactly this once
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/webhooks" \
  -H "Authorization: Bearer $DONATO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
delete/webhooks/{id}Delete a webhook endpointwrite

Soft delete — the delivery log stays readable for its retention window.

Parameters

  • id · pathrequired

Responses

  • 200 — Deleted
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such endpoint
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X DELETE "https://donato.click/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer $DONATO_API_KEY"
post/webhooks/{id}/testSend a test eventwrite

Delivers a `ping` inline and returns the receiver's own status code and body. A non-2xx there is the answer, not an error on our side.

Parameters

  • id · pathrequired

Responses

  • 200 — Attempted — see `data.delivered`
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such endpoint
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X POST "https://donato.click/api/v1/webhooks/{id}/test" \
  -H "Authorization: Bearer $DONATO_API_KEY"

/withdrawals

get/withdrawalsWithdrawal historyread

The creator's past payouts, newest first. Donato does not hold the money and does not pay it out — a withdrawal here is a record of a transfer the creator asked their bank for.

Parameters

  • limit · query
  • cursor · query — Opaque cursor from a previous response. There is no offset paging.

Responses

  • 200 — Success
  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
Code
curl -X GET "https://donato.click/api/v1/withdrawals" \
  -H "Authorization: Bearer $DONATO_API_KEY"
post/withdrawalsCreate a withdrawal — not available to API keyswithdraw

Returns 501. Withdrawals require a step-up (AAL2) check that an API key cannot present. Create them from the dashboard.

Responses

  • 400 — Invalid request
  • 401 — Invalid or revoked API key
  • 403 — Insufficient scope, plan, or a sandbox-only key aimed at production
  • 404 — No such resource, or it does not belong to this account
  • 409 — The request collides with the current state
  • 422 — Well-formed, but it cannot be carried out
  • 429 — Rate limit (type ends with 'rate_limited' — retry after the window) or monthly quota (type ends with 'quota_exceeded' — retrying will not help).
  • 500 — Something failed on our side. The request_id is what support needs.
  • 501 — Step-up authentication required
Code
curl -X POST "https://donato.click/api/v1/withdrawals" \
  -H "Authorization: Bearer $DONATO_API_KEY"
3.1 · Inbound

Webhook event catalogue

Subscribe to as many events as you like — not choosing any means you get all of them. The guarantee is at-least-once, so always dedupe on event_id.

donation.completeddonation.refundedwithdraw.completedping
donation.refundedis the one event that takes back whatdonation.completedsaid earlier — it fires when the money is refunded to the donor, or disputed by the bank.donation.completedIf your integration unlocks a reward ondata.reasonyou need a path that handles the reversal, with data.reason telling you whether it was arefundor a dispute.dispute

Every delivery is a POST whose body looks like this, and it arrives with thePOSTandX-Donato-Event, X-Donato-Event-Id, X-Donato-Delivery-Attemptheaders, plus the signature header.X-IJe-Donato-click-SignatureSee the same picture, briefly, at cli → webhooks

Code
{
  "event": "donation.completed",
  "event_id": "evt_...",
  "created_at": "2026-01-31T09:12:44.120Z",
  "data": {
    "amount": 10000,
    "currency": "THB",
    "donor_name": "...",
    "message": "..."
  }
}
at-least-onceat-least-once means the same event really can arrive twice — store the event_id you have already processed and skip the duplicate.event_idNever use the received time as the tie-breaker.
3.2 · Security

Signature verification

The X-IJe-Donato-click-Signature header looks like t=<unix-seconds>,v1.0.1-1=<hex hmac-sha256> — you have to sign the raw body, nothing else.

What gets signed is the raw payload, and it has to carry a timestamp, because a signature that wraps only the body stays valid forever — anyone who captures one delivery can replay it for life. The receiving side must reject anything older than`${timestamp}.${rawBody}` — sign the RAW body, not a re-serialised object.seconds.300 seconds

The trap: if your framework parses the JSON first and then you re-serialise the object, the signature will not match, because the bytes are not the same.JSON.stringifyRead the raw body.
Code
import { createHmac, timingSafeEqual } from 'node:crypto';

const TOLERANCE_SECONDS = 300;

export function verify(rawBody: string, header: string, secret: string): boolean {
  const parts = new Map(
    header.split(',').map(p => {
      const [k, v] = p.split('=');
      return [k?.trim() ?? '', v?.trim() ?? ''] as const;
    })
  );

  const timestamp = Number(parts.get('t'));
  const provided = parts.get('v1.0.1-1');
  if (!Number.isFinite(timestamp) || !provided) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > TOLERANCE_SECONDS) return false;

  const expected = createHmac('sha256', secret)
    .update(`${timestamp}.${rawBody}`, 'utf8')
    .digest('hex');

  const a = Buffer.from(expected, 'hex');
  const b = Buffer.from(provided, 'hex');
  // เช็คความยาวก่อน: timingSafeEqual โยน exception ถ้ายาวไม่เท่ากัน
  // และ exception ที่โยนออกมาก็เป็น timing signal ในตัวมันเอง
  return a.length === b.length && timingSafeEqual(a, b);
}

The trap: if your framework parses the JSON first and then you re-serialise the object, the signature will not match, because the bytes are not the same. Read the raw body.donato initStart a fresh receiver with a correct verify using cli → scaffold fast

3.3 · Delivery

Retry & auto-disable

Timeout 10 seconds per attempt, 5 retries, then it stops.

First attempt→+1m#2→+5m#3→+15m#4→+1h#5→+24h#6

A delivery counts as successful only on a 2xx. If your endpoint fails consecutively, the system disables it automatically and records the reason on the Developers page — you can re-enable it once it is fixed, and re-enabling resets the counter.5 consecutive failuresEvery retry is a new delivery attempt, so treat it as a fresh request.

Do not sit and guess what was missed if it has been disabled or your server was down longer than the retry window — pull the gap with /events./eventsThe first attempt goes out immediately; the schedule below is what follows it.

3.4 · Recovery

Catch-up with GET /events

A webhook is a push; this endpoint is a pull — it is here for when your server was down for two hours and the donations from that window vanished from view.

Keep the last event_id you processed successfully, then send it as after when you start back up. This endpoint orders events from oldest to newest — unlike every other list endpoint — because a replay has to be in the same order it really happened.event_idSave the cursor after handling the event, never before.afterThe rate limit on this endpoint is double a normal read, because it is designed to be hammered exactly when everything else is broken.

Code
let cursor = await loadLastSeenEventId(); // null ครั้งแรก
let hasMore = true;

while (hasMore) {
  const url = new URL('https://donato.click/api/v1/events');
  url.searchParams.set('limit', '100');
  if (cursor) url.searchParams.set('after', cursor);

  const res = await fetch(url, {
    headers: { Authorization: `Bearer ${process.env.DONATO_API_KEY}` },
  });
  const { data, meta } = await res.json();

  for (const event of data) await handle(event);

  cursor = meta.next_after;
  hasMore = meta.has_more;
  await saveLastSeenEventId(cursor); // save หลัง handle เสมอ ไม่ใช่ก่อน
}

cli → events tail cli → events tail

3.5 · Lifecycle

วงจรชีวิตของโดเนท

แต่ละสถานะหมายถึงอะไร และสถานะไหนคือเงินจริง

A 201 from `POST /donations` means a payment was requested, not that money arrived. Only `completed` means the money is in: count revenue, unlock rewards and fire your alert on that status. `paid` means the gateway took the money but settlement has not finished.

Statusหมายถึงนับเป็นรายได้
draftค่าเริ่มต้นของคอลัมน์ ไม่มี write path ไหนเซ็ตค่านี้ — ทุกโดเนทถูกสร้างพร้อมสถานะจริงเสมอ — จึงไม่ควรเจอNo
pendingสร้างแล้ว แต่ยังไม่แสดงให้ผู้สนับสนุนเห็นNo
waiting_paymentกำลังชำระเงินอยู่ — แสดง QR PromptPay หรือกำลังหักบัตรNo
paidgateway รับเงินไปแล้ว แต่ฝั่งเรายังเซ็ตเทิลไม่เสร็จNo
completedเงินเข้าแล้ว นี่คือสถานะที่ต้องนับรายได้ ปลดของรางวัล และยิง alertYes
failedการชำระเงินล้มเหลว ผู้สนับสนุนไม่ถูกหักเงินNo
expiredหมดเวลารอชำระเงินก่อนที่จะจ่ายNo

ฐานข้อมูลยังอนุญาต settled`, `withdrawn`, `error`, `cancelled`, `refunded`, `chargeback ซึ่งโค้ดปัจจุบันไม่เคยเขียน — `settled` กับ `withdrawn` เป็นของโมเดล wallet ที่ถูกถอดออกไปแล้ว ส่วนที่เหลือยังไม่มี write path แต่มันอยู่ในเอกสาร OpenAPI เพราะฐานข้อมูลอนุญาต แต่โดเนทจะไม่มาที่สถานะพวกนี้

4.1 · Quotas

Limits

These numbers come from the same constant the server enforces.

Rate limit (req/min)freerisepeak
sandbox6060120
read—60300
write—20100
withdrawal——5
events—120600
alerts—3060
realtime—1030
promptpay—60300
slip—1030
Quotafreerisepeak
developers.docs.limits.rowKeys1210
developers.docs.limits.rowEndpoints1310
developers.docs.limits.rowReplays00100
developers.docs.limits.rowLogRetention1730
developers.docs.limits.rowEventRetention13090

If you get a 429, look at the type in the problem document: ending in rate_limited means wait and retry, ending in quota_exceeded means retrying will not help — wait for the billing cycle or upgrade.typeThese numbers come from the same constant the server enforces.rate_limitedA rate limit is per key, per minute.quota_exceededQuotas are per plan tier.

4.2 · Tooling

CLI & MCP server

Both of these run on the same client layer — one for people to type, one for agents to call. The sixty-second overview lives in the terminal tour.

donato CLIdonatoclick

The package is called donatoclick and the installed command is called donato — Node 20 or newer, no extra dependencies.donatoclickSee the real commands in the terminal →donatois a different package — donato on npm belongs to someone else. The donato name only works once it is installed.see the real commands in the terminal →

Code
npm install -g donatoclick

# หรือไม่ต้องติดตั้ง — ต้องเรียกด้วยชื่อ package
npx donatoclick login

npx donatoNo install needed — call it by package name.donatoThe key is stored in ~/.donato/config.json and never printed again.donatoThe key is written to your machine only after you approve it in the browser.

Code
donato login                       # เก็บ key ไว้ที่ ~/.donato/config.json
donato keys list
donato webhooks create https://your-server.com/hook
donato webhooks test <id>
donato events tail
donato listen --forward localhost:3000/api/donato
donato init                        # scaffold receiver ที่ verify ลายเซ็นให้แล้ว

MCP server

Let an AI agent set the whole integration up by itself — list keys, create an endpoint, fire a test, watch the event log.donatoclick-mcpPublished as donatoclick-mcp, so there is nothing to install first — clients can call it through npx straight away.see built-for-agents →

Code
{
  "mcpServers": {
    "donato": {
      "command": "npx",
      "args": ["-y", "donatoclick-mcp"],
      "env": { "DONATO_API_KEY": "dnt_test_..." }
    }
  }
}

Create an API key atCreate keyand come back to start at dashboard → developers

5.1 · Error codes

Error codes

Every error is an RFC 9457 problem document with the same shape, and every one of them carries a `type` you can branch on.

TypeStatusWhat it means
invalid_request400The body or the query was malformed.
invalid_api_key401The key is missing, malformed, revoked or expired.
insufficient_scope403The key is valid but does not carry the scope this endpoint needs.
insufficient_tier403The plan does not include this feature.
sandbox_only403A `dnt_test_` key aimed at the production host, or a free key going live.
not_found404No such resource, or it belongs to another account. The two answer the same way on purpose.
conflict409The request collides with the current state — a duplicate idempotency key, or a slug that is already taken.
unprocessable422The request was well-formed but cannot be carried out.
rate_limited429Too many requests in the window. Wait for `Retry-After` and try again.
quota_exceeded429The monthly quota is used up. It resets at the start of the month.
internal_error500Something failed on our side. The `request_id` is what support needs.

Branch on `type`, never on the prose in `title` or `detail` — the prose is free to be rewritten. When you contact support, quote the `request_id`: it is on every error, and it is what support asks for first.

The two that share a status are the two that get confused. `rate_limited` clears in seconds — wait for `Retry-After` and try again. `quota_exceeded` does not clear until the quota resets, and retrying only burns requests, so it carries `X-Quota-Reset` instead.

5.2 · Pagination

Pagination

Lists are cursor-paginated. The cursor is opaque, and there is no page number to keep track of.

Send limit to choose how many rows one call returns. It defaults to 20, and the server refuses more than 100.

Code
# the first page
curl https://donato.click/api/v1/donations?limit=20 \
  -H "Authorization: Bearer $DONATO_API_KEY"

# the next one — next_cursor is opaque, pass it straight back
curl "https://donato.click/api/v1/donations?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNi0wOS0xNFQwMDowMDowMFoiLCJpZCI6ImQifQ" \
  -H "Authorization: Bearer $DONATO_API_KEY"

When a page has more rows, the response carries next_cursor — pass it back as `cursor` to get the next page. There is no offset paging, so a donation that arrives mid-walk cannot make you skip or repeat a row.

5.3 · Versioning

Versioning

One version, and the rule for what may change inside it.

The version is in the path: /api/v1. Within a version nothing is removed and nothing changes incompatibly — new fields and new endpoints are added, and the fields that exist keep their meaning. A change that would break a client ships as a new version.

The OpenAPI document at /api/v1/openapi.json describes the version that is deployed now, because it is generated from the routes that are running. It is not a promise about a future version.