Skip to main content
POST
/
v2
/
runs
Start or resume a run
curl --request POST \
  --url https://api.erna.ai/v2/runs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "task": "schedule",
  "config": {
    "instructions": [
      "<string>"
    ],
    "dateRange": {
      "start": "2023-12-25",
      "end": "2023-12-25"
    },
    "roles": [
      {
        "id": "<string>",
        "name": "<string>"
      }
    ],
    "pipelineId": "<string>",
    "workspaceId": "<string>",
    "members": [
      {
        "id": "<string>",
        "name": "<string>",
        "roleIds": [
          "<string>"
        ],
        "skillIds": [
          "<string>"
        ]
      }
    ]
  },
  "runId": "<string>",
  "goal": "<string>",
  "inputs": []
}
'
{
  "status": "auth_required",
  "runId": "<string>",
  "provider": "<string>",
  "authRequest": {
    "scopes": [
      "<string>"
    ],
    "reason": "<string>"
  }
}

Authorizations

Authorization
string
header
required

OAuth2 access token or API key

Body

application/json
task
enum<string>
required
Available options:
schedule
config
object
required
runId
string
Minimum string length: 1
goal
string
Minimum string length: 1
inputs
object[]

Response

Run handled immediately

status
enum<string>
required
Available options:
auth_required
runId
string
required
provider
string
required
authRequest
object
required