> For the complete documentation index, see [llms.txt](https://docs.incident-tracker.com/llms.txt). Every page is available as Markdown by appending `.md` to its URL.

# API Settings

Connect to the Incident Tracker API. Get a token with your API key and Client ID, find regional base URLs, search incidents and download attachments.

Source: https://docs.incident-tracker.com/admin-guide/application-information/api-settings  
Last updated: 2026-03-11

The Incident Tracker API lets other software read your Incident Tracker data, such as reports, their history, and their attached files. Organizations use it to send incident data to dashboards, spreadsheets, or other business systems automatically, without exporting it by hand.

> **Note**
>
> **Who is this page for?**
>
> * **Admins:** You only need the [Before You Start](#before-you-start) section. Gather the three items listed there and send them to the developer or IT person setting up your integration.
> * **Developers:** Everything below is for you. You can also browse the Swagger documentation for your region: [US](https://public-api.incident-tracker.com/swagger/index.html) · [UK](https://public-api.incident-tracker.co.uk/swagger/index.html) · [Canada](https://canada-public-api.incident-tracker.com/swagger/index.html)

---

## Before You Start

To connect to the API, you need three things:

| What you need | What it is                                      | Where to find it                                                                                                                                                         |
| ------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **API Key**   | A private key that identifies your organization | **Admin > API Settings**                                                                                                                                                 |
| **Client ID** | A number that identifies your workspace         | The number right after the domain in your browser's address bar once you log in. For example, in `https://secure2.incident-tracker.com/1234/...` the Client ID is `1234` |
| **Region**    | Where your Incident Tracker account is hosted   | US, UK, or Canada. Use the matching base URL from the table below                                                                                                        |

**API Base URLs:**

| Region         | Base URL                                         | Swagger                                                                   |
| -------------- | ------------------------------------------------ | ------------------------------------------------------------------------- |
| United States  | `https://public-api.incident-tracker.com`        | [View](https://public-api.incident-tracker.com/swagger/index.html)        |
| United Kingdom | `https://public-api.incident-tracker.co.uk`      | [View](https://public-api.incident-tracker.co.uk/swagger/index.html)      |
| Canada         | `https://canada-public-api.incident-tracker.com` | [View](https://canada-public-api.incident-tracker.com/swagger/index.html) |

> **Note**
>
> Authentication, routes, query parameters and rate limits are the same in every region. Only the base URL changes.

> **Warning**
>
> Treat your API Key like a password. Share it only with the people setting up your integration, and never post it publicly.

---

## Quick Start with Postman

[Postman](https://www.postman.com/) is a free tool for sending test requests to an API. These steps use the US base URL. If your account is in the UK or Canada, swap in your region's base URL.

**Step 1: Get a token**

1. In Postman, create a new request and set the method to **POST**.
2. Enter this URL:

   ```
   https://public-api.incident-tracker.com/api/Security/GetToken
   ```
3. Open the **Body** tab, choose **raw**, then choose **JSON**.
4. Enter your API Key and Client ID, separated by a colon and wrapped in double quotes:

   ```json
   "abc123-xxxx-xxxx-xxxx-abcd1234xxxx:1234"
   ```
5. Click **Send**. The response is your token. Copy it.

**Step 2: Request your incidents**

1. Create a new request and set the method to **GET**.
2. Enter this URL:

   ```
   https://public-api.incident-tracker.com/api/incident/
   ```
3. Open the **Authorization** tab, set the type to **Bearer Token**, and paste your token into the **Token** field.
4. Click **Send**. You'll see a list of your incidents.

### ▶️ Interactive Tutorial - Creating an API Request in Postman

[▶️ Interactive Tutorial - Creating an API Request in Postman](https://app.arcade.software/share/XeKZR4EA1tG2j1dgys6Y)

---

## Authentication

Every request needs a **Bearer Token**, which you get by sending your API Key and Client ID to the authentication endpoint.

**Authentication Endpoint:**

```
POST /api/Security/GetToken
```

**Body Format:**\
Send as raw JSON:

```json
"abc123-xxxx-xxxx-xxxx-abcd1234xxxx:1234"
```

Where:

* `abc123...` = Your API Key (found in **Admin > API Settings**)
* `1234` = Your Client ID (the number right after the domain in your web address once you log in, for example `https://secure2.incident-tracker.com/1234/...`)

> **Caution**
>
> Too many failed attempts will lock your IP address for 30 minutes.

#### Using the Token

Send the token in the `Authorization` header of every request:

```
Authorization: Bearer <your token>
```

> **Note**
>
> The token expires after 60 minutes. When it expires, requests return `401 Unauthorized`. Request a new token to continue.

---

## API Routes

The following routes are available. Add each route to the end of your region's base URL.

| Route | Method | Description |
| --- | --- | --- |
| `/api/incident/` | `GET` | Get all incidents (paginated) |
| `/api/incident/{id}` | `GET` | Get incident by ID |
| `/api/incident/total` | `GET` | Get total incident count |
| `/api/incident/search` | `POST` | Search incidents (paginated) |
| `/api/events/getlabelchangehistory/{idStart}/{idEnd}/{page}` | `GET` | Get report label change history |
| `/api/Attachments/GetAttachments/{incidentId}` | `GET` | List an incident's attachments |
| `/api/Attachments/Download/{attachmentId}` | `GET` | Download an attachment as a file |
| `/api/Attachments/DownloadJson/{attachmentId}` | `GET` | Download an attachment wrapped in JSON |
| `/api/Attachments/DownloadBase64/{attachmentId}` | `GET` | Download an attachment as a Base64 string |

---

## Query String Parameters

Optional parameters for `GET /api/incident/` and `POST /api/incident/search`:

| Parameter  | Type    | Default  | Notes                       |
| ---------- | ------- | -------- | --------------------------- |
| `pagesize` | Numeric | 20       | Max: 100                    |
| `page`     | Numeric | 1        | Page index                  |
| `sort`     | String  | `oldest` | Options: `oldest`, `recent` |

**Example Query:**

```
/api/incident/?pagesize=100&page=1&sort=recent
```

---

## Date Format

All dates sent to and returned by the API use **MM/DD/YYYY** (month first), in every region, including the UK and Canada.

| You mean        | Send         |
| --------------- | ------------ |
| 5 December 2025 | `12/05/2025` |
| 12 May 2025     | `05/12/2025` |

> **Note**
>
> **Exception:** The `date_uploaded` field returned by the [Attachments routes](#downloading-attachments) uses **YYYY-MM-DDTHH:MM:SS** (year first, with the time), for example `2026-10-16T15:51:00`.

---

## Searching Incidents

Send search criteria in the body of `POST /api/incident/search`. Every field is optional, and all the fields you include must match.

**Example Search Body:**

```json
{
  "date_of_report_start": "01/01/2025",
  "date_of_report_end": "12/31/2025",
  "location_name": "Building 1",
  "status_name": "Open"
}
```

For the full list of searchable fields and the rules the search follows, see the [Incident Search Model (Reference)](https://docs.incident-tracker.com/admin-guide/application-information/api-settings/incident-search-model-reference).

---

## Downloading Attachments

You can list the files attached to an incident and download each one. Downloading takes two steps: first list the incident's attachments to get each file's `attachment_id`, then download the file by that ID.

> **Note**
>
> Every incident returned by `/api/incident/` and `/api/incident/{id}` includes an `attached_file_count` field. Use it to skip incidents with no attachments.

#### Step 1: List an incident's attachments

```
GET /api/Attachments/GetAttachments/{incidentId}
```

Returns an array with one entry per file attached to the incident. An incident with no attachments returns an empty array.

| Field           | Type    | Description                                                    |
| --------------- | ------- | -------------------------------------------------------------- |
| `attachment_id` | Numeric | The ID you use to download the file                            |
| `incident_id`   | Numeric | The incident the file is attached to                           |
| `file_name`     | String  | The file's name, including extension                           |
| `size_in_KB`    | Numeric | The file's size in kilobytes                                   |
| `date_uploaded` | String  | The date and time the file was added, as `YYYY-MM-DDTHH:MM:SS` |
| `uploaded_by`   | String  | The name of the user who added the file                        |

### Example response - /api/Attachments/GetAttachments/{incidentId}

```json
[
    {
        "attachment_id": 40,
        "incident_id": 26,
        "file_name": "26_GeoTag_20261016_115105.png",
        "size_in_KB": 533,
        "date_uploaded": "2026-10-16T15:51:00",
        "uploaded_by": "Test User"
    }
]
```

#### Step 2: Download a file

Choose the download route that fits your integration. All three return the same file.

| Route                                            | Returns                                                                                                               | Best for                                                             |
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `/api/Attachments/Download/{attachmentId}`       | The file itself                                                                                                       | Saving files to disk or a document store                             |
| `/api/Attachments/DownloadJson/{attachmentId}`   | A JSON object with `attachment_id`, `file_name`, and the file's bytes in `data` as hyphen-separated hexadecimal pairs | Integrations that need the file name and the file in one response    |
| `/api/Attachments/DownloadBase64/{attachmentId}` | The file contents as a single Base64-encoded string, returned as plain text (not wrapped in JSON)                     | Embedding the file in another system, such as an email or a web page |

### Example response - /api/Attachments/DownloadJson/{attachmentId}

```json
{
    "attachment_id": 26,
    "file_name": "11_notes.docx",
    "data": "50-4B-03-04-14-00-06-00-08-00-00-00-21-00-..."
}
```

To rebuild the file, remove the hyphens and convert each two-character pair from hexadecimal to a byte.

> **Note**
>
> **Testing in Postman?** For the `Download` route, click the arrow next to **Send** and choose **Send and Download** to save the file instead of showing it in the response pane.

Each download counts toward the [rate limit](#rate-limiting). When downloading files from many incidents, pace your requests to stay under 200 per minute.

---

## Example API Data

### Example of Get incident by ID Response - /api/incident/{id}

```json
{
    "incident_id": 1,
    "reported_by_name": "Test User",
    "reported_by_id": 5,
    "date_of_report": "2/17/2026",
    "date_of_incident": "2/17/2026",
    "time_of_report": "2:42:00 PM",
    "time_of_incident": "2:42 PM",
    "location_name": "Location Area 51",
    "sublocation_name": "First Floor",
    "room_name": "Room 105",
    "description": "Test API Response",
    "status_id": 1,
    "status_name": "Open",
    "assigned_to_name": "John Doe",
    "assigned_to_id": 2,
    "duration_total": 0,
    "attached_file_count": 1,
    "priority_id": 3,
    "priority_name": "High",
    "report_sponsor_id": 0,
    "report_sponsor_name": "",
    "day_of_incident": "Tuesday",
    "categories": [
        {
            "category": "Fire",
            "subcategories": [
                {
                    "category": "Fire",
                    "subcategory": "Alarm"
                }
            ]
        }
    ],
    "people": [
        {
            "person_name": "Test User",
            "person_info": "123 First Avenue",
            "person_id": "12345"
        }
    ],
    "witnesses": [],
    "forms": [],
    "custom_sections": [],
    "notes": []
}
```

---

## Rate Limiting

The API allows **200 requests per minute**. If you go over this limit, you'll receive a `429 Too Many Requests` error. Wait a minute, then try again.

---

## Common Errors

| Error                       | What it means                                              | What to do                                                     |
| --------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |
| `401 Unauthorized`          | The token is missing, invalid, or expired                  | Check the `Authorization` header, or request a new token       |
| `429 Too Many Requests`     | More than 200 requests in one minute                       | Slow down and retry after a minute                             |
| Token requests stop working | Too many failed token attempts have locked your IP address | Wait 30 minutes, then check your API Key, Client ID and region |

---

## Legacy API (Deprecated)

> **Warning**
>
> The Legacy API is deprecated. It still works but no longer receives updates and will be retired in the future. Build all new integrations on the current API described on this page.

If you maintain an existing integration on the older API, see the [Legacy API Documentation page](https://docs.incident-tracker.com/admin-guide/application-information/api-settings/legacy-api-documentation).
