Skip to content
API Reference

Retrieve

invitations.retrieve(strtoken, InvitationRetrieveParams**kwargs) -> InvitationRetrieveResponse
GET/invitations/{token}

View invitation details by token without consuming the token

ParametersExpand Collapse
token: str
minLength1
maxLength500
x_client_request_id: Optional[str]
formatuuid
ReturnsExpand Collapse
class InvitationRetrieveResponse:

Public invitation details viewable by token

created_by_name: str

Name of the user who sent the invitation

email: str

Email address for the invitation

formatemail
expires_at: datetime

When the invitation expires

formatdate-time
organization_name: str

Name of the organization being invited to

Role that will be assigned when invitation is accepted

Accepts one of the following:
"org_admin"
"org_member"
"org_viewer"

Status of an invitation

Accepts one of the following:
"pending"
"accepted"
"expired"
"revoked"

Retrieve

from keycardai_api import KeycardAPI

client = KeycardAPI()
invitation = client.invitations.retrieve(
    token="token",
)
print(invitation.created_by_name)
{
  "created_by_name": "created_by_name",
  "email": "dev@stainless.com",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "organization_name": "organization_name",
  "role": "org_admin",
  "status": "pending"
}
Returns Examples
{
  "created_by_name": "created_by_name",
  "email": "dev@stainless.com",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "organization_name": "organization_name",
  "role": "org_admin",
  "status": "pending"
}