Skip to content
Proofwork Docs

API Reference

Base URL: https://app.proofwork.today/api/v1

Auth: Bearer token — generate from Settings → API Keys.

All requests require a Bearer token in the Authorization header:

Terminal window
curl -s -H "Authorization: Bearer pw_..." https://app.proofwork.today/api/v1/account

API keys are created in the app under Settings → API Keys. The token is shown once — save it immediately.

ResourceListCreateGetUpdateArchiveRestore
AccountGET /accountPATCH /account
ThingsGET /thingsPOST /thingsGET /things/:idPATCH /things/:idPATCH .../archivePATCH .../restore
WorkflowsGET /workflowsPOST /workflowsGET /workflows/:idPATCH /workflows/:idPATCH .../archivePATCH .../restore
RequirementsGET /workflows/:id/requirementsPOST /workflows/:id/requirementsGET .../requirements/:idPATCH .../requirements/:idPATCH .../archivePATCH .../restore
UsersGET /usersPOST /usersGET /users/:idPATCH /users/:idPATCH .../archivePATCH .../restore
EventsGET /eventsGET /events/:id
Terminal window
BASE="https://app.proofwork.today/api/v1"
AUTH="Authorization: Bearer ***"
# Create a workflow
ASGN=$(curl -s -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"Night Clean"}' $BASE/workflows)
ASGN_ID=$(echo $ASGN | jq -r '.id')
# Add a requirement to the workflow
curl -s -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"Restroom Check","requirement_type":"select_option","config":{"choices":["8F","6F","4F"]}}' \
$BASE/workflows/$ASGN_ID/requirements
Terminal window
curl -s -H "$AUTH" "$BASE/events?type=submission&from=2026-07-01T00:00:00Z&limit=50"

Every thing belongs to exactly one thing type, an account-declared kind of thing created in the app under Things → Manage Types (/things/types) (there is no thing-type endpoint). The type carries tracked_byquantity or state — and, for quantity-tracked types, the unit. Address a thing by its numeric id.

POST /things fields:

FieldNotes
nameRequired.
thing_type_idRequired. Must be one of your account’s active types.
code_valueOptional; a value is generated when omitted.
detailsOptional object.
label_idsOptional array of label ids from your account.

PATCH /things/:id accepts name, details, label_ids, opening_quantity and opening_state. The thing’s type cannot be changed after creation.

Terminal window
curl -s -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"North Gate","thing_type_id":7,"code_value":"GATE-001"}' $BASE/things

A thing response includes id, name, code_value, thing_type_id, thing_type (the type’s name), tracked_by, unit, details, labels, archived_at, created_at and updated_at. GET /things/:id and POST /things also return qr_code and verify_token.

Terminal window
curl -s -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"Naseer","phone":"0820000003","pin":"5678","role":"worker"}' $BASE/users

All endpoints return JSON. Errors follow a consistent format:

{"error": "not found"}

List endpoints return only active (non-archived) resources by default. Use archive/restore endpoints to manage lifecycle.

The canonical reference is the OpenAPI 3.0.3 spec:

  • Live spec: GET /docs/openapi on the app
  • Interactive docs: Scalar UI on the app

Import the spec into Postman, use with codegen tools, or feed to your AI agent.