Skip to main content
POST
cURL

Overview

The AbortIntent endpoint cancels an in-flight intent after you have submitted the abort transaction on-chain. Once the abort transaction is confirmed, call this endpoint to notify Trails so the intent status is updated to ABORTED and any recoverable funds are tracked.

Use Cases

  • Cancel a pending intent that has not yet been processed
  • Recover stuck or expired intents
  • Clean up failed cross-chain transactions

Request Parameters

Required Fields

  • intentId (string): The unique ID of the intent to abort
  • chainId (number): The chain ID where the abort transaction was submitted
  • abortTransactionHash (string): The transaction hash of the on-chain abort transaction

Response

  • intentId (string): The ID of the aborted intent
  • status (IntentStatus): Updated status of the intent (typically ABORTED)

Examples

Abort a Pending Intent

With the Trails SDK

You must submit the abort transaction on-chain first and wait for it to be confirmed before calling this endpoint. The abortTransactionHash must correspond to a valid on-chain transaction.

Next Steps

GetIntentHistory

Query intent history including aborted intents

GetIntent

Check current intent status

Body

application/json
intentId
string
required
chainId
number
required
abortTransactionHash
string
required

Response

OK

intentId
string
required
status
enum<string>
required

Represented as uint8 on the server side

Available options:
QUOTED,
COMMITTED,
EXECUTING,
FAILED,
SUCCEEDED,
ABORTED,
REFUNDED,
INVALID