---
title: "Get a history import"
method: GET
path: "/org/history-imports/{importId}"
tags: ["History Imports"]
---

# Get a history import

`GET /org/history-imports/{importId}`

## Request

- Base URL: `https://apiv2.senso.ai/api/v1`
- URL: `https://apiv2.senso.ai/api/v1/org/history-imports/{importId}`
- Auth: API key in header `X-API-Key`

Returns one of your organization's history-import jobs — the way to follow a job until it finishes. Only your own organization's jobs are visible; any other id reads as not found. Requires the GEO product.

## Path parameters

- `importId` string, uuid, required

## Response `200`

The history-import job.

- OrgHistoryImport: One history-import job: a request to back-fill your organization's prompts with the run history already collected for your industry.
  - `id` string, uuid, required: The job's id.
  - `days` integer, required: How many days of history the job covers.
  - `status` string, required: The job's progress: `pending` (accepted, not started), `running`, `completed` or `failed`. A failed job may be retried automatically, so it can return to `running` on its own — treat `failed` as the latest attempt rather than a final answer.
  - `prompts_count` integer, nullable, required: How many of your prompts the job matched. Null until the job completes, so its absence does not mean zero. A completed job reporting 0 matched none of your prompts and copied nothing, which is why this is the field to read rather than the status.
  - `historic_runs_imported` integer, nullable, required: How many historic runs the job copied onto your prompts. Null until the job completes.
  - `error` string, nullable, required: Set when the latest attempt failed, null otherwise; cleared again when the job is retried. Always the same fixed sentence — the failure reason itself is not exposed.
  - `created_at` string, date-time, required: When the job was accepted.
  - `updated_at` string, date-time, required: When the job was last updated. A running job refreshes this regularly while it works, so it is not only a state-change timestamp.
  - `completed_at` string, date-time, nullable, required: When the job completed. Null until it does — including for a `failed` job, which has not completed.

## Other responses

- `400`: The request was malformed — a bad path/query parameter or an invalid value.
- `401`: Missing or invalid credentials — supply a valid org API key in the `X-API-Key` header.
- `403`: The API key is authenticated but not permitted to access this resource.
- `404`: The requested resource does not exist or is not visible to this key.
- `501`: This capability is not available for the deployment serving the request.
- `502`: An upstream dependency failed or rejected the request.

---

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