VirtuousAI
Reference

Communications

List Messages

GET
/api/v1/communications/messages

Query Parameters

direction?|
limit?integer
Default25
Range1 <= value <= 100

Header Parameters

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

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/communications/messages"
{
  "items": [
    {
      "actorUserId": "94141e08-adc7-44ce-bed3-45f031b9f36f",
      "approvalRequestId": "62a09f2a-7fb7-4e24-a2af-6c58e85c4c08",
      "authorType": "human",
      "authorUserId": "ea75109d-c5c5-4407-b0ab-0da27cd41c18",
      "bodySnippet": "string",
      "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
      "chatThreadId": "cc32daea-1d16-4c2c-bc52-fa2ca8b61829",
      "createdAt": "2019-08-24T14:15:22Z",
      "direction": "outbound",
      "dispatchedAt": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "idempotencyKey": "string",
      "latestDispatch": {
        "acceptedAt": "2019-08-24T14:15:22Z",
        "attemptNumber": 0,
        "createdAt": "2019-08-24T14:15:22Z",
        "errorCode": "string",
        "errorMessage": "string",
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "providerMessageId": "string",
        "responsePayload": {},
        "status": "string",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "onBehalfOfUserId": "1d30051c-0b13-448c-8447-1e62c4438eee",
      "processedAt": "2019-08-24T14:15:22Z",
      "profileId": "faebe71b-2bf8-4bdb-9b67-258e4d6aa00a",
      "purpose": "string",
      "queuedAt": "2019-08-24T14:15:22Z",
      "recipients": [
        {
          "address": "string",
          "deliveryStatus": "string",
          "displayName": "string",
          "role": "string"
        }
      ],
      "roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
      "roomRunId": "4a86e5ed-d88f-4064-a313-f4ee545a4eb6",
      "routeId": "fef0741a-9185-417e-be48-b4fe23a36919",
      "runId": "78c33d18-170c-44d3-a227-b3194f134f73",
      "state": "draft",
      "subject": "string",
      "toolCallId": "string",
      "turnId": "7513f73d-27ec-455d-85b7-7bd021b4dccf",
      "updatedAt": "2019-08-24T14:15:22Z",
      "workflowKey": "string",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Send Email

POST
/api/v1/communications/messages/send

Header Parameters

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

Request Body

application/json

approvalRequestId?|
authorType?string
Default"human"
Value in"human" | "agent" | "system" | "provider"
authorUserId?|
bcc?array<>
bodyHtml?|
bodyText*string
Length1 <= length
cc?array<>
chatThreadId?|
idempotencyKey*string
Length1 <= length <= 255
onBehalfOfUserId?|
profileId?|
purpose*string
Length1 <= length <= 128
replyTo?|
runId?|
subject*string
Length1 <= length
templateKey?|
templatePayload?
templateVersion?|
to*array<>
Items1 <= items
toolCallId?|
turnId?|
workflowKey?|
workspaceId?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/communications/messages/send" \  -H "Content-Type: application/json" \  -d '{    "bodyText": "string",    "idempotencyKey": "string",    "purpose": "string",    "subject": "string",    "to": [      {        "address": "user@example.com"      }    ]  }'
{
  "actorUserId": "94141e08-adc7-44ce-bed3-45f031b9f36f",
  "approvalRequestId": "62a09f2a-7fb7-4e24-a2af-6c58e85c4c08",
  "authorType": "human",
  "authorUserId": "ea75109d-c5c5-4407-b0ab-0da27cd41c18",
  "bodySnippet": "string",
  "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
  "chatThreadId": "cc32daea-1d16-4c2c-bc52-fa2ca8b61829",
  "createdAt": "2019-08-24T14:15:22Z",
  "direction": "outbound",
  "dispatchedAt": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "idempotencyKey": "string",
  "onBehalfOfUserId": "1d30051c-0b13-448c-8447-1e62c4438eee",
  "processedAt": "2019-08-24T14:15:22Z",
  "profileId": "faebe71b-2bf8-4bdb-9b67-258e4d6aa00a",
  "purpose": "string",
  "queuedAt": "2019-08-24T14:15:22Z",
  "roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
  "roomRunId": "4a86e5ed-d88f-4064-a313-f4ee545a4eb6",
  "routeId": "fef0741a-9185-417e-be48-b4fe23a36919",
  "runId": "78c33d18-170c-44d3-a227-b3194f134f73",
  "state": "draft",
  "subject": "string",
  "toolCallId": "string",
  "turnId": "7513f73d-27ec-455d-85b7-7bd021b4dccf",
  "updatedAt": "2019-08-24T14:15:22Z",
  "workflowKey": "string",
  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Profiles

GET
/api/v1/communications/profiles

Query Parameters

limit?integer
Default50
Range1 <= value <= 100

Header Parameters

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

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/communications/profiles"
{
  "items": [
    {
      "address": "string",
      "authorizedAt": "2019-08-24T14:15:22Z",
      "authorizedBy": "dde19a8c-029a-482f-ac49-c7a319b34b12",
      "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
      "createdAt": "2019-08-24T14:15:22Z",
      "displayName": "string",
      "endpointId": "c8d2c7e1-e4b1-4108-9e29-3429a36a1ef3",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "isDefault": true,
      "kind": "platform",
      "ownerUserId": "283eeac5-beea-465a-80a5-763009480d0f",
      "policy": {},
      "replyToAddress": "string",
      "scope": "tenant",
      "status": "pending_verification",
      "updatedAt": "2019-08-24T14:15:22Z",
      "workflowKey": "string",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Profile

POST
/api/v1/communications/profiles

Header Parameters

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

Request Body

application/json

address*string
Formatemail
displayName*string
kind?string
Default"user"
Value in"platform" | "user" | "team" | "workflow"
policy?
replyToAddress?|
scope?string
Default"tenant"
Value in"tenant" | "workspace" | "workflow" | "user"
workflowKey?|
workspaceId?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/communications/profiles" \  -H "Content-Type: application/json" \  -d '{    "address": "user@example.com",    "displayName": "string"  }'
{
  "address": "string",
  "authorizedAt": "2019-08-24T14:15:22Z",
  "authorizedBy": "dde19a8c-029a-482f-ac49-c7a319b34b12",
  "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
  "createdAt": "2019-08-24T14:15:22Z",
  "displayName": "string",
  "endpointId": "c8d2c7e1-e4b1-4108-9e29-3429a36a1ef3",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "isDefault": true,
  "kind": "platform",
  "ownerUserId": "283eeac5-beea-465a-80a5-763009480d0f",
  "policy": {},
  "replyToAddress": "string",
  "scope": "tenant",
  "status": "pending_verification",
  "updatedAt": "2019-08-24T14:15:22Z",
  "workflowKey": "string",
  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Profile Grant

POST
/api/v1/communications/profiles/{profile_id}/grants

Path Parameters

profile_id*string
Formatuuid

Header Parameters

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

Request Body

application/json

constraints?
principalKind*string
Value in"user" | "tenant" | "workflow" | "system"
principalUserId?|
workflowKey?|

Response Body

application/json

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

Refresh Profile Verification

POST
/api/v1/communications/profiles/{profile_id}/refresh-verification

Path Parameters

profile_id*string
Formatuuid

Header Parameters

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

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/communications/profiles/497f6eca-6276-4993-bfeb-53cbbbba6f08/refresh-verification"
{
  "address": "string",
  "authorizedAt": "2019-08-24T14:15:22Z",
  "authorizedBy": "dde19a8c-029a-482f-ac49-c7a319b34b12",
  "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
  "createdAt": "2019-08-24T14:15:22Z",
  "displayName": "string",
  "endpointId": "c8d2c7e1-e4b1-4108-9e29-3429a36a1ef3",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "isDefault": true,
  "kind": "platform",
  "ownerUserId": "283eeac5-beea-465a-80a5-763009480d0f",
  "policy": {},
  "replyToAddress": "string",
  "scope": "tenant",
  "status": "pending_verification",
  "updatedAt": "2019-08-24T14:15:22Z",
  "workflowKey": "string",
  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Resend Profile Confirmation

POST
/api/v1/communications/profiles/{profile_id}/resend-confirmation

Path Parameters

profile_id*string
Formatuuid

Header Parameters

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

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/communications/profiles/497f6eca-6276-4993-bfeb-53cbbbba6f08/resend-confirmation"
{
  "address": "string",
  "authorizedAt": "2019-08-24T14:15:22Z",
  "authorizedBy": "dde19a8c-029a-482f-ac49-c7a319b34b12",
  "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
  "createdAt": "2019-08-24T14:15:22Z",
  "displayName": "string",
  "endpointId": "c8d2c7e1-e4b1-4108-9e29-3429a36a1ef3",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "isDefault": true,
  "kind": "platform",
  "ownerUserId": "283eeac5-beea-465a-80a5-763009480d0f",
  "policy": {},
  "replyToAddress": "string",
  "scope": "tenant",
  "status": "pending_verification",
  "updatedAt": "2019-08-24T14:15:22Z",
  "workflowKey": "string",
  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Routes

GET
/api/v1/communications/routes

Query Parameters

limit?integer
Default50
Range1 <= value <= 100

Header Parameters

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

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/communications/routes"
{
  "items": [
    {
      "address": "string",
      "allowedSenderPolicy": {},
      "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
      "config": {},
      "createdAt": "2019-08-24T14:15:22Z",
      "endpointId": "c8d2c7e1-e4b1-4108-9e29-3429a36a1ef3",
      "handlerKind": "process",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "status": "active",
      "targetId": "cbca1126-180e-4334-9df8-cf82289d378b",
      "targetKind": "string",
      "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
      "updatedAt": "2019-08-24T14:15:22Z",
      "workflowKey": "string",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Route

POST
/api/v1/communications/routes

Header Parameters

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

Request Body

application/json

allowedSenderPolicy?
config?
handlerKind?string
Default"process"
Value in"process" | "document_ingest" | "chat_reply" | "workspace_intake" | "workflow_trigger"
targetId?|
targetKind?|
threadId?|
workflowKey?|
workspaceId?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/communications/routes" \  -H "Content-Type: application/json" \  -d '{}'
{
  "address": "string",
  "allowedSenderPolicy": {},
  "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160",
  "config": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "endpointId": "c8d2c7e1-e4b1-4108-9e29-3429a36a1ef3",
  "handlerKind": "process",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "status": "active",
  "targetId": "cbca1126-180e-4334-9df8-cf82289d378b",
  "targetKind": "string",
  "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
  "updatedAt": "2019-08-24T14:15:22Z",
  "workflowKey": "string",
  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}