Skip to content

Broadcast webhooks docs#649

Open
amircheikh wants to merge 4 commits into
mainfrom
amir/tx-status-webhooks
Open

Broadcast webhooks docs#649
amircheikh wants to merge 4 commits into
mainfrom
amir/tx-status-webhooks

Conversation

@amircheikh
Copy link
Copy Markdown
Contributor

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 5, 2026

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

Project Status Preview Updated (UTC)
turnkey-docs 🟢 Ready View Preview May 5, 2026, 8:02 PM

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

@amircheikh amircheikh changed the title Added webhook section to broadcasting docs Broadcast webhooks docs May 5, 2026
Comment thread concepts/broadcasting.mdx Outdated

#### Subscribing

Use the [Create Webhook Endpoint](/api-reference/activities/create-webhook-endpoint) API with the `SEND_TRANSACTION_STATUS_UPDATES` event type to register your endpoint. Create the webhook endpoint on the parent organization. Balance webhook delivery is scoped to wallet-account addresses within your parent organization and its sub-organizations. This includes both addresses generated through Turnkey and addresses imported into your Turnkey organization.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use the Create Webhook Endpoint API with the SEND_TRANSACTION_STATUS_UPDATES event type to register your endpoint. Create the webhook endpoint on the parent organization.

^ my suggestion. In the paragraph right above this we say that subs will cover all txns initiated across the parent org and all of its suborgs. We also say that this will work for all of your turnkey transactions so no need to say again

Comment thread concepts/broadcasting.mdx Outdated
| `msg.idempotencyKey` | A stable, unique key for this status event. Use this to safely deduplicate webhook deliveries. |
| `msg.timestamp` | Unix timestamp (seconds) when the notification was generated. |
| `msg.txHash` | _(INCLUDED only)_ The on-chain transaction hash or Solana signature. |
| `msg.error` | _(FAILED only)_ Structured error object. Contains `message`, and either `eth.revertChain` (EVM) or `solana` (Solana) details. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We say failed is the only time you'll get this, but right above we say that error might be present in included with full revert details. Let's just make sure that we're consistent and accurate here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah its possible it will be present in the "INCLUDED" status. I'm just gonna remove the (FAILED only) tag in the table

Comment thread concepts/broadcasting.mdx Outdated
| `type` | Always `"transaction:status"`. |
| `msg.sendTransactionStatusId` | The ID of the send transaction status record. |
| `msg.activityId` | The ID of the originating Turnkey activity. |
| `msg.orgID` | The sub-organization ID that initiated the transaction. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

doesn't have to be a suborg right? could be a parent org?

Comment thread concepts/broadcasting.mdx Outdated
## Transaction status and enriched errors

After you send a transaction, Turnkey monitors its status until it fails or is confirmed on-chain.
After you send a transaction, Turnkey monitors its status until it fails or is confirmed on-chain. You can [query the transaction status](./broadcasting#querying-via-api) or subscribe to status updates [via webhooks](./broadcasting#webhooks).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

very small nit but let's just be consistent with "onchain" as opposed to "on-chain"

We have "onchain" later in this doc anyway, let's just make it consistent without the -

Comment thread concepts/broadcasting.mdx Outdated

Turnkey Webhooks let you react to transaction status updates in real time, without polling. Instead of repeatedly calling the [Get Send Transaction Status](/api-reference/queries/get-send-transaction-status) API to check for updates, you register an endpoint and Turnkey pushes the data to you; an HTTP POST fires when a transaction status changes (e.g. from `BROADCASTING` to `INCLUDED` or `FAILED`). Webhook payloads deliver rich transaction status updates as soon as they occur, so you can keep your users informed and react to failures immediately.

You subscribe to webhooks at the parent organization level. Subscriptions cover all transactions initiated across the parent organization and all of its sub-organizations. In other words, once you subscribe you'll receive webhook notifications for all transactions within your entire Turnkey instance.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wdyt about:

Subscriptions cover transactions across the parent organization and all of its sub-organizations. In other words, once you subscribe you'll receive webhook notifications for all transactions that are powered by Turnkey's transaction management suite.

reason being is I don't want users who are using us for signing to think they will be able to use this

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.

3 participants