POST Execute Task

Run a pre-built Holocron action

POSThttps://api.anakin.io/v1/holocron/task

Submit a task to execute a Holocron action. Credits are deducted immediately at submission and refunded automatically if the job fails. Poll for results using GET /v1/holocron/jobs/{id}.


Request Body

{
  "action_id": "li_profile_scrape",
  "params": {
    "profile_url": "https://www.linkedin.com/in/example"
  }
}
ParameterTypeDescription
action_id requiredstringThe action to run. Find action IDs in the Holocron dashboard
paramsobjectAction-specific input parameters

Response

202 Accepted
{
  "status": "processing",
  "job_id": "7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
  "poll_url": "/v1/holocron/jobs/7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
}
FieldTypeDescription
job_idstringUse this to poll for results
poll_urlstringConvenience path for the polling endpoint

Use the job_id with GET /v1/holocron/jobs/{id} to retrieve your results.


Error Responses

Insufficient credits402 Payment Required

{
  "status": "error",
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "You need 5 credits. Current balance: 2",
    "balance": 2,
    "required": 5
  }
}

Authentication required401 Unauthorized

Returned when the action requires you to connect your account for the target website. Visit the connect_url to authenticate.

{
  "status": "error",
  "error": {
    "code": "AUTH_REQUIRED",
    "message": "This action requires a LinkedIn connection.",
    "connect_url": "/products/holocron/linkedin/connect"
  }
}

Code Examples

curl -X POST https://api.anakin.io/v1/holocron/task \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "action_id": "li_profile_scrape",
    "params": {
      "profile_url": "https://www.linkedin.com/in/example"
    }
  }'