POST Execute Task
Run a pre-built Wire action
https://api.anakin.io/v1/holocron/taskSubmit a task to execute a Wire 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",
"credential_id": "11111111-2222-3333-4444-555555555555",
"params": {
"profile_url": "https://www.linkedin.com/in/example"
}
}| Parameter | Type | Description |
|---|---|---|
action_id required | string | The action to run. Find action IDs in the Wire dashboard |
credential_id | string (UUID) | Required when the action has auth_mode: "required"; optional when auth_mode: "optional" (supply to run authenticated, omit to run anonymously). Get IDs from GET /v1/holocron/identities |
params | object | Action-specific input parameters |
auth_modesemantics:
required—credential_idis mandatory; otherwise the request returns401 AUTH_REQUIRED.optional—credential_idis honored if provided (authenticated branch). Omit it to run anonymously.none—credential_idis ignored if provided.List your credentials with GET /v1/holocron/identities, or manage them in the Identities dashboard.
Response
202 Accepted{
"status": "processing",
"job_id": "7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"poll_url": "/v1/holocron/jobs/7c3f1a2b-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
}| Field | Type | Description |
|---|---|---|
job_id | string | Use this to poll for results |
poll_url | string | Convenience path for the polling endpoint |
Use the job_id with GET /v1/holocron/jobs/{id} to retrieve your results.
Error Responses
Insufficient credits — 402 Payment Required
{
"status": "error",
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "You need 5 credits. Current balance: 2",
"balance": 2,
"required": 5
}
}Authentication required — 401 Unauthorized
Returned when the action requires you to connect your account for the target website and you have no credential for it. 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"
}
}Credential expired — 401 Unauthorized
Returned when the credential_id you passed exists but its session is no longer valid (cookies expired, token revoked, password changed, etc.). The user needs to reconnect. List your credentials with GET /v1/holocron/identities — status will show expired.
{
"status": "error",
"error": {
"code": "AUTH_EXPIRED",
"message": "Credential is no longer active. Please reconnect."
}
}Forbidden — 403 Forbidden
Returned when the credential_id you passed exists but doesn't belong to you, or belongs to a different catalog than the action you're calling. Common cause: copy/pasting a credential_id between accounts, or accidentally passing an Amazon credential to a LinkedIn action.
{
"status": "error",
"error": {
"code": "FORBIDDEN",
"message": "Credential does not belong to this user or catalog"
}
}Submission failed — 500 Internal Server Error
Transient server-side failure when enqueueing the task. Credits are not deducted. Retry the request; if it persists, contact support with the request timestamp.
{
"status": "error",
"error": {
"code": "EXECUTION_FAILED",
"message": "Failed to submit task. Please try again."
}
}Note:
EXECUTION_FAILEDcan also appear as a final status on a successfully submitted job (see GET /v1/holocron/jobs/{id}). Same code, different meaning — at submission it means the engine couldn't enqueue; at job completion it means the scraper raised an unrecoverable error.
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",
"credential_id": "11111111-2222-3333-4444-555555555555",
"params": {
"profile_url": "https://www.linkedin.com/in/example"
}
}'import requests
response = requests.post(
'https://api.anakin.io/v1/holocron/task',
headers={'X-API-Key': 'your_api_key'},
json={
'action_id': 'li_profile_scrape',
'credential_id': '11111111-2222-3333-4444-555555555555',
'params': {
'profile_url': 'https://www.linkedin.com/in/example'
}
}
)
data = response.json()
print(f"Job submitted: {data['job_id']}")const response = await fetch('https://api.anakin.io/v1/holocron/task', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action_id: 'li_profile_scrape',
credential_id: '11111111-2222-3333-4444-555555555555',
params: {
profile_url: 'https://www.linkedin.com/in/example'
}
})
});
const { job_id } = await response.json();
console.log('Job submitted:', job_id);
credential_idis mandatory for actions withauth_mode: "required"(e.g.li_profile_scrape). It is honored when supplied forauth_mode: "optional"actions and ignored forauth_mode: "none". Get yours from GET /v1/holocron/identities.