---
title: "Ask for an evidence pack of one task, or of a period (at most 31 days)"
url: https://hexelstudio.com/docs/api/harness/evidence/evidence-packs
---

# Ask for an evidence pack of one task, or of a period (at most 31 days)

**POST** `/harness/evidence-packs`

Send either `task_id`, or `from` and `to`. `422 too_many_tasks`, `429 too_many_evidence_packs`.

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for your organization.

- `X-Workspace-Id: string`

  The workspace the request acts in (`ws_...`). It never grants access by itself.

- `X-Environment-Id: string`

  The environment the request acts in (`env_...`). It never grants access by itself.

## Body parameters

- `task_id: optional string`

- `from: optional string`

- `to: optional string`

## Returns

`201` The pack (download it with GET /harness/evidence-packs/{id}). (`EvidencePack`)

- `created_at: string`

- `created_by: string`

- `environment_id: string`

- `from: optional string`

- `id: string`

- `org_id: string`

- `task_id: optional string`

- `task_ids: array of string`

- `to: optional string`

- `workspace_id: string`

## Errors

- `default` 

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/harness/evidence-packs' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'X-Workspace-Id: X_WORKSPACE_ID' \
  --header 'X-Environment-Id: X_ENVIRONMENT_ID' \
  --header 'Content-Type: application/json' \
  --data '{
  "task_id": "string",
  "from": "2026-01-01T00:00:00Z",
  "to": "2026-01-01T00:00:00Z"
}'
```

### Response (201)

```json
{
  "created_at": "2026-01-01T00:00:00Z",
  "created_by": "string",
  "environment_id": "string",
  "from": "2026-01-01T00:00:00Z",
  "id": "string",
  "org_id": "string",
  "task_id": "string",
  "task_ids": [
    "string"
  ],
  "to": "2026-01-01T00:00:00Z",
  "workspace_id": "string"
}
```
