Docs
API reference

Chat

Download spec

Send a chat message

POST
/runs

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from Settings → Developers → API keys.

Header Parameters

Idempotency-Key*string

Reuse the same key and body when retrying; the retry returns the first result with replayed: true. Keys are kept for 24 hours.

Length1 <= length <= 128

Request Body

application/json
  1. body
message*string

What you ask Italic.

Length1 <= length <= 4000
history?array<>

Earlier turns of this conversation, oldest first, so Italic can follow up. Italic keeps no conversation for API calls.

Itemsitems <= 31
timeZone?string

IANA time zone for dates in the reply and drafts, such as America/New_York. Defaults to the account's.

Length1 <= length <= 64

Response Body

Success. Writes without read permission return an ID and revision only.

application/json
  1. response
run*
replayed?boolean
Example Request
curl -X POST 'https://app.italic.com/api/v2/runs' \
  -H 'Idempotency-Key: string' \
  -H 'Content-Type: application/json' \
  -d '{
  "message": "string"
}'
Example Response
{
  "run": {
    "id": "string",
    "source": "chat",
    "recordingId": "string",
    "status": "running",
    "reply": "string",
    "error": "string",
    "prompt": "string",
    "workflows": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "actions": [
      {
        "id": "string",
        "tool": "string",
        "status": "proposed",
        "executor": "cloud",
        "args": {},
        "result": {},
        "link": "string",
        "workflowId": "string"
      }
    ],
    "questions": [
      {
        "id": "string",
        "prompt": "string",
        "about": "string",
        "kind": "recipient",
        "choices": [
          {
            "label": "string",
            "detail": "string"
          }
        ]
      }
    ],
    "createdAt": 0,
    "updatedAt": 0
  },
  "replayed": true
}

Get a run

GET
/runs/{id}

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from Settings → Developers → API keys.

Path Parameters

id*string
Match^[A-Za-z0-9][A-Za-z0-9._:-]*$
Length1 <= length <= 256

Response Body

Success. Writes without read permission return an ID and revision only.

application/json
  1. response
run*
replayed?boolean
Example Request
curl -X GET 'https://app.italic.com/api/v2/runs/string'
Example Response
{
  "run": {
    "id": "string",
    "source": "chat",
    "recordingId": "string",
    "status": "running",
    "reply": "string",
    "error": "string",
    "prompt": "string",
    "workflows": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "actions": [
      {
        "id": "string",
        "tool": "string",
        "status": "proposed",
        "executor": "cloud",
        "args": {},
        "result": {},
        "link": "string",
        "workflowId": "string"
      }
    ],
    "questions": [
      {
        "id": "string",
        "prompt": "string",
        "about": "string",
        "kind": "recipient",
        "choices": [
          {
            "label": "string",
            "detail": "string"
          }
        ]
      }
    ],
    "createdAt": 0,
    "updatedAt": 0
  },
  "replayed": true
}

Stop a run

POST
/runs/{id}/cancel

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from Settings → Developers → API keys.

Path Parameters

id*string
Match^[A-Za-z0-9][A-Za-z0-9._:-]*$
Length1 <= length <= 256

Response Body

Success. Writes without read permission return an ID and revision only.

application/json
  1. response
run*
replayed?boolean
Example Request
curl -X POST 'https://app.italic.com/api/v2/runs/string/cancel'
Example Response
{
  "run": {
    "id": "string",
    "source": "chat",
    "recordingId": "string",
    "status": "running",
    "reply": "string",
    "error": "string",
    "prompt": "string",
    "workflows": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "actions": [
      {
        "id": "string",
        "tool": "string",
        "status": "proposed",
        "executor": "cloud",
        "args": {},
        "result": {},
        "link": "string",
        "workflowId": "string"
      }
    ],
    "questions": [
      {
        "id": "string",
        "prompt": "string",
        "about": "string",
        "kind": "recipient",
        "choices": [
          {
            "label": "string",
            "detail": "string"
          }
        ]
      }
    ],
    "createdAt": 0,
    "updatedAt": 0
  },
  "replayed": true
}