Skip to main content

Update Session Attachment (v1)

Method + Path

PATCH /v1/workspace/:workspaceId/sessions/:sessionId/attachments/:attachmentId

Actual backend path: /v1/workspace/:workspaceId/sessions/:sessionId/attachments/:attachmentId

Description

Update metadata for a session attachment.

Authentication

Required - JWT token in Authorization header

Required Permissions:

  • sessions.update

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
sessionIdstringYesSession identifier
attachmentIdstringYesAttachment identifier

Request Body

{
"fileName": "updated-document.pdf"
}

Body Parameters

ParameterTypeRequiredDescription
fileNamestringNoUpdated file name

Response (200)

{
"attachment": {
"id": "507f1f77bcf86cd799439013",
"fileName": "updated-document.pdf",
"updatedAt": "2024-01-15T11:00:00Z"
}
}

Common Errors

  • 400 Bad Request: Invalid request body
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions (requires sessions.update)
  • 404 Not Found: Attachment, session, or workspace not found
  • 500 Internal Server Error: Server error