x402 Auto

Create Query

Create and activate a conditional query that monitors market data and triggers actions when conditions are met.

Allowed action types: webhook, notify, telegram_bot, llm.

Cost: Dynamic. Base fee is 5 credits ($0.0725) plus simulated LLM calls: fast = +5 credits (+$0.0725) per call, expert = +18 credits (+$0.261) per call. Use the validate endpoint to preview costs. Requires x-elfa-agent-secret header. Requires x402 payment.

post/x402/v2/auto/queries

Request

  • Base URL: https://api.elfa.ai
  • URL: https://api.elfa.ai/x402/v2/auto/queries
  • Auth: none required

Headers

x-elfa-agent-secretstring required

Any string you choose. Identity is SHA256(secret), so reuse the same value across calls to reach your own queries.

Request body

titlestring

Short human-readable title for the query.

Surfaced back in outbound notifications (Telegram, webhook, notify) so the recipient immediately recognizes what fired — recipients often see an alert hours or days after the query was created. Strongly recommended for agent-built queries.

descriptionstring

1–2 sentence description of the thesis or intent behind the trigger.

Surfaced alongside the title in outbound notifications so the recipient understands why the trigger was set up. Write it as if the recipient has forgotten they set this up — because they often have.

Example request

{
  "title": "BTC breakout alert",
  "description": "Notify when BTC is above 100k so I can review the breakout setup."
}

Response

Ok

queryIdstring required

Unique query identifier

statusstring required

Current query status

Changes

No recorded changes to this operation across all 1 revision of this API.