---
title: "Run a Wire Action"
method: POST
path: "/wire/task"
tags: ["Wire"]
---

# Run a Wire Action

`POST /wire/task`

## Request

- Base URL: `https://api.anakin.io/v1`
- URL: `https://api.anakin.io/v1/wire/task`
- Auth: API key in header `X-API-Key`

Run a Wire action by its action_id — either a READ action that extracts data (search listings, fetch a product's price/specs/reviews, read a profile) or a WRITE action that performs a state-changing interaction (submit a form, add to cart). The action's type, reported by Discover Wire Actions and Get a Wire Catalog, determines which kind it is. params must match that action's parameter schema; omit for actions that take none. Some actions complete synchronously and return their data inline in this same response; others return {status, job_id} — poll GET /wire/jobs/{jobId} for those. Does not execute payments or transfer funds; such actions are refused.

## Request body

- WireTaskRequest
  - `action_id` string, required: The action to run (from Discover Wire Actions or Get a Wire Catalog).
  - `params` object: The action's input parameters. Shape depends on the action — use its parameter schema from discovery. Omit for actions that take none.
  - `credential_id` string: Required when the action's auth_mode is "required"; honored when "optional"; ignored when "none". Get one from List Wire Identities or Sign In to a Wire Site.
  - `identity_id` string: Optional identity selector — the server resolves a credential from it (alternative to credential_id).

## Response `200`

The action's data inline (synchronous actions), or a job handle to poll (asynchronous actions)

- WireTaskResponse: Either the action's data inline (synchronous actions) or a job handle to poll (asynchronous actions).
  - `status` string: Present on both sync and async responses.
  - `job_id` string: Present when the action runs asynchronously — poll GET /wire/jobs/{jobId}. Absent when the action completed synchronously, in which case its result data is returned inline in this same object.
  - `poll_url` string: Present alongside job_id — convenience polling URL.

## Other responses

- `400`: Bad request — missing or malformed body, or unknown action_id
- `401`: Missing or invalid API key

---

[API](https://skmtc.dev/anakin/apis/anakin-api.md) · [All operations](https://skmtc.dev/anakin/apis/anakin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anakin/apis/anakin-api/revisions/5eda91e679e5?raw)
