---
title: "Make a private evidence link"
method: POST
path: "/stats/evidence/cases/{id}/links"
tags: ["Stats"]
---

# Make a private evidence link

`POST /stats/evidence/cases/{id}/links`

## Request

- Base URL: `https://api.nippy.host`
- URL: `https://api.nippy.host/stats/evidence/cases/{id}/links`
- Auth: `bearer` (a scheme the document does not define)

Admin-only. A link for one named investigator that opens the files of this case. The URL is returned this once only. Every request made with it is logged.

## Path parameters

- `id` string, required

## Request body

- CreateEvidenceLinkDto
  - `label` string, required: Who the link is for, e.g. "IWF analyst".
  - `expiresInDays` number: Days until the link stops working.

## Response `200`

- APIEvidenceLinkCreated
  - `link` APIEvidenceLink, required
    - `id` string, required
    - `label` string, required
    - `state` 'active' | 'expired' | 'revoked', required
    - `expiresAt` string, required
    - `revokedAt` string, nullable, required
    - `createdByName` string, nullable, required
    - `createdAt` string, required
    - `accessCount` number, required: Requests made with the link.
    - `lastAccessAt` string, nullable, required
  - `url` string, required: The private URL. Never shown again.

## Other responses

- `403`: Admin access required
- `404`: Case not found

---

[API](https://skmtc.dev/nippy/apis/nippy-backend-api.md) · [All operations](https://skmtc.dev/nippy/apis/nippy-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nippy/apis/nippy-backend-api/revisions/7ab23f040a55?raw)
