---
title: "Import tasks into a project"
method: POST
path: "/companies/{company}/projects/{project}/tasks/import"
tags: ["Projects"]
---

# Import tasks into a project

`POST /companies/{company}/projects/{project}/tasks/import`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/projects/{project}/tasks/import`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Import tasks into a project from a JSON document (`factuarea.tasks.v1` or a supported format).
- Synchronous, max 200 tasks per call (more returns 422); the report lists `id`/`key` or `error`.
- `Idempotency-Key` required (422 `idempotency_key_required`); a new key creates a new copy.

## Path parameters

- `company` string, uuid, required
- `project` string, uuid, required

## Headers

- `Idempotency-Key` string, required
- `Factuarea-Version` string, date

## Request body

- ImportProjectTasksV1Request
  - `format` string: Format of the document: `factuarea.tasks.v1`, the format produced by `GET /v1/companies/{company}/projects/{project}/tasks/export`. It may be omitted when the document is a `{project, tasks}` JSON file exported from another task manager, which is also accepted.
  - `project` object: Data of the source project (`key`, `name`, `description` and `columns`), as they appear in the exported document.
  - `tasks` object[], required: Tasks to import: between 1 and 200 per request. Each element is an object describing one task. Problems inside a task never reject the request: they are reported per task, as warnings or as a failed entry, in the response.

## Response `200`

- object
  - `data` ProjectTasksImport, required: Report of a synchronous task import. The API imports at most 200 tasks per call and never creates background runs, so the report has no `mode` or `run_id`.
    - `object` 'project_tasks_import', required: Stripe-like discriminator. Always `project_tasks_import` for this resource.
    - `project_id` string, uuid, required: UUID of the project the tasks were imported into.
    - `total` integer, required: Tasks in the document.
    - `created` integer, required: Tasks created.
    - `failed` integer, required: Tasks that could not be created.
    - `warnings` object[], required: Non-blocking adjustments (an unknown member left unassigned, a label created…). Only the first 200 are listed: see `warnings_truncated` and `warnings_total`.
      - `index` integer, nullable, required: Position of the task in the document, or `null` for a document-level warning.
      - `message` string, required: Warning, in Spanish.
    - `warnings_truncated` boolean, required: `true` when the document produced more than 200 warnings and only the first 200 are in `warnings`.
    - `warnings_total` integer, required: Number of warnings the import produced, including those left out of `warnings`.
    - `tasks` object[], required: Outcome per task of the document.
      - `index` integer, nullable, required: Position of the task in the document.
      - `id` string, uuid, nullable, required: UUID of the created task, or `null` when it failed.
      - `key` string, nullable, required: Key of the created task (`DEV-12`), or `null` when it failed.
      - `error` string, nullable, required: Why the task was not created, in Spanish, or `null`.

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company.
- `409`: The request conflicts with data that already exists or with a request running at the same time. `column_has_tasks`: the column still holds tasks. Move them to another column (`move_to_column_id`) before deleting it. `column_slug_in_use`: another column of the project already has that name (or one that produces the same identifier). Choose another name. `project_key_in_use`: another project of the company already uses that `key`. Choose another one. `task_column_capacity_exceeded`: the destination column has reached its maximum number of tasks. Move the task to another column. `task_label_name_in_use`: the company already has a label with that name. Use the existing one or choose another name. `task_relation_exists`: the two tasks are already related with that relation type. `resource_conflict`: another request was reserving identifiers for the same kind of record at that moment and this one could not complete its reservation. Nothing was written; send the request again after a few seconds.
- `422`: Validation failed. The `error.param` field identifies which input is invalid.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
