Pinter
ENID
Documents
Lihat sebagai Markdown

Update Knowledge Hub Document Share Settings

PATCH/api/knowledge/documents/hub-documents/{document_id}/share

Overview

Updates collaborative sharing policy, permission levels, expiration, and user/group grantees. Returns warning if agent attachments are revoked.

Authentication & Headers

  • Auth: Bearer Token (Owner or Admin L1; rejected for Auditor)
  • Required Header: API-Version: 1

Parameter

Path

document_idstringwajib
Unique UUID of the knowledge document stored in the vector database.

Body permintaan

application/json

{}

Respons

200 Updated document share configuration and affected agents

400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

401 Unauthorized - Missing, invalid, or expired JWT Bearer token.

403 Forbidden (Auditor read-only or not owner/admin)

404 Not Found - The requested resource ID was not found.

422 Invalid expiration option or invalid recipient IDs

detailobject[]
detail[].locstring | integer[]wajib
detail[].msgstringwajib
detail[].typestringwajib
detail[].inputobject
detail[].ctxobject
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Contoh

curl -X PATCH "$PINTER_URL/api/knowledge/documents/hub-documents/doc_it_guidelines_2026/share" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'