Skip to main content

Sources Endpoint Reference

Reference for 20 Sources endpoints of the Talonic API: parameters, request body, curl and Node.js examples, response and errors.

Create document ingest sources with dedicated API keys. Upload documents for automatic extraction.

Every request needs an API key in the Authorization: Bearer header. Examples read the key from the TALONIC_API_KEY environment variable.

POST/v1/sources/{id}/documents

Path parameters

id*string (uuid)Resource UUID.

Request body (multipart/form-data)

file*string (binary)The document file. Max 500 MB.
processing_modestring ("realtime", "batch")"realtime" (default) — processed immediately. "batch" — 50% cost discount, results within 48 hours. Default: "realtime"
batch_idstringOptional caller grouping key stamped on the document (documents.client_batch_id).
metadatastringOptional JSON string of a FLAT object { [key]: string | number | boolean | null } (nested objects/arrays rejected 400; ≤50 keys, key ≤128, string value ≤1024), stamped on the document as documents.client_metadata.

curl

curl -X POST 'https://api.talonic.com/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -F "file=@document.pdf" \
  -F 'processing_mode=realtime' \
  -F 'batch_id=3fa85f64-5717-4562-b3fc-2c963f66afa6' \
  -F 'metadata=string'

Node.js (18+)

import { readFile } from 'node:fs/promises';

const form = new FormData();
form.append('file', new Blob([await readFile('document.pdf')]), 'document.pdf');
form.append('processing_mode', "realtime");
form.append('batch_id', "3fa85f64-5717-4562-b3fc-2c963f66afa6");
form.append('metadata', "string");

