Skip to content

Add Webhooks V2 documentation#651

Open
taylorjdawson wants to merge 2 commits intomainfrom
taylor/eng-4112-webhooks-v2-docs
Open

Add Webhooks V2 documentation#651
taylorjdawson wants to merge 2 commits intomainfrom
taylor/eng-4112-webhooks-v2-docs

Conversation

@taylorjdawson
Copy link
Copy Markdown
Collaborator

Summary

  • Replace the legacy activity-webhook guide with a Webhooks V2 customer guide covering endpoint creation, event types, delivery headers, signatures, permissions, payloads, troubleshooting, and legacy compatibility.
  • Keep generated webhook API reference pages from the updated main branch intact.
  • Leave public verification-key discovery out of customer docs until the unauthenticated discovery endpoint is finalized.

Testing

  • git diff --check main..HEAD
  • python3 -m json.tool docs.json
  • env PATH=/opt/homebrew/Cellar/node/24.2.0/bin:$PATH npx --yes mintlify@latest validate

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 7, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
turnkey-docs 🟢 Ready View Preview May 7, 2026, 12:20 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

…n webhooks.mdx

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
title: "Activity webhooks"
description: "Webhooks provide a powerful mechanism to receive notifications about activity requests in your Turnkey organization. Additionally, you'll be able to receive all activity requests for both the parent organization and all its child organizations. This functionality can be enabled via the organization feature capabilities of our platform, as detailed in the section on [organization features](/concepts/organizations#features)."
title: "Webhooks"
description: "Use Webhooks V2 to receive signed notifications for activity and balance events in your Turnkey organization."
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove V2 from here?

---

This guide is designed to walk you through the process of setting up webhooks, from environment preparation to verification of successful event capturing.
Webhooks V2 sends HTTPS `POST` requests to endpoints that you register with Turnkey. Each endpoint can subscribe to one or more event types, and every delivery includes Turnkey headers. Signed deliveries also include Ed25519 signature headers so your receiver can verify that the request came from Turnkey before processing it.
Copy link
Copy Markdown

@grahamritter grahamritter May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove V2 from here and throughout?


## Prerequisites
<Info>
Webhooks V2 is the recommended integration path for new webhook integrations. Legacy activity webhooks configured with `FEATURE_NAME_WEBHOOK` are still described at the end of this page for existing integrations.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we just remove this all-together - we are requiring a full-on migration anyways - any slow movers we can work with 1:1

| Event type | Description | Configuration scope |
| --- | --- | --- |
| `ACTIVITY_UPDATES` | Sends activity status updates. Parent-owned subscriptions receive parent and sub-organization activity events. Sub-organization-owned subscriptions receive only that sub-organization's activity events. | Organization-scoped |
| `BALANCE_CONFIRMED_UPDATES` | Sends confirmed balance update events for tracked wallet account addresses. | Billing organization / parent organization scoped |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would suggest below this a tip on viewing the balances documentation as there are tier implications. (https://docs.turnkey.com/concepts/balances#balances)

suggested language: "For further information on balances please see (https://docs.turnkey.com/concepts/balances#balances)"

| List endpoints | [`/public/v1/query/list_webhook_endpoints`](/api-reference/queries/list-webhook-endpoints) | Returns endpoints and their subscriptions for an organization. |

Set `isActive` to `false` if you want to pause delivery without deleting the endpoint.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add: "You can also manage webhooks via the Dashboard UI."

| Signature verification fails | Verify against the exact raw request body bytes, use the millisecond timestamp and event id from the headers, check clock skew, and select the public key matching the signature key id. |

Set your webhook URL using the Turnkey CLI with the following command:
## Legacy activity webhooks
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think we can cut this whole section

| `X-Turnkey-Webhook-Version` | Webhook delivery contract version. The current value is `1`. |

Here's an output of the above command:
Signed Webhooks V2 deliveries also include:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arent webhooks always going to be signed? I didnt think there was a configuration option here - would suggest collapsing the headers into one table!

</Info>

Before diving into webhook configuration, ensure you have completed the necessary preliminary steps outlined in our [Quickstart Guide](/getting-started/quickstart#create-your-turnkey-organization). This guide will assist you in setting up a new organization and installing the Turnkey CLI. Note: We'll create a new API Key for testing webhooks below.
## Create an endpoint
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested Page order:

  1. Event types
  2. Create an endpoint
  3. Manage endpoints
  4. Delivery contract
  5. Verify signatures
  6. Payloads
  7. Permissions
  8. Troubleshooting

---

This guide is designed to walk you through the process of setting up webhooks, from environment preparation to verification of successful event capturing.
Webhooks V2 sends HTTPS `POST` requests to endpoints that you register with Turnkey. Each endpoint can subscribe to one or more event types, and every delivery includes Turnkey headers. Signed deliveries also include Ed25519 signature headers so your receiver can verify that the request came from Turnkey before processing it.
Copy link
Copy Markdown

@grahamritter grahamritter May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest a new intro:

Webhooks let you receive real-time notifications from Turnkey as signed HTTPS POST requests. Register an endpoint, subscribe to event types, and Turnkey delivers activity and balance updates as they happen.

Key Capabilities:

  • Signed deliveries with Ed25519 signatures and SDK verification helpers
  • Organization-aware headers including org ID, event type, and timestamps on every delivery
  • Automatic retries with backoff for failed deliveries (5xx and network errors)
  • Dashboard and API management for creating and configuring endpoints
  • Policy-engine permissioned through dedicated activity types, like any other Turnkey operation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants