Create a policy
/workspaces/{workspace}/policiesCreates a policy with a draft version 1. Start from a template to get its text, summary and requirement mapping. Nothing is public until the draft is published.
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_•••••••HeaderPath parameters
workspacestringRequiredYour workspace slug, e.g. dokan.
Request body
application/jsontitlestringRequiredmax 160Name.
visibilityenumRequiredWhere it appears. One of
public,nda,internal.review_every_daysenumRequiredReview cadence. One of
90,180,365,730.templateenumFills body, summary and requirement_ids when you don’t send them. One of
data-retention,business-continuity,vendor-management,access-control,incident-response,acceptable-use.summarystring, nullablemax 280One-line summary.
owner_idinteger, nullableA member of this workspace. Defaults to you on create.
bodystring, nullablemax 60000Markdown for version 1 (create only; cleaned). On PATCH it is validated but ignored — edit text through the draft endpoints.
requirement_idsstring, nullablemax 200Replaces the mapping; each must be a requirement of a followed framework.
Response
201 CreatedThe policy detail.
idintegerPolicy id (used in paths).slugstringUsed in the public URL.titlestringName.summarystring|nullOne-line summary.owner{id, name}|nullOwner.visibilityenumWhere it appears. One ofpublic,nda,internal.visibility_labelstringLocalized.review_every_daysenumReview cadence. One of90,180,365,730.next_review_atstring|nullYYYY-MM-DD.statusenumDerived from the open version and review date. One ofdraft,in_review,changes_requested,published,review_due,overdue.published_versioninteger|nullPublished version number.published_atstring|nullISO 8601.open_versionobject|nullnumber, status (draft | in_review | changes_requested), reviewer {id, name}|null, waiting_on_you (for the token owner).taglinestringLocalized one-liner, e.g. “v3 · v4 in draft”.requirements_countintegerMapped requirements.requirements[]objectid, code, title, framework {slug, short_name}, met.closes{gaps, frameworks}Mapped requirements in followed frameworks that aren’t met today (what publishing could close).publishedVersion|nullPublished version with body.draftVersion|nullOpen version with body.versions[]VersionAll versions, body null. Version: id, number, status (draft | in_review | changes_requested | published | superseded), body, change_summary, in_changelog, author, reviewer, requested_by, review_note, review_requested_at, reviewer_note, reviewed_at, published_by, published_at, created_at, updated_at.public_urlstring|nullSet only for public policies with a published version.trust_domainstringCustom domain or {slug}.bynh.io.people[]{id, name, role}Members who can edit.summary_excerptstring|nullExcerpt of the published body.
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
Every error is JSON with a message. See Errors.