Collections Endpoint Reference
Reference for 9 Collections endpoints of the Talonic API: parameters, request body, curl and Node.js examples, response and errors.
Named groups of documents, filled by rules and by hand, and optionally assigned to people or groups.
Every request needs an API key in the Authorization: Bearer header. Examples read the key from the TALONIC_API_KEY environment variable.
/v1/documents/{id}/collectionsRequired scope: read
Path parameters
curl
curl -X GET 'https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/collections' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/collections", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
- 429 — Daily rate limit exceeded.
/v1/documents/{id}/traitsRequired scope: documents:write
Path parameters
Request body (application/json)
curl
curl -X PATCH 'https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/traits' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"add": [
"string"
],
"remove": [
"string"
]
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/traits", {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"add": [
"string"
],
"remove": [
"string"
]
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
- 429 — Daily rate limit exceeded.
/v1/documents/{id}/moveRequired scope: documents:write
Path parameters
Request body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/move' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"to": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/move", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"from": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"to": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
- 409 — The request conflicts with the current resource state.
- 429 — Daily rate limit exceeded.
/v1/documents/{id}/partiesRequired scope: documents:write
Path parameters
Request body (application/json)
curl
curl -X PUT 'https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/parties' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"parties": [
{
"id": "email:jane@acme.com",
"role": "from"
}
],
"complete": true
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6/parties", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"parties": [
{
"id": "email:jane@acme.com",
"role": "from"
}
],
"complete": true
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
- 429 — Daily rate limit exceeded.
/v1/collections/configRequired scope: read
curl
curl -X GET 'https://api.talonic.com/v1/collections/config' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/collections/config", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 429 — Daily rate limit exceeded.
/v1/collections/configRequired scope: documents:write
Query parameters
falsefalseRequest body (application/json)
curl
curl -X PUT 'https://api.talonic.com/v1/collections/config' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": {},
"yaml": "string"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/collections/config", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"document": {},
"yaml": "string"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 409 — The request conflicts with the current resource state.
- 429 — Daily rate limit exceeded.
/v1/collections/proposalRequired scope: read
curl
curl -X POST 'https://api.talonic.com/v1/collections/proposal' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/collections/proposal", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 429 — Daily rate limit exceeded.
/v1/collections/directoryRequired scope: read
curl
curl -X GET 'https://api.talonic.com/v1/collections/directory' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/collections/directory", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 429 — Daily rate limit exceeded.
/v1/collections/directoryRequired scope: documents:write
Request body (application/json)
curl
curl -X PUT 'https://api.talonic.com/v1/collections/directory' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entries": [
{
"match_value": "string",
"relationship": "string"
}
],
"remove": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"wait": true
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/collections/directory", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"entries": [
{
"match_value": "string",
"relationship": "string"
}
],
"remove": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"wait": true
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — OK
{}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
- 429 — Daily rate limit exceeded.