Passer au contenu principal
POST
/
agent-sessions
/
{session_id}
/
documents
Lier des documents
import requests

url = "https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/documents"

payload = { "document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
    "X-API-KEY": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};

fetch('https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request POST \
--url https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/documents \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"document_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Autorisations

X-API-KEY
string
header
requis

En-têtes

X-End-User-ID
string | null

Paramètres de chemin

session_id
string<uuid>
requis

Corps

application/json
document_ids
string<uuid>[]
requis

List of document IDs to link to the session.

Réponse

Successful Response