VocalDocscontracts 1.65.0

Read the signed-in Member

GET /v1/members/me

PropertyValue
Operationget_current_member
GroupMembers
Scopeorganization:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A configuration read; Members are Organization data, not Call content.
Released in1.35.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers the Member record of the Member session that makes the request, with the id of its Organization. Any valid Member session reads its own record, whatever its role: the access matrix (access-control-and-isolation.md section 4.2) grants every role a read of its Members row, and no members:read is needed, which only owner, admin and operator hold in Phase 0. The descriptor names organization:read, a permission every role holds, because a route names one permission; it is not what admits the caller. The route is for a Member session only: the api refuses every API key with forbidden, whatever its scopes, because a key is not a Member. It exists so that a console signed in as a developer or an agent_operator, who may start a demo Call (calls:write) but cannot list Members, reads its own role. From 1.45.0 a Member ID token whose identity is not a Member is refused with forbidden and one detail at path /headers/authorization whose code is a SignInRefusalCode: sign_in_pending (the sign-in is kept as a sign-in attempt of its verified email, waiting for an operator to approve it), member_disabled, email_unverified, email_held (the verified email belongs to a Member linked to another identity), ambiguous_membership, unknown_role or, from 1.51.0, invitation_expired (the Member of the verified email is invited and its invitation lapsed). The detail carries a code and fixed words, never the email or the identity. A sign-in with no Member while the Member pool serves no Organization, and an API key, are refused with no detail. The refusal comes before the route, so every public route answers it to such a token; this read is the one a console asks to choose between its holding page and its refused page.

Request

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

curl "$VOCAL_API/v1/members/me" \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Responses

StatusContent typeShapeError codes
200application/jsonMemberSelf
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is MemberSelf.

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
organization_idOrganizationIdyesThe Organization the Member belongs to, the one its session is signed in to.
revisionintegeryesCounts writes to the Member; returned as the ETag and required in If-Match.
roleMemberRoleyes
statusMemberStatusyes
updated_atTimestampyes