Skip to main content
POST
/
tasks
Schedule a new task
curl --request POST \
  --url https://staging.hdp.api.herodotus.cloud/tasks \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "destination_chain_id": "0x534e5f5345504f4c4941",
  "input": {
    "compiled_class": {
      "bytecode": [
        "0x480680017fff8000",
        "0x1",
        "..."
      ],
      "bytecode_segment_lengths": [
        100
      ],
      "compiler_version": "2.6.0",
      "entry_points_by_type": {
        "CONSTRUCTOR": [],
        "EXTERNAL": [
          {
            "builtins": [
              "range_check",
              "pedersen"
            ],
            "offset": 0,
            "selector": "0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320"
          }
        ],
        "L1_HANDLER": []
      },
      "hints": [],
      "prime": "0x800000000000011000000000000000000000000000000000000000000000001",
      "pythonic_hints": []
    },
    "injected_state": {},
    "params": [
      "0x1234",
      "0x5678",
      "0x9abc"
    ]
  },
  "program_hash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
  "task_inputs": [
    {
      "value": "0x1234",
      "visibility": "public"
    },
    {
      "value": "0x5678",
      "visibility": "private"
    }
  ],
  "webhook_url": "https://example.com/webhook"
}
'
{
  "message": "Task has been queued",
  "uuid": "01J3Z3K2P4W6M8Q0A1B2C3D4E5"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

Task creation request with destination chain, compiled module, and execution parameters

destination_chain_id
string
required

Hex chain ID string (e.g., "0xa4b1", "0xaa36a7")

input
object
required
herodotus_cloud_api_key
string | null
injected_state_server
string | null
is_atlantic_mock_hash
boolean | null
is_mock
boolean | null
program_hash
string | null
schedule_mode
string | null
schedule_tx_hash
string | null
task_inputs
any
webhook_url
string | null

Response

Task has been queued for processing

message
string
required
status
string
required
uuid
string
required