Transaction records
Update status and hash
PATCH status, hash, receipt, and providerRefs as the send progresses.
Endpoint
PATCH/v1/transactions/:txId
Partial update. Only status, txHash, receipt, and providerRefs are accepted. Patching to confirmed sets confirmedAt. providerRefs merges into any existing map.
Body
| Field | Required | Description |
|---|---|---|
| status | No | prepared | broadcast | confirmed | failed |
| txHash | No | Non-empty on-chain hash |
| receipt | No | Arbitrary receipt JSON (e.g. from Cloud) |
| providerRefs | No | Merged string map |
Request
curl -sS -X PATCH "https://ledger.gray3.io/v1/transactions/tx_your_transaction_id" \
-H "X-Gray-Project-Id: proj_your_project_id" \
-H "Authorization: Bearer gray_sk_your_secret" \
-H "Content-Type: application/json" \
-d '{
"status": "broadcast",
"txHash": "0x…"
}'Response
HTTP 200 — success envelope wraps the payload in data.
json
{
"data": {
"_id": "tx_…",
"projectId": "proj_…",
"organizationId": "org_…",
"kind": "transfer",
"chainId": "ethereum-sepolia",
"from": "0xYourAddress",
"to": "0xRecipient",
"value": "1000000000000000000",
"status": "broadcast",
"txHash": "0x…",
"createdAt": "2026-03-01T10:00:00.000Z",
"updatedAt": "2026-03-01T10:01:00.000Z"
}
}Confirm example
Request
curl -sS -X PATCH "https://ledger.gray3.io/v1/transactions/tx_your_transaction_id" \
-H "X-Gray-Project-Id: proj_your_project_id" \
-H "Authorization: Bearer gray_sk_your_secret" \
-H "Content-Type: application/json" \
-d '{
"status": "confirmed",
"receipt": {
"status": "success",
"blockNumber": "12345678"
}
}'Errors
Errors use HTTP { "error": { "code", "message", "retryable" } }. Branch on code, not the message text.
| Code | HTTP | When |
|---|---|---|
| unauthorized | 401 | Missing or invalid project credentials |
| invalid_argument | 400 | Bad kind, chainId, status, empty from/hash, or malformed body |
| not_found | 404 | Unknown transaction ID, or a record owned by another project |
| rate_limit_exceeded | 429 | Write or project throttle (retryable) |
json
{
"error": {
"code": "unauthorized",
"message": "Human-readable detail (may be sanitized).",
"retryable": false
}
}Status meanings: Status model.