Skip to main content

Attribute Action

After the user signs and submits the deposit transaction on-chain, use this endpoint to link the transaction hash to the action. This enables Turtle to verify and track the deposit.
curl -X POST "https://earn.turtle.xyz/v1/actions/attribute/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "Content-Type: application/json" \
  -d '{"txHash": "0xedfdf71e0e4daec5afcb87988821a8bccd5c282647c8e81a65a71181a44a8e51"}'
Path Parameters
actionId
uuid
required
The action ID returned from the deposit endpoint.
Body Parameters
txHash
string
required
The on-chain transaction hash (0x followed by 64 hex characters).
Response
{
  "success": true,
  "message": "Transaction hash attributed and verified successfully",
  "signatureValid": true
}
success
boolean
required
Whether the attribution was successful.
message
string
required
Human-readable result message.
signatureValid
boolean
required
Whether the on-chain tracking signature was verified as valid. A valid signature confirms the transaction was routed through Turtle’s attribution system.

Error Handling

Status Code: 400 Bad Request
{
  "error": "INVALID_ARGUMENT",
  "message": "invalid transaction hash format. Expected 0x followed by 64 hexadecimal characters"
}
Solution: Ensure the tx hash is a valid 0x-prefixed 64 character hex string.
Status Code: 404 Not Found
{
  "error": "NOT_FOUND",
  "message": "action not found or already synced"
}
Solution: The action ID may be incorrect or already attributed. Each action can only be attributed once.
  • Deposit - Generate deposit transactions
  • Verify - Verify that a transaction contains valid Turtle tracking data