Move multiple documents to a collection
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-set-collection/"
payload = {
"document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
collection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-set-collection/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-set-collection/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"moved": 123,
"skipped": 123,
"extraction_flows_to_rerun": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
]
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Documents
Move multiple documents to a collection
Move up to 200 active documents into a collection, or out to “Default”, in one
request. Sets the collection foreign key and swaps the mirrored ["tag", slug]
pair on each document so retrieval/extraction filters follow the move. Requires
project admin permission.
POST
/
projects
/
{project_id}
/
documents
/
bulk-set-collection
/
Move multiple documents to a collection
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-set-collection/"
payload = {
"document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
collection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-set-collection/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-set-collection/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"moved": 123,
"skipped": 123,
"extraction_flows_to_rerun": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
]
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer
Path Parameters
UUID of the project
Body
application/json