PledgeDocumentation
Product site ↗

Administer

Tenants and principals

Bootstrap an organization, issue credentials, and manage access.

On this page

Create a tenant

Prerequisite: a running API and its platform administrator credential. Prepare the protected header file from API conventions using that credential.

umask 077
curl --fail-with-body --cacert "$CA_CERT" -H @pledge-auth.header \
  -H 'Content-Type: application/json' -X POST "$API/tenants" \
  --data '{"slug":"acme","name":"Acme Health Plan","admin":"admin"}' \
  --output tenant-created.json

Expect 201 Created with tenant, admin, and key. The issued credential is in key.key and is returned only at issue. Store it in your approved secret manager, then remove the local response file. A tenant slug is immutable, 3–16 lowercase letters or digits. Reusing a slug returns 409.

Switch to the tenant administrator key for subsequent organization administration. GET /me should identify acme.admin and tenant acme.

Add a principal

curl --fail-with-body --cacert "$CA_CERT" -H @pledge-auth.header \
  -H 'Content-Type: application/json' -X POST "$API/tenants/acme/principals" \
  --data '{"name":"integration","display_name":"Claims integration","role":"submitter"}'

The returned principal ID is tenant-scoped, such as acme.integration. Roles are submitter, reviewer, and admin. Creating a principal does not automatically issue its API key or configure browser sign-in.

Issue and rotate a key

umask 077
curl --fail-with-body --cacert "$CA_CERT" -H @pledge-auth.header \
  -H 'Content-Type: application/json' -X POST "$API/principals/acme.integration/keys" \
  --data '{"expires_in_days":90}' --output issued-key.json

The response includes id, prefix, key, and expires_at. Keys default to 90 days and accept 1–365 days. For rotation, issue a second key, install it in the client, verify GET /me, then revoke the old key with DELETE /keys/{id}. Store only the new credential in your secret manager; keep the key ID for future revocation.

Disable access

POST /principals/{id}/disable disables a principal; /enable clears its principal disablement. Enabling a principal does not reactivate a disabled tenant or undo key revocation. Tenant-wide disable and enable operations are POST /tenants/{slug}/disable and /enable.

API authentication checks current directory/key state. Do not rely on deleting a client-side credential as the revocation mechanism.

Configure the organization before admitting claims

Create staff principals and establish OIDC sign-in. Publish the relevant documents, rules, schedules, correspondence, contact, and access-policy configuration. Load the reference data required by the enabled domain module. For healthcare, this includes coverage records and opening balances. Use the configuration lifecycle rather than writing database rows.

Confirm at least one submitter can submit, one assigned reviewer can decide, and a member cannot read internal decision material. Validate those paths with synthetic data before production onboarding.

Pledge documentation · Use the documentation and artifacts for your deployed release.