VirtuousAI
Reference

Chat

List Threads

GET
/api/v1/chat/threads

Query Parameters

limit?integer
Default20
Range1 <= value <= 100
cursor?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/threads"
{
  "items": [
    {
      "activeTurnId": "string",
      "activeTurnLastEventSeq": 0,
      "activeTurnStatus": "pending",
      "agentSpec": {
        "id": "string",
        "isDeleted": true,
        "lifecycleStatus": "active",
        "name": "string"
      },
      "agentSpecId": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "string",
      "isShared": true,
      "lastTurnStatus": "pending",
      "shareRecipients": [
        {
          "email": "string",
          "firstName": "string",
          "id": "string",
          "lastName": "string",
          "profilePictureUrl": "string"
        }
      ],
      "sharedBy": {
        "email": "string",
        "firstName": "string",
        "id": "string",
        "lastName": "string",
        "profilePictureUrl": "string"
      },
      "title": "string",
      "updatedAt": "2019-08-24T14:15:22Z",
      "viewerAccess": "owner",
      "workspaceId": "string"
    }
  ],
  "nextCursor": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Thread

POST
/api/v1/chat/threads

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

agentSpecId*string
title?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads" \  -H "Content-Type: application/json" \  -d '{    "agentSpecId": "string"  }'
{
  "activeTurnId": "string",
  "activeTurnLastEventSeq": 0,
  "activeTurnStatus": "pending",
  "agentSpec": {
    "id": "string",
    "isDeleted": true,
    "lifecycleStatus": "active",
    "name": "string"
  },
  "agentSpecId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "isShared": true,
  "lastTurnStatus": "pending",
  "shareRecipients": [
    {
      "email": "string",
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "profilePictureUrl": "string"
    }
  ],
  "sharedBy": {
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "profilePictureUrl": "string"
  },
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "viewerAccess": "owner",
  "workspaceId": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Bulk Delete Threads

POST
/api/v1/chat/threads/bulk-delete

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

all?boolean
Defaultfalse
threadIds?array<>
Itemsitems <= 100

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads/bulk-delete" \  -H "Content-Type: application/json" \  -d '{}'
{
  "deletedCount": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Thread

GET
/api/v1/chat/threads/{thread_id}

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "activeTurnId": "string",
  "activeTurnLastEventSeq": 0,
  "activeTurnStatus": "pending",
  "agentSpec": {
    "id": "string",
    "isDeleted": true,
    "lifecycleStatus": "active",
    "name": "string"
  },
  "agentSpecId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "isShared": true,
  "lastTurnStatus": "pending",
  "shareRecipients": [
    {
      "email": "string",
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "profilePictureUrl": "string"
    }
  ],
  "sharedBy": {
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "profilePictureUrl": "string"
  },
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "viewerAccess": "owner",
  "workspaceId": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Thread

PATCH
/api/v1/chat/threads/{thread_id}

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

agentSpecId?|
title?|

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "activeTurnId": "string",
  "activeTurnLastEventSeq": 0,
  "activeTurnStatus": "pending",
  "agentSpec": {
    "id": "string",
    "isDeleted": true,
    "lifecycleStatus": "active",
    "name": "string"
  },
  "agentSpecId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "isShared": true,
  "lastTurnStatus": "pending",
  "shareRecipients": [
    {
      "email": "string",
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "profilePictureUrl": "string"
    }
  ],
  "sharedBy": {
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "profilePictureUrl": "string"
  },
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "viewerAccess": "owner",
  "workspaceId": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Thread

DELETE
/api/v1/chat/threads/{thread_id}

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

curl -X DELETE "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Resolve Changeset Decision

POST
/api/v1/chat/threads/{thread_id}/changesets/{changeset_id}/resolve

Path Parameters

thread_id*string
Formatuuid
changeset_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

decision*string
Value in"accept" | "reject"
note?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/changesets/497f6eca-6276-4993-bfeb-53cbbbba6f08/resolve" \  -H "Content-Type: application/json" \  -d '{    "decision": "accept"  }'
{
  "changesetId": "string",
  "decision": "accept",
  "mode": "deferred",
  "turnId": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Messages

GET
/api/v1/chat/threads/{thread_id}/messages

Path Parameters

thread_id*string
Formatuuid

Query Parameters

limit?integer
Default50
Range1 <= value <= 200
cursor?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages"
{
  "items": [
    {
      "cancelled": false,
      "content": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "durationSeconds": 0,
      "error": {
        "code": "string",
        "description": "string",
        "referenceId": "string",
        "retryable": true,
        "title": "string"
      },
      "format": "pydantic_ai",
      "id": "string",
      "rawData": {},
      "role": "user",
      "threadId": "string",
      "turnId": "string",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Thread Share

GET
/api/v1/chat/threads/{thread_id}/share

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/share"
{
  "createdAt": "2019-08-24T14:15:22Z",
  "expiresAt": "2019-08-24T14:15:22Z",
  "recipientUserIds": [
    "string"
  ],
  "recipients": [
    {
      "email": "string",
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "profilePictureUrl": "string"
    }
  ],
  "shareId": "string",
  "state": "not_shared",
  "status": "active",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Revoke Thread Share

DELETE
/api/v1/chat/threads/{thread_id}/share

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

curl -X DELETE "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/share"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Upsert Thread Share

PUT
/api/v1/chat/threads/{thread_id}/share

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

expiresAt?|
recipientUserIds?array<>

Response Body

application/json

application/json

curl -X PUT "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/share" \  -H "Content-Type: application/json" \  -d '{}'
{
  "createdAt": "2019-08-24T14:15:22Z",
  "expiresAt": "2019-08-24T14:15:22Z",
  "recipientUserIds": [
    "string"
  ],
  "recipients": [
    {
      "email": "string",
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "profilePictureUrl": "string"
    }
  ],
  "shareId": "string",
  "state": "not_shared",
  "status": "active",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Clear Thread Share

DELETE
/api/v1/chat/threads/{thread_id}/share/clear

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

curl -X DELETE "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/share/clear"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Cancel Active Turn

POST
/api/v1/chat/threads/{thread_id}/turns/cancel

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

partialText?|

Response Body

application/json

curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/turns/cancel" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Stream Turn

POST
/api/v1/chat/threads/{thread_id}/turns/stream

Path Parameters

thread_id*string
Formatuuid

Header Parameters

X-User-Timezone?|
authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/turns/stream"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Stream Turn Events

GET
/api/v1/chat/turns/{turn_id}/events

Path Parameters

turn_id*string
Formatuuid

Query Parameters

afterSeq?|

Header Parameters

Last-Event-ID?|
authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/turns/497f6eca-6276-4993-bfeb-53cbbbba6f08/events"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}