Assets
Endpoints for managing digital assets (files, images, documents) including upload, search, and metadata management.
Base URL: https://api.contit.cloud
/assets
Search assets
Search and filter digital assets with pagination, text search, date filtering, and type filtering.
ReadAccess policy
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
page |
integer | — | Page number (1-based) |
pageSize |
integer | — | Number of items per page |
search |
string | — | Free-text search across title and description |
since |
datetime | — | Only return assets updated after this timestamp |
filterByIds |
string[] | — | Restrict results to specific asset IDs |
contentTypes |
string[] | — | Filter by MIME content types (e.g. 'image/png') |
assetTypes |
string[] | — | Filter by asset type classifications (e.g. 'Image', 'Document') |
Responses
items |
AssetModel[] | Array of asset items |
total |
integer | Total matching assets |
page |
integer | Current page |
pageSize |
integer | Items per page |
Code examples
curl -X POST "https://api.contit.cloud/assets" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"pageSize": 1,
"search": "search_value",
"since": "since_value",
"filterByIds": [],
"contentTypes": [],
"assetTypes": []
}'
var client = new ContitClient(
new ClientContitConfiguration(clientId, clientSecret));
var result = await client.Asset.GetAssets(new AssetsRequest
{
Page = 1, PageSize = 20
});
const response = await fetch(
"https://api.contit.cloud/assets",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"page": 1,
"pageSize": 1,
"search": "search_value",
"since": "since_value",
"filterByIds": [],
"contentTypes": [],
"assetTypes": []
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"page": 1,
"pageSize": 1,
"search": "search_value",
"since": "since_value",
"filterByIds": [],
"contentTypes": [],
"assetTypes": []
}
response = requests.post(
"https://api.contit.cloud/assets",
json=payload,
headers=headers
)
data = response.json()
{
"page": 1,
"pageSize": 20,
"search": "logo",
"since": null,
"filterByIds": [],
"contentTypes": ["image/png", "image/jpeg"],
"assetTypes": ["Image"]
}
{
"items": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"title": "Company Logo",
"description": "Main company logo in PNG format",
"fileInfo": {
"contentType": "image/png",
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"fileSize": 245760,
"fileName": "company-logo.png"
},
"assetType": "Image",
"lastUpdate": "2026-03-10T08:30:00Z"
},
{
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"title": "Logo Dark Mode",
"description": "Dark mode variant of company logo",
"fileInfo": {
"contentType": "image/png",
"hash": "e99a18c428cb38d5f260853678922e03",
"fileSize": 198400,
"fileName": "logo-dark.png"
},
"assetType": "Image",
"lastUpdate": "2026-03-12T14:15:00Z"
}
],
"total": 2,
"page": 1,
"pageSize": 20
}
/assets/{id}
Get single asset
Retrieve a single asset by its ID, including metadata and file information.
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | ✓ | The asset ID (GUID) |
Responses
id |
string | Asset ID |
title |
string | Asset title |
description |
string | Asset description |
fileInfo |
object | File metadata |
assetType |
string | Asset type classification |
lastUpdate |
datetime | Last update timestamp |
Code examples
curl -X GET "https://api.contit.cloud/assets/{id}" \
-H "X-Api-Key: YOUR_API_KEY"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var response = await http.GetAsync("https://api.contit.cloud/assets/{id}");
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/assets/{id}",
{
method: "GET",
headers: {
"X-Api-Key": "YOUR_API_KEY",
}
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
response = requests.get(
"https://api.contit.cloud/assets/{id}",
headers=headers
)
data = response.json()
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"title": "Company Logo",
"description": "Main company logo in PNG format",
"fileInfo": {
"contentType": "image/png",
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"fileSize": 245760,
"fileName": "company-logo.png"
},
"assetType": "Image",
"lastUpdate": "2026-03-10T08:30:00Z"
}
/assets/getByHash
Find asset by MD5 hash
Look up an existing asset by its MD5 hash and file size. Useful to detect duplicates before uploading.
ReadAccess policy
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
hash |
string | ✓ | MD5 hash of the file content |
size |
long | ✓ | File size in bytes |
Responses
id |
string | Asset ID |
title |
string | Asset title |
fileInfo |
object | File metadata |
Code examples
curl -X POST "https://api.contit.cloud/assets/getByHash" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"hash": "hash_value",
"size": "size_value"
}'
var client = new ContitClient(
new ClientContitConfiguration(clientId, clientSecret));
var result = await client.Asset.GetAssets(new AssetsRequest
{
Page = 1, PageSize = 20
});
const response = await fetch(
"https://api.contit.cloud/assets/getByHash",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"hash": "hash_value",
"size": "size_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"hash": "hash_value",
"size": "size_value"
}
response = requests.post(
"https://api.contit.cloud/assets/getByHash",
json=payload,
headers=headers
)
data = response.json()
{
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"size": 245760
}
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"title": "Company Logo",
"description": "Main company logo in PNG format",
"fileInfo": {
"contentType": "image/png",
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"fileSize": 245760,
"fileName": "company-logo.png"
},
"assetType": "Image",
"lastUpdate": "2026-03-10T08:30:00Z"
}
/assets/{id}
Update asset metadata
Update the title and description of an existing asset without replacing the file.
WriteAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | ✓ | The asset ID (GUID) |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
title |
string | — | New title for the asset |
description |
string | — | New description for the asset |
Responses
Code examples
curl -X PUT "https://api.contit.cloud/assets/{id}" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "title_value",
"description": "description_value"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"title\": \"title_value\",
\"description\": \"description_value\"
}",
Encoding.UTF8, "application/json");
var response = await http.PutAsync(
"https://api.contit.cloud/assets/{id}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/assets/{id}",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"title": "title_value",
"description": "description_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"title": "title_value",
"description": "description_value"
}
response = requests.put(
"https://api.contit.cloud/assets/{id}",
json=payload,
headers=headers
)
data = response.json()
{
"title": "Updated Company Logo",
"description": "Refreshed brand logo — April 2026"
}
{
"success": true
}
/assets/uploadAsset
Upload asset
Uploads a file to the platform using a chunked protocol. The same endpoint handles both the first chunk and all subsequent chunks. For the first chunk (ChunkIndex = 0) the asset record is created and the endpoint returns 202 Accepted with the asset object. For subsequent chunks it returns 200 OK with the asset ID. When the last chunk is received the file is fully assembled server-side.
WriteAccess policy
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
assetId |
string | ✓ | Unique asset ID (GUID) — must be the same for all chunks of the same file |
fileUploadId |
string | ✓ | Unique upload session ID (GUID) — must be the same for all chunks of the same file |
originalFileName |
string | ✓ | Original file name (e.g. photo.jpg) |
chunkIndex |
integer | ✓ | Zero-based index of the current chunk (0 for the first chunk) |
chunkSize |
integer | ✓ | Size of this chunk in bytes |
totalChunkCount |
integer | ✓ | Total number of chunks required to complete the upload |
chunkByteOffset |
long | ✓ | Byte offset of this chunk within the full file |
totalFileSize |
long | ✓ | Total file size in bytes |
stream |
byte[] | ✓ | Binary data of the chunk (base64-encoded in JSON) |
title |
string | — | Asset title (used only on the first chunk, ChunkIndex = 0) |
description |
string | — | Asset description (used only on the first chunk, ChunkIndex = 0) |
contentMD5 |
string | — | MD5 hash of the full file for integrity verification |
ignoreCheckDuplicates |
boolean | — | If true, skips the duplicate detection check |
clientInfo |
string | — | Arbitrary client metadata stored with the asset |
Responses
id |
string | Asset ID |
title |
string | Asset title |
fileInfo |
object | File metadata |
assetType |
string | Detected asset type |
Code examples
curl -X POST "https://api.contit.cloud/assets/uploadAsset" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assetId": "assetId_value",
"fileUploadId": "fileUploadId_value",
"originalFileName": "originalFileName_value",
"chunkIndex": 1,
"chunkSize": 1,
"totalChunkCount": 1,
"chunkByteOffset": "chunkByteOffset_value",
"totalFileSize": "totalFileSize_value",
"stream": [],
"title": "title_value",
"description": "description_value",
"contentMD5": "contentMD5_value",
"ignoreCheckDuplicates": true,
"clientInfo": "clientInfo_value"
}'
var client = new ContitClient(
new ClientContitConfiguration(clientId, clientSecret));
await client.Asset.UploadAsset(new UploadAssetRequest
{
InputFile = stream,
FileName = "file.pdf",
CheckMd5BeforeSend = true
});
const response = await fetch(
"https://api.contit.cloud/assets/uploadAsset",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"assetId": "assetId_value",
"fileUploadId": "fileUploadId_value",
"originalFileName": "originalFileName_value",
"chunkIndex": 1,
"chunkSize": 1,
"totalChunkCount": 1,
"chunkByteOffset": "chunkByteOffset_value",
"totalFileSize": "totalFileSize_value",
"stream": [],
"title": "title_value",
"description": "description_value",
"contentMD5": "contentMD5_value",
"ignoreCheckDuplicates": true,
"clientInfo": "clientInfo_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"assetId": "assetId_value",
"fileUploadId": "fileUploadId_value",
"originalFileName": "originalFileName_value",
"chunkIndex": 1,
"chunkSize": 1,
"totalChunkCount": 1,
"chunkByteOffset": "chunkByteOffset_value",
"totalFileSize": "totalFileSize_value",
"stream": [],
"title": "title_value",
"description": "description_value",
"contentMD5": "contentMD5_value",
"ignoreCheckDuplicates": true,
"clientInfo": "clientInfo_value"
}
response = requests.post(
"https://api.contit.cloud/assets/uploadAsset",
json=payload,
headers=headers
)
data = response.json()
{
"assetId": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"fileUploadId": "f6a7b8c9-d0e1-2345-fghi-678901234567",
"originalFileName": "photo.jpg",
"chunkIndex": 0,
"chunkSize": 2097152,
"totalChunkCount": 1,
"chunkByteOffset": 0,
"totalFileSize": 1536000,
"stream": "(base64-encoded binary data)",
"title": "Beach Photo",
"description": "Sunset at the beach",
"contentMD5": "a3f5b7d9e1c3456789012345abcdef01",
"ignoreCheckDuplicates": false
}
{
"id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"title": "Beach Photo",
"description": "Sunset at the beach",
"fileInfo": {
"contentType": "image/jpeg",
"hash": "a3f5b7d9e1c3456789012345abcdef01",
"fileSize": 1536000,
"fileName": "photo.jpg"
},
"assetType": "Image",
"lastUpdate": "2026-03-20T16:45:00Z"
}
/assets/{id}
Delete asset
Permanently delete an asset and its associated file.
WriteAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | ✓ | The asset ID (GUID) |
Responses
Code examples
curl -X DELETE "https://api.contit.cloud/assets/{id}" \
-H "X-Api-Key: YOUR_API_KEY"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{}",
Encoding.UTF8, "application/json");
var response = await http.DeleteAsync(
"https://api.contit.cloud/assets/{id}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/assets/{id}",
{
method: "DELETE",
headers: {
"X-Api-Key": "YOUR_API_KEY",
}
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
response = requests.delete(
"https://api.contit.cloud/assets/{id}",
headers=headers
)
data = response.json()
{
"success": true
}