Skip to main content

Update a Source

Update a document ingestion source with PATCH /v1/sources/:id: rename it or change its default schema. Partial update — omitted fields stay unchanged.

The PATCH /v1/sources/:id endpoint updates an existing document ingestion source in place. Two properties are writable: name, the human-readable label shown in listings and the dashboard, and default_schema_id, the extraction schema stamped on documents ingested through this source. The update is partial: any field you omit keeps its current value, so you can rename a source without touching its schema assignment and vice versa.

Renaming is purely cosmetic — the source keeps its UUID, its endpoint URL, its scoped API key, and every document link, so no integration breaks when you rename. Changing default_schema_id affects future ingests only: documents already processed keep the extractions they have, and documents ingested after the update pick up the new default schema. Pass null to remove the default schema entirely, leaving new documents to schema-less ingestion.

The endpoint requires the write scope and answers with the full updated source object, in the same shape GET /v1/sources/:id returns: id, name, type, status, document_count, default_schema, endpoint, created_at, and links. There is no dedicated response envelope for the update — read the returned object as the new current state.

Only these two fields are updatable over the API. A source's type is fixed at creation, its API key cannot be rotated in place (create a new source for a fresh key), and connector configuration for dashboard-created sources (Google Drive folders, SharePoint sites, sync cadence) is managed in the Talonic dashboard, not through this endpoint.

A default-schema change never rewrites history: existing documents and their extractions are untouched. To re-extract older documents against the new schema, run them through a Spec pipeline or the extraction endpoints explicitly.
PATCH/v1/sources/:id

Body parameters

namestringNew display name for the source (max 255 characters). Omit to keep the current name.
default_schema_idstring | nullNew default schema UUID for future ingests, or null to remove the default schema. Omit to keep the current assignment. A non-UUID value is rejected with 400.

Request

curl -X PATCH https://api.talonic.com/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Invoice Intake (EU)", "default_schema_id": "c3d4e5f6-a7b8-9012-cdef-123456789012" }'

Response

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Invoice Intake (EU)",
  "type": "api",
  "status": "active",
  "document_count": 234,
  "default_schema": { "id": "c3d4e5f6-a7b8-9012-cdef-123456789012" },
  "endpoint": "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents",
  "created_at": "2024-08-01T09:00:00.000Z",
  "links": {
    "self": "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "documents": "/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents",
    "dashboard": "https://app.talonic.com/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}

Remove the default schema

curl -X PATCH https://api.talonic.com/v1/sources/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "default_schema_id": null }'

Errors

Error responses

400validation_errorname exceeds 255 characters, or default_schema_id is neither a UUID nor null.
401unauthorizedMissing or invalid API key.
403forbiddenThe API key does not have the write scope required to update sources.
404not_foundNo source with this ID exists for your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Frequently asked questions

Does renaming a source break existing integrations?+
No. The source keeps its UUID, endpoint URL, and scoped API key across renames; only the display name changes. Integrations address sources by ID, so nothing needs to be updated.
What happens to already-processed documents when I change the default schema?+
Nothing. The new default_schema_id applies only to documents ingested after the update. Existing documents keep their extractions; re-extract them explicitly if you want them under the new schema.
How do I remove a source's default schema?+
Send PATCH /v1/sources/:id with "default_schema_id": null. Subsequent ingests through the source run without a default schema; the name and everything else stay unchanged.
Can I rotate a source's API key with this endpoint?+
No. The source-scoped API key is minted once at creation and is not writable. To rotate, create a new source (which returns a fresh key), point your integration at it, then delete the old source, which invalidates the old key immediately.