Skip to main content

POST /intent//execute/

Execute a specific intent step and return the execution results.

Endpoint

Description

This endpoint executes a specific step in an intent workflow. Each call performs one unit of work, triggering checks, sending transactions, and returning the execution results. This is an active execution endpoint that modifies state and performs side effects.

Path Parameters

Request Body

Request Parameters

How It Works

  • Intent ID: The signature of the chainBatches (similar to Solana’s approach)
  • Step ID: Integer representing the index of the chain batch in the array
  • Execution: Calling this endpoint triggers the actual work for that step
  • Unit of Work: Each call performs one discrete unit of work in the intent workflow

Response

Success Response (200)

Response Fields

Step Status

Error Responses

400 Bad Request

404 Not Found

Note: The POST execution endpoint currently returns 500 for most failures. Use the GET status endpoint for 404 (not found) semantics.

500 Internal Server Error

Example Request

Example Usage

Workflow Pattern

  1. Submit Intent: Use POST /transaction/submit to create the intent
  2. Execute Steps: Call POST /intent/{id}/execute/{i} for each step i = 0, 1, 2, …
  3. Check Results: Each response contains the execution results for that step
  4. Continue: Execute steps sequentially until the intent is complete

Notes

  • Steps must be executed in order (0, 1, 2, …)
  • Each step corresponds to a chain batch in the original array
  • The endpoint performs actual execution with side effects (not idempotent)
  • Failed steps may be retryable depending on the failure reason
  • Intent data is persisted in the database for reliable execution tracking
  • Use dryRun: true to simulate execution without committing changes