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

# Send a report file

> Send one JUnit XML or pytest-html 4 report file to a Peeps project, filed under a release, with the file's bytes as the request body.

Sends one JUnit XML or pytest-html 4 report. The request body is the file's bytes. Peeps checks what the file holds, not its name: a file that is neither report is refused with `422`, and Peeps stores none of it. A file that passes this check can still be rejected while Peeps processes it: check the upload's `rejectedFiles` with [Get an upload](/api-reference/results/get-an-upload).

For a walkthrough with curl and Python, retries and limits, see [Send results from your harness](/results-api/send-results).

**project** `string` *required*

The project's acronym, in any case, such as `WEB`, or its ID. The project must be a web project whose tests don't live in a GitHub repository, and the key must be allowed to send to it.

**fileName** `string` *required*

The file's name, as Peeps shows it: 1 to 255 characters, with no `/`, `\` or control characters, ending in `.xml` or `.html` in any case. URL-encode it.

**release** `string`

The release to file the results under: 1 to 80 letters, digits, spaces and `. _ + - ( )`, starting with a letter or digit. URL-encode it: `2.0+build` is `?release=2.0%2Bbuild`. Leave it out to use the project's current release.

**Authorization** `string` *required*

`Bearer` followed by your [API key](/api-reference/api-keys).

**Content-Length** `integer` *required*

The file's size in bytes, from 1 byte to 50 MiB. `curl -T` and Python `requests` with an open file send it for you.

**Idempotency-Key** `string`

Your own name for this request, 1 to 200 printable ASCII characters. Without it, Peeps recognizes a resend for 24 hours by its project, file name, bytes and `release`. Reusing it within 24 hours with different request details returns `409 idempotency_mismatch`. See [Sending again is safe](/results-api/send-results#sending-again-is-safe).

The whole body must arrive within 120 seconds.

## Response

`202` when Peeps stored the file. `200` when Peeps already had this request, or already holds the same file in this project.

**uploadId** `string`

The upload this file belongs to. Each file you send is its own upload.

**project** `string`

The project's acronym.

**release** `string`

The release this upload is filed under: the one you sent, or the project's current release. If `file.status` is `already_in_peeps`, the earlier results stay where they were first filed; `release` and `reportUrl` don't point at that earlier filing.

**file** `object`

**properties**

**name** `string`

The file's name.

**status** `string`

`received`: Peeps stored the file now, or already had this request. `already_in_peeps`: the same file is already filed in this project, so Peeps doesn't file it again.

**state** `string`

The upload's state. See [Get an upload](/api-reference/results/get-an-upload).

**statusUrl** `string`

The URL to check this upload with.

**reportUrl** `string`

The release page in Peeps. When the release name can't be put in a link, this is the project's test cases page instead.

If a release or file name holds a secret value from the project, Peeps masks it in the response.

## Errors

Sending a file can return any error in the [errors table](/api-reference/introduction#errors).

```bash curl theme={null}
curl --fail-with-body -sS -T junit.xml \
  -H "Authorization: Bearer $PEEPS_API_KEY" \
  "https://app.peepsai.com/api/v1/projects/WEB/results/junit.xml?release=2.0"
```

```json 202 theme={null}
{
  "uploadId": "8f0c6a52-3d1e-4f7b-9a4e-2b6f1c0d9e7a",
  "project": "WEB",
  "release": "2.0",
  "file": { "name": "junit.xml", "status": "received" },
  "state": "applying",
  "statusUrl": "https://app.peepsai.com/api/v1/results/uploads/8f0c6a52-3d1e-4f7b-9a4e-2b6f1c0d9e7a",
  "reportUrl": "https://app.peepsai.com/acme/releases/WEB/2.0"
}
```

```json 422 theme={null}
{
  "error": {
    "code": "release_required",
    "message": "This project has no current release. Send ?release=<label> with the file."
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.