Talk to your AI agent to run Simetrik. →
SimetrikDocs

Create a source

POST /api/v2/sources — declare the name and column schema of the source your records will feed.

Creates the source in Simetrik and registers it for ingestion. Call it once per source; every record you post afterwards refers to the id it returns.

POST /api/v2/sources

Headers

HeaderRequiredValue
x-api-keyYesYour API key.
x-skt-workspaceYesWorkspace to create the source in.
x-skt-accountYesAccount id.
Content-TypeYesapplication/json

See Authentication.

Body

FieldTypeRequiredWhat it does
namestringYesSource name, as it will appear in the platform.
columnsarrayYesThe column schema. At least one column.
folder_idintegerNoFolder to create the source in. Omitted means the default location.
notification_configobjectNoWhere to call you back as files move. See Status notifications.

Each entry in columns:

FieldTypeWhat it does
namestringColumn name in the resulting CSV.
positionintegerOrder in the CSV, starting at 1.
mappingstringPath to the value in your JSON. Dot notation for nested objects.
data_typestringstring, numeric, integer, boolean, date, datetime or time.
format_notationstringInput format, mostly for dates. "" when it doesn't apply.

Example

curl -X POST "$SIMETRIK_INGESTION_URL/api/v2/sources" \
  -H "x-api-key: $SIMETRIK_API_KEY" \
  -H "x-skt-workspace: 886" \
  -H "x-skt-account: 23" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Card settlements",
    "columns": [
      {"name": "id",       "position": 1, "mapping": "id",             "data_type": "string",   "format_notation": ""},
      {"name": "amount",   "position": 2, "mapping": "amount",         "data_type": "numeric",  "format_notation": ""},
      {"name": "method",   "position": 3, "mapping": "payment.method", "data_type": "string",   "format_notation": ""},
      {"name": "paid_at",  "position": 4, "mapping": "paid_at",        "data_type": "datetime", "format_notation": "yyyy-MM-dd HH:mm:ss"}
    ]
  }'

Response

201 Created:

{
  "id": 61171,
  "name": "Card settlements",
  "resource_type": "SOURCE",
  "path": "…/source_id=61171/"
}
FieldWhat to do with it
idThe source id. Keep it — it's what ties your files to this source.
nameAs created.
resource_typeWhich delivery target your workspace uses. See Key concepts.
pathWhere the processed files are delivered.

Keep the id: it goes in the path of every record you post.

Errors

StatusMeaningWhat to change
400The platform rejected the source definition. The errors array says which field.Usually a duplicate name or an invalid column.
403Authorization failed.See Authentication.
422The body didn't validate — missing field, unknown data_type, malformed notification_config.The errors array lists each problem as field: message.
502Storage provisioning failed upstream.Transient. Retry; if it persists, contact support.
500Unexpected error.Retry; if it persists, contact support.

An earlier path, POST /v1/create-source, is still served for existing integrations.

Creating a source is not idempotent. A retry after a timeout can leave you with two sources of the same name — check before you call again.

On this page