Permissions

How to send an API key, what a key reaches, and the permission each action needs.

Reference

At a glance

  • Send the key in every request as Authorization: Bearer EXAMPLE_API_KEY.
  • Each action needs one permission. A key without it gets 403 missing_permission, and the message names the permission to add.
  • A key reaches every active team in the workspace. It acts as a member and can never act as an Owner or Admin.

Send the key

bash
curl -X POST https://app.alchex.com/api/v1/tools/read_document/list_registers \  -H "Authorization: Bearer EXAMPLE_API_KEY"

A request with no key answers 401 missing_key. A revoked, expired or unknown key answers 401 invalid_key.

What a key reaches

  • A key works in every active team of its workspace, as a team member who can write. It never sees another workspace.
  • Its changes carry the key's name and the reason "Sent by API key".
  • Something the key cannot reach answers 404, the same as something that does not exist.

Permissions

Give a key only the permissions its program uses. You choose them when you create the key.

Registers

PermissionLets the keyActions
registers:rows:readRead rows of a register, findings, projects or controlsread_document/rows, list_registers, list_columns
registers:rows:addAdd rows to a list registerwrite_record/add, list_registers, list_columns
registers:rows:changeChange a list register rowwrite_record/change, list_registers, list_columns
registers:rows:deleteDelete a list register row for good (refused: see below)write_record/delete
registers:records:readRead one row, finding, control, run or receiptread_document/record
registers:changes:readRead what changed in a register or documentread_document/changes
registers:findings:changeChange an existing findingwrite_record/change_finding
registers:projects:writeAdd projects, and change projects, tasks and milestoneswrite_project/add_project, write_project/change_project

list_registers and list_columns work with any one of the three row permissions.

Documents and folders

PermissionLets the keyActions
documents:searchSearch documents, registers and findingsread_document/search
documents:text:readRead a document's textread_document/document
documents:createCreate a draftwrite_document/create
documents:editEdit a draft's textwrite_document/edit
documents:commentComment, reply, resolve and reopenwrite_document/comment
documents:send-for-approvalSend a document to a person for approvalwrite_document/send_for_approval
documents:deleteArchive a documentwrite_document/archive
folders:writeCreate, rename and move folders, and file recordswrite_folder/create, write_folder/update, write_folder/file
folders:deleteDelete a folder (refused: see below)write_folder/delete

documents:delete keeps its name, but it only archives. A key cannot delete a document: deleting needs a team Owner, and a key is never one.

For the same reason, a key with registers:rows:delete or folders:delete is refused when it deletes a row or a folder.

Readiness

PermissionLets the keyActions
standards:status:readRead a standard's readiness, and a run's evidenceread_document/readiness, read_document/evidence

Never open to a key

These are refused whatever the key's permissions:

  • Publish a document, or approve or send one back.
  • Add or change columns, tables or registers.
  • Raise a new finding, or remove a finding or control.
  • Remove a project, task or milestone.