Skip to main content
POST
/
agent
/
{id}
/
documents
Link documents to an agent
curl --request POST \
  --url https://api.vocobase.com/api/v2/agent/{id}/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "document_ids": [
    "d1234567-abcd-1234-abcd-123456789012",
    "d2345678-abcd-1234-abcd-123456789012"
  ]
}
'
{
  "success": true,
  "data": {
    "linked": [
      {
        "document_id": "d1234567-abcd-1234-abcd-123456789012",
        "sync_status": "pending"
      }
    ],
    "skipped": [
      "d2345678-abcd-1234-abcd-123456789012"
    ]
  }
}

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Agent ID.

Body

application/json
document_ids
string<uuid>[]
required

Array of document IDs to link.

Required array length: 1 - 20 elements

Response

Documents linked (or skipped if already linked).

success
boolean
data
object