VocalDocscontracts 1.65.0

Approve a refused sign-in by creating its Member

POST /v1/members/sign-in-attempts/approve

PropertyValue
Operationapprove_sign_in
GroupMembers
Scopemembers:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited identity.member.approve (mutation)
Released in1.12.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Creates the Member of the attempt's email with the role, as invited until the next sign-in links it, and removes the attempt; not_found when no attempt has the email, validation_failed when a Member already holds it. From 1.51.0 its invitation lapses 72 hours later, as an invitation's does. From 1.34.0 a write that gives the operator role is refused with forbidden and the one detail operator_role_not_grantable, at path /role, in any Organization but the operator Organization, whoever asks, and there to any caller that does not hold the operator role; a write that keeps the role or takes it away is not a grant. Phase 0 accepts a Member ID token for this route, so an operator signed in to the cockpit makes the write.

Request

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

curl -X POST "$VOCAL_API/v1/members/sign-in-attempts/approve" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "email": "<email>", "role": "owner" }'

Parameters

NameInTypeRequiredDescription
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: SignInApproveRequest.

FieldTypeRequiredDescription
display_namestringnoA display name.
emailstringyesAn email address, compared ignoring case.
roleMemberRoleyes

Responses

StatusContent typeShapeError codes
201application/jsonMember
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeidempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 201 answer

The shape is Member.

FieldTypeRequiredDescription
created_atTimestampyes
display_namestring or nullyesA display name.
emailstringyesAn email address, compared ignoring case.
idMemberIdyes
invitation_expires_atTimestamp or nullnoWhen the invitation of an invited Member lapses (1.51.0): 72 hours after the invitation or the approval that created it. Null once the Member is active or disabled, and for a Member the seed created; absent from an api before 1.51.0. After it a sign-in with the email is refused with invitation_expired.
invited_byMemberId or nullnoThe Member who invited or approved this Member (1.51.0), or null when the seed or an operator command created it; absent from an api before 1.51.0.
last_sign_in_atTimestamp or nullyesThe last sign-in, or null before the first.
object"member"yes
revisionintegeryesCounts writes to the Member; returned as the ETag and required in If-Match.
roleMemberRoleyes
statusMemberStatusyes
updated_atTimestampyes