---
title: "Add or replace records of a dataset"
method: POST
path: "/v1/data-library/records"
tags: ["Data Library"]
---

# Add or replace records of a dataset

`POST /v1/data-library/records`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/data-library/records`
- Auth: HTTP bearer

Stores up to 2000 records under `dataset` for the workspace of the key. A record with the same record key and `valid_from` as a stored record of the workspace replaces it. Entries with an empty `record_key` are skipped and not counted. Requires the `write` scope.

## Request body

- DataLibraryRecordsInput
  - `dataset` string, required: Dataset key.
  - `records` DataLibraryRecordInput[], required
    - `record_key` string, required
    - `attributes` object, required
    - `valid_from` string, date, nullable
    - `valid_to` string, date, nullable
    - `source_url` string, nullable
    - `quote` string, nullable: The publisher's own wording that states the record.

## Response `201`

Number of records stored.

- object
  - `data` object, required
    - `stored` integer, required: Records written.

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `403`: The API key does not have the required scope.
- `429`: Daily rate limit exceeded.

## Changes

- **2026-10-28** `0a485a46163e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/data-library/records/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
