Skip to content
bynhDocs

Delete an evidence file

DELETE/workspaces/{workspace}/evidence/items/{evidenceItem}/files/{file}

Removes a file from a piece of evidence and deletes it from storage. The removal is kept in the audit log.

Authentication

Send an API token as a bearer token. This endpoint needs a read and write token, made by an editor, admin or owner. 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.

Response

204 No content

Empty body.

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.
403The token is read-only (message: “This token is read-only. Create a read and write token to make changes.”). Or: The token’s owner is a viewer (“Viewers can read everything but can’t change it.”), or the workspace’s editing is paused (a billing message, e.g. “Your trial has ended, so editing is paused. …”).
404The token belongs to another workspace, or its owner is no longer a member. Or: File not on this item.

Every error is JSON with a message. See Errors.

Next →List policies
curl -X DELETE "https://api.bynh.io/api/v1/workspaces/dokan/evidence/items/1/files/1" \
  -H "Authorization: Bearer $BYNH_TOKEN" \
  -H "Accept: application/json"

Response204 No content

Empty

No body. The change is saved.

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