Skip to content
bynhDocs

End someone’s access

POST/workspaces/{workspace}/access/requests/{accessRequest}/revoke

Ends approved access early. Their private link stops working at once. No email is sent.

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.

  • accessRequestintegerRequired

    Access request id.

Response

200 OK

The list row (inbox_item_id is null).

  • idintegerAccess request id.
  • requester{name, email, title}Who asked.
  • personal_emailbooleanEmail is from a personal provider (e.g. gmail.com).
  • companystringCompany.
  • documents[]{id, title}Documents asked for.
  • documents_labelstringTitles joined, or “All private documents”.
  • all_documentsbooleanAsked for every requestable document (more than 2).
  • reasonstring|nullLocalized reason label (Vendor review, Procurement, Audit, Due diligence, Contract renewal, Something else).
  • notestring|nullRequester’s note.
  • nda_signedbooleanSigned your NDA.
  • nda_versionstring|nullNDA version signed.
  • stateenumended: approved but revoked or past access_expires_at. One of waiting, approved, declined, ended.
  • auto_approvedbooleanApproved by an approved email domain.
  • decided_bystring|nullName.
  • decided_atstring|nullISO 8601.
  • access_expires_atstring|nullISO 8601.
  • revoked_atstring|nullISO 8601.
  • revoked_bystring|nullName.
  • inbox_item_idinteger|nullLinked inbox item (list only; null on revoke).
  • created_atstringISO 8601.

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.
422Access isn’t live: “This access has already ended.” (errors.status).

Every error is JSON with a message. See Errors.

Next →Resend an access link
curl -X POST "https://api.bynh.io/api/v1/workspaces/dokan/access/requests/1/revoke" \
  -H "Authorization: Bearer $BYNH_TOKEN" \
  -H "Accept: application/json"

Response200 OK

application/json
{
  "data": {
    "id": 88,
    "requester": {
      "name": "Noura Alsaud",
      "email": "noura@almarai-retail.sa",
      "title": "Head of vendor risk"
    },
    "personal_email": false,
    "company": "Almarai Retail",
    "documents": [
      {
        "id": 412,
        "title": "ISO 27001 certificate 2025"
      },
      {
        "id": 415,
        "title": "SOC 2 Type II report"
      }
    ],
    "documents_label": "ISO 27001 certificate 2025, SOC 2 Type II report",
    "all_documents": false,
    "reason": "Vendor review",
    "note": "Annual supplier review.",
    "nda_signed": true,
    "nda_version": "v2",
    "state": "ended",
    "auto_approved": false,
    "decided_by": "Sara Alqahtani",
    "decided_at": "2026-09-30T14:02:00+00:00",
    "access_expires_at": "2026-10-30T14:02:00+00:00",
    "revoked_at": "2026-10-01T08:20:00+00:00",
    "revoked_by": "Sara Alqahtani",
    "inbox_item_id": null,
    "created_at": "2026-09-30T13:22:05+00:00"
  }
}

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