BackendHTTP APISyncs

Get records

Requires an API key with the environment:records:read scope. Learn more about API key scopes.

Receive webhooks on data updates

Receive webhooks from Tenklo when new records are available. Follow the sync functions section.

Data availability: Records are subject to Tenklo's data retention policies. Records not updated for 30 days will have their payload pruned (only metadata remains). Records from syncs not executed for 60 days are permanently deleted. Fetch and store records promptly in your own system.

Response

This endpoint returns a list of records, ordered by modification date ascending. If some records are updated while you paginate through this endpoint, you might see these records multiple times.

A response may contain fewer records than limit when records have a large size. Always check next_cursor and continue paginating until it is null.

Default behavior

By default this returns an array of objects in the data model that you queried with some metadata about each record.

{ 
    records: 
        [
            {
                id: 123,
                ..., // Fields as specified in the model you queried
                _nango_metadata: {
                    deleted_at: null,
                    last_action: 'ADDED',
                    first_seen_at: '2023-09-18T15:20:35.941305+00:00',
                    last_modified_at: '2023-09-18T15:20:35.941305+00:00',
                    cursor: 'MjAyNC0wMy0wNFQwNjo1OTo1MS40NzE0NDEtMDU6MDB8fDE1Y2NjODA1LTY0ZDUtNDk0MC1hN2UwLTQ1ZmM3MDQ5OTdhMQ=='
                }
            },
            ...
        ],
    next_cursor: "MjAyMy0xMS0xN1QxMTo0NzoxNC40NDcrMDI6MDB8fDAzZTA1NzIxLWNiZmQtNGYxNS1iYTNhLWFlNjM2Y2MwNmEw=="
}
GET
/records

Returns data synced with Tenklo Sync

Authorization

bearerAuth
headerAuthorizationBearer <token>

An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.

Query Parameters

model*string

The data model to fetch

cursor?string

A marker used to fetch records modified after a specific point in time. If not provided, all records are returned. Each record includes a cursor value found in _nango_metadata.cursor. Save the cursor from the last record retrieved to track your sync progress. Use the cursor parameter together with the limit parameter to paginate through records. The cursor is more precise than modified_after, as it can differentiate between records with the same modification timestamp.

limit?integer

The maximum number of records to return. Defaults to 100. A response may contain fewer records than limit when records have a large size. Always check next_cursor and continue paginating until it is null.

filter?string

Filter to only show results that have been added or updated or deleted.

Value in"added""updated""deleted"
modified_after?string

A timestamp (e.g., 2023-05-31T11:46:13.390Z) used to fetch records modified after this date and time. If not provided, all records are returned. The modified_after parameter is less precise than cursor, as multiple records may share the same modification timestamp.

Formatdate-time
delta?stringDeprecated

DEPRECATED (use modified_after) Timestamp, e.g. 2023-05-31T11:46:13.390Z. If passed, only records modified after this timestamp are returned, otherwise all records are returned.

ids?array<string>

An array of string containing a list of your records IDs. The list will be filtered to include only the records with a matching ID.

Itemsitems <= 100
variant?string

The variant of the model to fetch

Header Parameters

Connection-Id*string

The connection ID used to create the connection.

Provider-Config-Key*string

The integration ID used to create the connection (aka Unique Key).

Response Body

Successfully returned records

application/json
  1. response
records?array<>
next_cursor?string

The base64-encoded cursor for pagination

Example Request
curl -X GET 'https://api.tenklo.dev/records?model=string' \  -H 'Connection-Id: string' \  -H 'Provider-Config-Key: string'
Example Response
{  "records": [    {      "your-properties": "string",      "_nango_metadata": {        "deleted_at": "2019-08-24T14:15:22Z",        "last_action": "ADDED",        "first_seen_at": "2019-08-24T14:15:22Z",        "last_modified_at": "2019-08-24T14:15:22Z",        "cursor": "string",        "pruned_at": "2019-08-24T14:15:22Z"      }    }  ],  "next_cursor": "string"}

On this page