---
title: "Rerun a profile import task, resetting its progress and re-queuing it."
method: POST
path: "/api/v1/profile/importtask/{importTaskId}/rerun"
tags: ["Profile"]
---

# Rerun a profile import task, resetting its progress and re-queuing it.

`POST /api/v1/profile/importtask/{importTaskId}/rerun`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/profile/importtask/{importTaskId}/rerun`
- Auth: API key in header `Authorization`

## Path parameters

- `importTaskId` string, required

## Query parameters

- `dryRun` boolean

## Headers

- `Loop-Workspace-Id` string
- `Authorization` string
- `X-Impersonate-User` string

## Response `200`

OK

- ProfileImportTaskResult: Status and result data for a single profile import task.
  - `importTaskId` string: Unique identifier of the import task.
  - `userId` string: User ID of the user who started the import task.
  - `dryRun` boolean, required: Indicates whether the import task was a dry run (no actual import performed).
  - `source` 'Json' | 'Csv', required: Format the profiles of an import task were submitted in. Used to translate a zero based profile index into the row number of the original document - a CSV document has a header row.
  - `status` 'Pending' | 'InProgress' | 'Completed' | 'Failed', required: Current status of a profile import task.
  - `totalRequested` integer, required: Total number of profiles submitted for import.
  - `totalProcedded` integer, required: Total number of profiles are allready procedded.
  - `importedCount` integer, required: Number of profiles successfully imported.
  - `conflictCount` integer, required: Number of profiles that already existed (conflict).
  - `failedCount` integer, required: Number of profiles that failed for reasons other than conflict.
  - `warningCount` integer, required: Number of profiles that were imported but carry at least one warning.
  - `conflictIndexIds` object: Index of profiles that caused a conflict, mapped to the conflict message.
  - `failedIndexIds` object: Index of profiles that failed, mapped to the exception message.
  - `issueGroups` ProfileImportIssueGroup[]: Issues collapsed by error code, ordered by number of affected rows. This is what a client should render as the summary of a dry run - e.g. "Invalid phone number - 3 rows".
    - `code` 'Unknown' | 'MissingIdentificator' | 'EmptyIdentificator' | 'InvalidEmail' | 'InvalidPhoneNumber' | 'DuplicateIdentificatorInFile' | 'IdentificatorConflict' | 'IdentificatorMismatch' | 'InvalidPhotoLink' | 'InvalidPhotoImage' | 'PhotoImportFailed' | 'AccessDenied' | 'CompanyLinkFailed', required: Stable, machine readable reason an import row was rejected or flagged. Clients should group and translate on this value, never on the free text message.
    - `severity` 'Error' | 'Warning', required: Severity of a single issue found on an import row.
    - `message` string: Generic message for the group, without any row specific value in it.
    - `count` integer, required: Number of rows affected by this issue.
    - `field` string: Column the issue belongs to, e.g. Emails, Phones, PhotoLink - null when it applies to the whole row.
    - `rowNumbers` integer[]: Row numbers of the affected rows, capped at the first 100.
    - `sampleValues` string[]: A few offending values as examples, capped at the first 5.
  - `rowResults` ProfileImportRowResult[]: Per row detail for every row that carries an issue, capped at the first 500 rows. The full set is always available through ErrorReportUrlLink.
    - `rowIndex` integer, required: Zero based index of the profile inside the submitted profile list.
    - `rowNumber` integer, required: One based row number in the original document - for a CSV upload this counts the header row, so it is the line number the user sees in a spreadsheet.
    - `name` string: Name of the submitted profile.
    - `title` string: Job title of the submitted profile.
    - `emails` string: Semicolon separated emails of the submitted profile.
    - `phones` string: Semicolon separated phone numbers of the submitted profile.
    - `status` 'Imported' | 'Conflict' | 'Failed', required: Outcome of a single row of an import task.
    - `issues` ProfileImportIssue[]: Issues found on the row - at most one error, plus any number of warnings.
      - `code` 'Unknown' | 'MissingIdentificator' | 'EmptyIdentificator' | 'InvalidEmail' | 'InvalidPhoneNumber' | 'DuplicateIdentificatorInFile' | 'IdentificatorConflict' | 'IdentificatorMismatch' | 'InvalidPhotoLink' | 'InvalidPhotoImage' | 'PhotoImportFailed' | 'AccessDenied' | 'CompanyLinkFailed', required: Stable, machine readable reason an import row was rejected or flagged. Clients should group and translate on this value, never on the free text message.
      - `severity` 'Error' | 'Warning', required: Severity of a single issue found on an import row.
      - `message` string: Human readable message, including the offending value.
      - `field` string: Column the issue belongs to, e.g. Emails, Phones, PhotoLink - null when it applies to the whole row.
      - `value` string: The offending value, e.g. the malformed phone number.
  - `rowResultsTruncated` boolean, required: True when RowResults hit the cap and does not list every affected row.
  - `createdAt` string, date-time, required: When the import task was created.
  - `completedAt` string, date-time: When the import task finished processing, or null if still in progress.
  - `importDataUrlLink` string: Request import data link
  - `errorReportUrlLink` string: Time limited link to a CSV document holding every row that carries an issue, with the original columns plus Row, Status, ErrorCode, ErrorMessage, ErrorField and ErrorValue. Null while the task is still running and when no row had an issue.

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `404`: Requested resource not found.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
