Skip to content
bynhDocs

Download an evidence file

GET/workspaces/{workspace}/evidence/items/{evidenceItem}/files/{file}/download

Downloads a file attached to a piece of evidence. It is always sent as an attachment, never rendered, and the download is logged.

Authentication

Send an API token as a bearer token. This endpoint needs a read token, made by any member of the workspace. Create one in My account → API tokens; see scopes and roles.

Authorization: Bearer 42|bynh_pat_•••••••Header

Path parameters

  • workspacestringRequired

    Your workspace slug, e.g. dokan.

  • evidenceItemintegerRequired

    Evidence item id.

  • fileintegerRequired

    File id, scoped to the evidence item.

Response

200 OK

The file with its stored Content-Type, Content-Disposition: attachment, X-Content-Type-Options: nosniff and Content-Security-Policy: default-src 'none'; sandbox. Not JSON.

Rate limits

This endpoint counts toward your general limit of 120 requests a minute. When you go over, wait for the number of seconds in Retry-After.

Errors

401The token is missing, wrong, revoked or expired.
404The token belongs to another workspace, or its owner is no longer a member. Or: File not on this item, or missing from storage.

Every error is JSON with a message. See Errors.

Next →Delete an evidence file
curl -OJ "https://api.bynh.io/api/v1/workspaces/dokan/evidence/items/1/files/1/download" \
  -H "Authorization: Bearer $BYNH_TOKEN" \
  -H "Accept: application/json"

Response200 OK

File

The file itself, with its name in Content-Disposition.

Examples use Dokan, a sample workspace. Responses are shortened where lists are long.