Skip to content
bynhDocs

Assign a requirement

PATCH/workspaces/{workspace}/evidence/requirements/{requirementId}

Sets who owns a requirement and a short note on what’s missing. The note replaces the generated “missing” sentence.

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.

  • requirementIdintegerRequired

    Requirement id (numeric only). Must belong to a framework you follow, otherwise 404.

Request body

application/json
  • owner_idinteger, nullable

    A member of this workspace (any role). null clears it. Error: “Choose someone in this workspace.”

  • notestring, nullablemax 200

    Trimmed; empty clears it. Error: “Keep the note to 200 characters.”

Response

200 OK

The requirement row as in the framework requirements list.

  • idintegerRequirement id (use it in PATCH /evidence/requirements/{requirementId} and in requirement_ids).
  • codestringe.g. A.5.15, CC6.1, 8.3.1.
  • titlestringLocalized title.
  • sectionstring|nullLocalized section.
  • metbooleanTrue when mapped evidence is current or due, or a mapped published policy is in force.
  • missingstring|nullLocalized sentence on what’s missing (your note wins); null when met.
  • notestring|nullYour note on the requirement.
  • owner{id, name}|nullAssigned owner, else the owner of mapped evidence.
  • reminded_atstring|nullLast reminder.
  • evidence[]{id, title, status}Mapped evidence items.
  • policies[]{id, title, in_force}Mapped policies.

Rate limits

This endpoint counts toward your general limit of 120 requests a minute and its own limit of 60 a minute. Its own limit answers 429 without Retry-After; wait and try again.

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: Requirement not found in a followed framework.
422owner_id isn’t a member, or note is over 200 characters.
429evidence-writes limit (60/min).

Every error is JSON with a message. See Errors.

Next →List evidence
curl -X PATCH "https://api.bynh.io/api/v1/workspaces/dokan/evidence/requirements/1" \
  -H "Authorization: Bearer $BYNH_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "owner_id": 21,
    "note": "Restore test report from Q3 still to upload"
  }'

Response200 OK

application/json
{
  "data": {
    "id": 1239,
    "code": "A.8.13",
    "title": "Information backup",
    "section": "Technological controls",
    "met": false,
    "missing": "Restore test report from Q3 still to upload",
    "note": "Restore test report from Q3 still to upload",
    "owner": {
      "id": 21,
      "name": "Faisal Alharbi"
    },
    "reminded_at": null,
    "evidence": [
      {
        "id": 35,
        "title": "Nightly database backup",
        "status": "overdue"
      }
    ],
    "policies": []
  }
}

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