const res = await fetch("https://api.talonic.com/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
  body: form,
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — Document ingested (or duplicate detected).

{
  "document_id": "f0e1d2c3-b4a5-9687-8765-432109876543",
  "filename": "receipt-march.pdf",
  "size_bytes": 148213,
  "status": "queued",
  "processing_mode": "realtime",
  "source_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "links": {
    "document": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543",
    "source": "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}
  • 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.
  • 413 — The uploaded file exceeds the size limit.
  • 429 — Daily rate limit exceeded.
POST/v1/ingest

Request body (multipart/form-data)

file*string (binary)The document file. Max 50 MB.
batch_idstringOptional caller grouping key stamped on the document (documents.client_batch_id).
metadatastringOptional JSON string of a FLAT object { [key]: string | number | boolean | null } (nested objects/arrays rejected 400; ≤50 keys, key ≤128, string value ≤1024), stamped on the document as documents.client_metadata.

curl

curl -X POST 'https://api.talonic.com/v1/ingest' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -F "file=@document.pdf" \
  -F 'batch_id=3fa85f64-5717-4562-b3fc-2c963f66afa6' \
  -F 'metadata=string'

Node.js (18+)

import { readFile } from 'node:fs/promises';

const form = new FormData();
form.append('file', new Blob([await readFile('document.pdf')]), 'document.pdf');
form.append('batch_id', "3fa85f64-5717-4562-b3fc-2c963f66afa6");
form.append('metadata', "string");

const res = await fetch("https://api.talonic.com/v1/ingest", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
  body: form,
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — Document ingested (or duplicate detected).

{
  "document_id": "f0e1d2c3-b4a5-9687-8765-432109876543",
  "filename": "receipt-march.pdf",
  "size_bytes": 148213,
  "status": "queued",
  "links": {
    "document": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543"
  }
}
  • 400 — The request is invalid.
  • 401 — Missing or invalid API key.
  • 413 — The uploaded file exceeds the size limit.
GET/v1/sources/kendox/dedicated-egress

Required scope: read

curl

curl -X GET 'https://api.talonic.com/v1/sources/kendox/dedicated-egress' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/kendox/dedicated-egress", {
  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 — Availability.

{
  "available": true
}
  • 401 — Missing or invalid API key.
  • 403 — The API key does not have the required scope.
  • 429 — Daily rate limit exceeded.
GET/v1/sources/sql/dedicated-egress

Required scope: read

curl

curl -X GET 'https://api.talonic.com/v1/sources/sql/dedicated-egress' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/dedicated-egress", {
  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 — Availability.

{
  "available": true
}
  • 401 — Missing or invalid API key.
  • 403 — The API key does not have the required scope.
  • 429 — Daily rate limit exceeded.
PATCH/v1/sources/outlook/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

include_bodiesbooleanBring in the message bodies, not only attachments.
thread_documentsbooleanGmail: bring mail in as one document per thread.
date_rangeobjectOnly mail in this period; null for no limit.

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/outlook/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "include_bodies": true,
  "thread_documents": true,
  "date_range": {
    "from": "string",
    "to": "string"
  }
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/outlook/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "include_bodies": true,
    "thread_documents": true,
    "date_range": {
      "from": "string",
      "to": "string"
    }
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The settings after the change.

{
  "config": {}
}
  • 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.
PATCH/v1/sources/hubspot/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

engagement_typesstring ("note", "email", "call", "meeting")[]Which engagements to bring in; no duplicates, not empty.
date_rangeobjectOnly engagements in this period; null for no limit.

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/hubspot/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "engagement_types": [
    "note"
  ],
  "date_range": {
    "from": "string",
    "to": "string"
  }
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/hubspot/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "engagement_types": [
      "note"
    ],
    "date_range": {
      "from": "string",
      "to": "string"
    }
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The settings after the change.

{
  "config": {}
}
  • 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.
PATCH/v1/sources/notion/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

include_database_propertiesbooleanBring in database properties with each page.
render_child_page_refsstring ("link", "skip")How a reference to a child page appears.
include_imagesbooleanBring in images.
date_rangeobjectOnly pages edited in this period; null for no limit.

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/notion/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "include_database_properties": true,
  "render_child_page_refs": "link",
  "include_images": true,
  "date_range": {
    "from": "string",
    "to": "string"
  }
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/notion/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "include_database_properties": true,
    "render_child_page_refs": "link",
    "include_images": true,
    "date_range": {
      "from": "string",
      "to": "string"
    }
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The settings after the change.

{
  "config": {}
}
  • 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.
PATCH/v1/sources/teams/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

transcript_sizestring ("day", "week")How much conversation one document holds.
date_rangeobjectOnly conversations in this period; null for no limit.
include_attachmentsbooleanBring in shared files.
surface_filterobject

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/teams/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "transcript_size": "day",
  "date_range": {
    "from": "string",
    "to": "string"
  },
  "include_attachments": true,
  "surface_filter": {
    "channels": true,
    "chats": true,
    "meetings": true
  }
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/teams/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "transcript_size": "day",
    "date_range": {
      "from": "string",
      "to": "string"
    },
    "include_attachments": true,
    "surface_filter": {
      "channels": true,
      "chats": true,
      "meetings": true
    }
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The settings after the change.

{
  "config": {}
}
  • 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.
PATCH/v1/sources/granola/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

include_transcriptsbooleanBring in meeting transcripts with the notes.
date_rangeobjectOnly meetings in this period; null for no limit.
owner_emailstringKeep only notes this person owns or was shared; null for every note the key sees.

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/granola/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "include_transcripts": true,
  "date_range": {
    "from": "string",
    "to": "string"
  },
  "owner_email": "string"
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/granola/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "include_transcripts": true,
    "date_range": {
      "from": "string",
      "to": "string"
    },
    "owner_email": "string"
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The settings after the change.

{
  "config": {}
}
  • 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.
PATCH/v1/sources/s3/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

processing_modestring ("batch", "realtime")batch for discounted processing with results within 48 hours, realtime otherwise. Applies when ingestion_target is ingest.
ingestion_targetstring ("upload", "extract", "ingest")How far files are processed on arrival: stored only (upload), extracted (extract), or fully prepared (ingest).
quick_extractionbooleanUse quick extraction for files brought in from this connection.
dedicated_egressbooleanRoute every call through the workspace's fixed outbound address; turning it on checks the bucket is reachable that way first.

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/s3/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "processing_mode": "batch",
  "ingestion_target": "upload",
  "quick_extraction": true,
  "dedicated_egress": true
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/s3/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "processing_mode": "batch",
    "ingestion_target": "upload",
    "quick_extraction": true,
    "dedicated_egress": true
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The settings after the change.

{
  "config": {}
}
  • 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.
PATCH/v1/sources/kendox/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

culturestringLanguage for localized Kendox names, e.g. de, en, de-CH.
dedicated_egressbooleanRoute every call through the workspace's fixed outbound address.

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/kendox/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "culture": "string",
  "dedicated_egress": true
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/kendox/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "culture": "string",
    "dedicated_egress": true
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The settings after the change.

{
  "config": {}
}
  • 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.
PATCH/v1/sources/sql/{connectionId}/config

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

namestringNew display name.
dedicated_egressbooleanConnect through the workspace's fixed outbound address; turning it on checks the database is reachable that way first.

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/config' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "dedicated_egress": true
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/config", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "string",
    "dedicated_egress": true
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The connection after the change, or `{ "ok": true }` when the body changed nothing.

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "type": "string",
  "status": "active",
  "name": "string",
  "config": {},
  "sync_status": "idle",
  "sync_error": "string",
  "last_synced_at": "2026-01-15T09:30:00Z",
  "sync_interval": "off",
  "sync_scope": {},
  "document_count": 1,
  "connected_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "created_at": "2026-01-15T09:30:00Z"
}
  • 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.
GET/v1/sources/sql/{connectionId}/overview

Required scope: read

Path parameters

connectionId*string (uuid)Source connection UUID.

curl

curl -X GET 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/overview' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/overview", {
  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 — The overview.

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "string",
  "engine": "postgres",
  "host": "string",
  "database": "string",
  "table_count": 1,
  "row_estimate": 1,
  "imported_tables": 1,
  "saved_queries": 1
}
  • 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.
GET/v1/sources/sql/{connectionId}/tables/{tableName}/columns

Required scope: read

Path parameters

connectionId*string (uuid)Source connection UUID.
tableName*stringTable name.

Query parameters

schemastringDatabase schema; the engine default when left out.

curl

curl -X GET 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/tables/tableName/columns' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/tables/tableName/columns", {
  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 — The columns.

[
  {
    "name": "string",
    "db_type": "string",
    "mapped_type": "string",
    "nullable": true
  }
]
  • 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.
GET/v1/sources/sql/{connectionId}/tables/{tableName}/rows

Required scope: read

Path parameters

connectionId*string (uuid)Source connection UUID.
tableName*stringTable name.

Query parameters

schemastringDatabase schema; the engine default when left out.
pageintegerPage number, from 1. Default: 1
limitintegerRows per page. Default: 50
qstringText to search for in every column.

curl

curl -X GET 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/tables/tableName/rows' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/tables/tableName/rows", {
  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 — One page of rows.

{
  "columns": [
    {
      "name": "string",
      "db_type": "string"
    }
  ],
  "rows": [
    [
      null
    ]
  ],
  "truncated": true,
  "page": 1,
  "limit": 1,
  "row_estimate": 1,
  "filtered": true
}
  • 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.
GET/v1/sources/sql/{connectionId}/saved-queries

Required scope: read

Path parameters

connectionId*string (uuid)Source connection UUID.

curl

curl -X GET 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries", {
  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 — The saved queries.

[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "source_connection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "description": "string",
    "sql_text": "string",
    "created_at": "2026-01-15T09:30:00Z",
    "updated_at": "2026-01-15T09:30:00Z"
  }
]
  • 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.
