Skip to content

Upload a file and link it to a context record or the current user

Request

Uploads a base64-encoded file and links it to the record given by contextId, or to the current user if contextId is omitted, returning a ContentDocument Id the caller can reference in later requests (e.g. via fetch_file_content). mimeType is required and determines the file's type — the extension on fileName is not used for this.

Security
bearerAuth
curl -i -X POST \
  https://sx-developer.kantata.com/services/apexrest/KSX/api/agent-files \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success

Bodyapplication/json
object(Response__api_activity-assignments__activityAssignmentId__baseline_get)
Response
{}