Skip to main content

Create Input

Create a new input source and receive a source-scoped API key. The key is only shown once in the creation response — store it securely.

Create a new source to start ingesting documents. The response includes a source-scoped API key (tlnc_sk_*) that authenticates uploads to this source's endpoint. This key is shown only once — store it securely immediately after creation.

The typical workflow is: create a source, store the returned api_key securely, then use it to authenticate document uploads to the source's endpoint URL. Optionally pass a default_schema_id to automatically apply an extraction schema to all documents ingested through this source.

The response returns the source with status: active, document_count: 0, and the one-time api_key field. The endpoint URL is the path for POST document uploads. The links object includes URLs for the source detail, document list, and dashboard view.

Store the api_key immediately — it cannot be retrieved again. If lost, delete the source and create a new one. The source type defaults to api (programmatic ingestion); use upload for manual file uploads or connector for third-party integrations like Google Drive or SharePoint.

The api_key is only returned in the creation response. It cannot be retrieved later. If you lose it, delete the source and create a new one.
POST/v1/sources

Response

Response fields (201 Created)

idstringSource UUID.
namestringSource name.
typestringSource type.
statusstringCurrent status (`active`).
document_countintegerDocument count (0 for a new source).
default_schemaobject | nullDefault schema if provided during creation, otherwise null.
endpointstringURL to POST documents to this source.
api_keystringSource-scoped API key. Shown only once — store immediately.
created_atstringISO 8601 creation timestamp.
linksobjectRelated resource URLs (self, documents, dashboard).

Response (201 Created)

{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "name": "Contract Pipeline",
  "type": "api",
  "status": "active",
  "document_count": 0,
  "default_schema": null,
  "endpoint": "/v1/sources/b2c3d4e5-f6a7-8901-bcde-f12345678901/documents",
  "api_key": "tlnc_sk_live_9a8b7c6d5e4f3g2h1i0j",
  "created_at": "2024-09-14T12:30:00.000Z",
  "links": {
    "self": "/v1/sources/b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "documents": "/v1/sources/b2c3d4e5-f6a7-8901-bcde-f12345678901/documents",
    "dashboard": "https://app.talonic.com/sources/b2c3d4e5-f6a7-8901-bcde-f12345678901"
  }
}
The api_key field is only included in the creation response. Store it immediately -- it cannot be retrieved later.

Errors

Error responses

400invalid_schema_idThe `default_schema_id` provided does not exist or does not belong to your organization.
401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.