GET/v1/sources/sql/{connectionId}/saved-queries/{queryId}

Required scope: read

Path parameters

connectionId*string (uuid)Source connection UUID.
queryId*string (uuid)Saved query UUID.

curl

curl -X GET 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
  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 — The saved query.

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "source_connection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "string",
  "description": "string",
  "sql_text": "string",
  "created_at": "2026-01-15T09:30:00Z",
  "updated_at": "2026-01-15T09:30:00Z"
}
  • 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.
DELETE/v1/sources/sql/{connectionId}/saved-queries/{queryId}

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.
queryId*string (uuid)Saved query UUID.

curl

curl -X DELETE 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
  method: 'DELETE',
  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 — Deleted.

{
  "deleted": true
}
  • 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.
PATCH/v1/sources/sql/{connectionId}/saved-queries/{queryId}

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.
queryId*string (uuid)Saved query UUID.

Request body (application/json)

namestring
sql_textstringThe query.
descriptionstring

curl

curl -X PATCH 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "sql_text": "string",
  "description": "string"
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/saved-queries/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "string",
    "sql_text": "string",
    "description": "string"
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The saved query after the change.

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "source_connection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "string",
  "description": "string",
  "sql_text": "string",
  "created_at": "2026-01-15T09:30:00Z",
  "updated_at": "2026-01-15T09:30:00Z"
}
  • 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.
POST/v1/sources/sql/{connectionId}/test-query

Required scope: sources:write

Path parameters

connectionId*string (uuid)Source connection UUID.

Request body (application/json)

sql_text*stringThe query.

curl

curl -X POST 'https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/test-query' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sql_text": "string"
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/sources/sql/3fa85f64-5717-4562-b3fc-2c963f66afa6/test-query", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "sql_text": "string"
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The preview.

{
  "columns": [
    {
      "name": "string",
      "db_type": "string"
    }
  ],
  "rows": [
    [
      null
    ]
  ],
  "truncated": true
}
  • 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.