> For the complete documentation index, see [llms.txt](https://developer.abacum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.abacum.ai/api-reference/datasets/load-data-into-a-dataset.md).

# Load data into a dataset

Triggers an actuals load for an existing dataset configured with an Import API connector.

**Prerequisites:**

* The organization must have the Import API setting enabled.
* The target dataset must already exist in Abacum and use a connector of Import API type.

**Months format:** each month is specified as `YYYY-MM` (e.g. `2026-02`). To load multiple months from a single aggregated file, include multiple `months` values. For individual files per month, make one request per month.

**Rate limit:** 10 requests per minute for the same user and URL. Above that, the API answers `429` with a `Retry-After` header.

```json
{"openapi":"3.0.0","info":{"title":"Abacum public API","version":"1.0.0"},"tags":[{"name":"Datasets","description":"List datasets, read their raw or processed data, and load actuals into them with the Import API."}],"servers":[{"url":"https://api.abacum.io","description":"Prod environment"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An access token from the token endpoint, sent as `Authorization: Bearer <access_token>`. Use it to try an endpoint from this page. The token carries the permissions of its user, so use a user with the lowest role that fits the call."}},"schemas":{"ErrorMessage":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"DetailMessage":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}},"responses":{"TooManyRequests10PerMinute":{"description":"Rate limit exceeded: 10 requests per minute for the same user and URL. Wait the number of seconds in the `Retry-After` header, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}},"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailMessage"}}}}},"headers":{"XRequestID":{"description":"Identifier of this request. Quote it when you contact support so they can find the exact request. A server-side client can set it by sending an `X-Request-ID` request header of 1 to 64 characters from `A-Za-z0-9_-`; any other value is replaced by a generated one. Browsers can read this header but cannot send their own. The value identifies a request for support, but it is not proof that only one request used it.","schema":{"type":"string"}}}},"paths":{"/public-api/load-data":{"post":{"summary":"Load data into a dataset","description":"Triggers an actuals load for an existing dataset configured with an Import API connector.\n\n**Prerequisites:**\n- The organization must have the Import API setting enabled.\n- The target dataset must already exist in Abacum and use a connector of Import API type.\n\n**Months format:** each month is specified as `YYYY-MM` (e.g. `2026-02`).\nTo load multiple months from a single aggregated file, include multiple `months` values.\nFor individual files per month, make one request per month.\n\n**Rate limit:** 10 requests per minute for the same user and URL. Above that, the API answers `429` with a `Retry-After` header.\n","operationId":"loadDatasetData","tags":["Datasets"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","dataset_code","months"],"properties":{"file":{"type":"string","format":"binary","description":"CSV or XLSX file to load. Maximum size is 512 MB."},"dataset_code":{"type":"string","description":"Code of the target dataset."},"months":{"type":"array","minItems":1,"items":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"description":"List of target periods in YYYY-MM format. Must contain at least one month."},"override":{"type":"boolean","default":false,"description":"If true, overwrites existing data for the specified months."}}}}}},"responses":{"200":{"description":"Load successfully queued. The body is an empty JSON object. The response carries no load ID.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error. The body has one of two shapes, depending on where validation failed.\n\n**Request validation** returns an object that maps each invalid field (`file`, `dataset_code`, `months`,\n`override`) to a list of messages. A bad value inside `months` is reported per item, keyed by its\nposition: `{\"months\": {\"0\": [\"Date has wrong format. Use one of these formats instead: YYYY-MM.\"]}}`.\n\n| Trigger | Message |\n|---|---|\n| `file` field missing | `\"This field is required.\"` |\n| `dataset_code` field missing | `\"This field is required.\"` |\n| `months` field missing | `\"This field is required.\"` |\n| `months` is an empty list | `\"At least one month must be provided.\"` |\n| Month not in YYYY-MM format | `\"Date has wrong format.\"` |\n| `override` is not a boolean | `\"Must be a valid boolean.\"` |\n| File extension is not .csv or .xlsx | `\"Upload failed. File format must be .csv or .xlsx.\"` |\n| File size exceeds 512 MB | `\"Upload failed. File size must not exceed 512 MB.\"` |\n\n**Load checks** return `{\"error\": [\"<message>\"]}`. The message sits in a list.\n\n| Trigger | Message |\n|---|---|\n| Organization setting disabled | `\"API data loads are not enabled for this organization.\"` |\n| Dataset connector is not Import API | `\"Dataset is not configured for API data loads.\"` |\n","content":{"application/json":{"schema":{"anyOf":[{"type":"object","description":"Request validation error. Maps each invalid field to a list of messages.","additionalProperties":true},{"type":"object","description":"Load check error.","required":["error"],"properties":{"error":{"type":"array","items":{"type":"string"}}}}]}}}},"403":{"description":"One of three causes:\n\n- The bearer token is missing, invalid or expired. The response has an empty body.\n- The token's user is not an Admin or Super Admin. The body is `{\"detail\": \"You do not have permission to perform this action.\"}`.\n- The user cannot access this dataset. The body is `{\"error\": \"You do not have permission to load data into this dataset.\"}`.\n\nThe API answers `403` for a bad token, not `401`.\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}},{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}]}}}},"404":{"description":"Dataset with the given code not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"A load for the requested period range is already in progress. Wait for it to finish before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"array","items":{"type":"string"}}}}}}},"429":{"$ref":"#/components/responses/TooManyRequests10PerMinute"},"500":{"description":"The dataset has no connector, so the load cannot start. The response has an empty body."}}}}}}
```
