> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapping.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger a manual mapping export

> Manually trigger an export of mapping results for a completed job. Returns an export file ID on success. Always check the success field in the response.

Use this endpoint to manually trigger an export of the results from a completed mapping job. Exports are generated asynchronously. When the export is ready, you receive an `exportFileId` that you can use to download the file. If the job has no results or cannot be found, the response indicates failure without returning an HTTP error status.

<Note>
  Exports may also be triggered automatically depending on your organization's export configuration. Use this endpoint when you need to re-export results on demand or generate an export outside the automatic schedule.
</Note>

## Request

```bash theme={null} theme={null}
POST https://api.mapping.travel/api/v1/mapping/{mappingJobId}/export
```

<ParamField path="mappingJobId" type="string" required>
  UUID of the mapping job to export results for.
</ParamField>

This endpoint takes no request body.

## Response

This endpoint always returns HTTP `200 OK`. Check the `success` field to determine whether the export was actually triggered.

<ResponseField name="success" type="boolean" required>
  `true` if the export was triggered successfully. `false` if the job was not found, had no results, or the export failed for another reason.
</ResponseField>

<ResponseField name="exportFileId" type="string">
  UUID of the generated export file. Present only when `success` is `true`. Use this ID to download the export file.
</ResponseField>

<ResponseField name="message" type="string" required>
  Human-readable description of the outcome. Provides detail when `success` is `false`.
</ResponseField>

## Error responses

| Status             | Reason                                                         |
| ------------------ | -------------------------------------------------------------- |
| `401 Unauthorized` | Missing or invalid `Authorization` header.                     |
| `404 Not Found`    | No mapping job with the given ID exists for your organization. |

<Warning>
  A `200 OK` response does not guarantee the export succeeded. Always check `success: true` in the response body before using the `exportFileId`. If `success` is `false`, the `message` field explains why.
</Warning>

## Example

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url https://api.mapping.travel/api/v1/mapping/f7e6d5c4-b3a2-1098-fedc-ba9876543210/export \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 (success) theme={null} theme={null}
  {
    "success": true,
    "exportFileId": "e1f2a3b4-c5d6-7890-abcd-ef0987654321",
    "message": "Export triggered successfully"
  }
  ```

  ```json 200 (failure) theme={null} theme={null}
  {
    "success": false,
    "exportFileId": null,
    "message": "Export failed - mapping job not found or no results"
  }
  ```

  ```json 404 theme={null} theme={null}
  {
    "error": "Not Found",
    "message": "Mapping job not found"
  }
  ```
</ResponseExample>
