this endpoint allows you to set the category of a document belonging to a system user.
POST
See How to create API Clients to see how to obtain API Client IDs and secrets
Request
The following raw content needs to be sent in the request:
Body
Data requirements (mandatory data all items)

"FileDTO" requirements (Json camelcase)
TenantSubDomain string Tenant Sub Domain value UserAccountId int Account ID of the user who owns the document in question FileId int ID of the target file FileCategoryId
int ID number of the category to reallocate the file into
See the above PostMan screenshot for example demonstration, for UserAccountId = 6 and a Tenant as declared in Postman environment variables. This example will move FileId 123 from its current Category to the Category with ID 456.
"FileDTO" requirements (Json camelcase)
TenantSubDomain | string | Tenant Sub Domain value |
UserAccountId | int | Account ID of the user who owns the document in question |
FileId | int | ID of the target file |
FileCategoryId | int | ID number of the category to reallocate the file into |
See the above PostMan screenshot for example demonstration, for UserAccountId = 6 and a Tenant as declared in Postman environment variables. This example will move FileId 123 from its current Category to the Category with ID 456.
Authorization
The following authorization header is required. The authorisation header should be set to a 'Bearer Token' type
Token |
Response
Return | |
Status code | Description |
403 | Incorrect access for the request |
400 | Invalid request or unexpected error (detail will be in the response) |
200 | Document updated successfully with new category |
Permissions
The API Client requires at least write permissions to Tenant users document library to successfully submit new files (See Admin User Roles for more details). Only tenants that the API client has access to will be returned.
var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://{platform API url}/api/library/document/update");
var content = new StringContent(" {\r\n\"fileId\": \"{fileId}\", \r\n\"fileCategoryId\": \"{fileCategoryId}\",\r\n\"tenantSubDomain\": \"{tenantSubDomain}\",\r\n\"userAccountId\":\"{userAccountId}\"}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
cURL Example
curl --location 'https://{platform API url}/api/library/document/update' \ --header 'Content-Type: application/json' \--header 'Authorization: ••••••' \--data '{"fileId": {fileCategoryId}, "fileCategoryId": {fileCategoryId}, "tenantSubDomain": "{tenantSubDomain}", "userAccountId": {userAccountId}}