VocalDocscontracts 1.65.0

Approve a pending reveal grant

POST /v1/reveal-grants/{reveal_grant_id}/approve

PropertyValue
Operationapprove_reveal_grant
GroupCapture windows and reveal grants
Scopereveal_grants:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited reveal_grant.approve (mutation)
Released in1.57.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Makes a pending grant active for its duration and emits content.reveal_granted (1.57.0). Only an owner or auditor other than the requester decides (403 forbidden, detail approver_role_required or approver_is_requester); a grant that is no longer pending answers 409 reveal_grant_conflict with the reason not_pending.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the reveal_grants:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/reveal-grants/rvg_.../approve" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
reveal_grant_idpathRevealGrantIdyesThe id of a reveal grant, a time-boxed right to read named content classes of named Calls: rvg_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: RevealGrantDecisionRequest.

Responses

StatusContent typeShapeError codes
200application/jsonRevealGrant
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopereveal_grant_conflict
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is RevealGrant.

FieldTypeRequiredDescription
agent_idAgentId or nullyes
approval_requiredbooleanyesTrue when the profile required a second approver at the request.
call_idsarray or nullyesThe named Calls; null for an Agent scope.
classesarray of ContentLogClassyes
created_atTimestampyes
decided_atTimestamp or nullyes
decided_byMemberId or nullyesThe approver or decliner; null under reveal_approval: none.
duration_minutesintegeryes
expires_atTimestamp or nullyesWhen an active grant ends; for a pending grant, when the request lapses.
granteeRevealGranteeyes
idRevealGrantIdyes
object"reveal_grant"yes
reasonstring or nullnoWhy the content is needed, for the access review: free text that can quote a caller, stored as a content pair and scrubbed at retention_days. Answered only by GET /v1/reveal-grants/{reveal_grant_id}, an audited content read; null once scrubbed.
requested_byMemberIdyes
revoked_atTimestamp or nullyes
revoked_byMemberId or nullyes
starts_atTimestamp or nullyesWhen the grant became active; null until then.
statusRevealGrantStatusyes
window_fromTimestamp or nullyes
window_toTimestamp or nullyes