Create a grant
As the subject owner, callPOST /v1/tenants/:tenant_id/grants. You must hold the tenant_admin role on your tenant to create grants.
201 Created response includes the full grant record:
Request body fields
| Field | Required | Description |
|---|---|---|
subject_type | Yes | "entity" or "individual" |
subject_id | Yes | The subject ID you own |
grantee_tenant_id | Yes | The tenant ID of the counterparty you want to grant access to |
scopes | Yes | Non-empty array of scope strings (see below) |
expires_at | No | ISO 8601 datetime after which the grant is no longer valid |
Grant scopes explained
Each scope controls a specific category of read operation. Grant only the scopes your counterparty actually needs.read_latest
read_latest
Allows the grantee to call
GET /v1/subjects/:subject_type/:subject_id to retrieve the current resolved state of the subject. This is the minimum scope for any useful integration — without it, the grantee cannot read any data about the subject.read_lineage
read_lineage
Allows the grantee to list the full snapshot history (
/history, /snapshots) and retrieve any specific snapshot by version number (/snapshots/:snapshot_version). Grant this scope when the counterparty needs to audit changes over time or reconstruct the identity at a historical point.read_snapshot_by_id
read_snapshot_by_id
Allows the grantee to call
GET /v1/snapshots/:snapshot_id to look up a snapshot directly by its UUID. Useful when the grantee receives a snapshot_id out-of-band (for example, in a webhook payload or a refresh request fulfillment) and needs to retrieve the corresponding envelope.read_diff
read_diff
Allows the grantee to call the diff endpoints (
/diff?from_version=N&to_version=M and /snapshots/:from/diff/:to) to compute a JSON Patch between two versions. Use this when the counterparty runs their own change-detection logic or needs to audit exactly what changed between versions.List active grants
To see all grants you have issued for a subject, callGET /v1/tenants/:tenant_id/subjects/:subject_type/:subject_id/grants. You must be the subject owner.
Revoke a grant
CallPOST /v1/tenants/:tenant_id/grants/:grant_id/revoke to immediately end a counterparty’s access. Only active grants can be revoked — attempting to revoke an already-revoked or expired grant returns 409 Conflict.
"status": "revoked":
Grants are append-only records in Tally. Revoking a grant sets its status to
"revoked" but does not delete the underlying row. This design preserves a complete audit trail of which tenants had access to a subject and for how long. You cannot modify a grant after creation — if you need to change the scopes or expiry, revoke the existing grant and create a new one.Accessing granted subjects (as grantee)
If another tenant has granted you access to one of their subjects, callGET /v1/tenants/:tenant_id/accessible-subjects to list all subjects you can reach via active grants.
limit (default 50, max 200) and a cursor token from page.next_cursor.
Reading granted subject data
Once you have a grant, you read the subject’s data using the exact same endpoints you use for subjects you own — the tenant-scoped variants:tenant_reader role, and your tenant must hold an active grant that includes the required scope. If either check fails, the request returns 403 Forbidden.