---
title: "Upload Trace"
method: POST
path: "/api/v0/upload/trace-import"
tags: ["Upload"]
---

# Upload Trace

`POST /api/v0/upload/trace-import`

## Request

- Base URL: `https://api.memfault.com`
- URL: `https://api.memfault.com/api/v0/upload/trace-import`
- Auth: one of:
  - HTTP basic
  - HTTP bearer

Import a new **Trace** for a given **Project**.

Requires `Memfault-Project-Key` header authentication.

The request body is a JSON object describing the trace. Key fields include:

| Field | Type | Description |
|:------|:-----|:------------|
| `device_serial` | String | **Required.** The device serial number. |
| `hardware_version` | String | **Required.** Hardware version of the device. |
| `software_version` | String | **Required.** Software version running on the device. |
| `software_type` | String | **Required.** Software type. |
| `reason` | String | Reason for the trace (e.g. `Assert`, `HardFault`). |
| `captured_date` | String | ISO 8601 timestamp when the trace was captured. |
| `processes` | Array | List of process objects (each with `pid`, `name`, `threads`). |
| `threads` | Array | List of thread objects with registers and stackframes. |

Each stackframe may include `frame_type`, `map_build_id`, `map_name`, `relative_address`, `abs_address`, `function`, `file`, `lineno`.

---

#### Return Value

Returns `202 - Accepted`. The trace is processed asynchronously.

## Headers

- `Memfault-Project-Key` string, required

## Response `202`

Accepted

---

[API](https://skmtc.dev/memfault/apis/memfault-api-documentation.md) - [All operations](https://skmtc.dev/memfault/apis/memfault-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/memfault/apis/memfault-api-documentation/revisions/8037a30996a2?raw)
