Skip to content
API Reference

Invitations

Create
client.Organizations.Invitations.New(ctx, organizationID, params) (*Invitation, error)
POST/organizations/{organization_id}/invitations
List
client.Organizations.Invitations.List(ctx, organizationID, params) (*OrganizationInvitationListResponse, error)
GET/organizations/{organization_id}/invitations
Delete
client.Organizations.Invitations.Delete(ctx, invitationID, params) error
DELETE/organizations/{organization_id}/invitations/{invitation_id}
ModelsExpand Collapse
type Invitation struct{…}
ID string

Identifier for API resources. A 26-char nanoid (URL/DNS safe).

minLength1
maxLength255
CreatedAt Time

The time the entity was created in utc

formatdate-time
CreatedBy string

ID of the user who created the invitation

minLength1
maxLength255
Email string

Email address for the invitation

formatemail
ExpiresAt Time

When the invitation expires

formatdate-time
OrganizationID string

Identifier for API resources. A 26-char nanoid (URL/DNS safe).

minLength1
maxLength255

Role that will be assigned when invitation is accepted

Accepts one of the following:
const OrganizationRoleOrgAdmin OrganizationRole = "org_admin"
const OrganizationRoleOrgMember OrganizationRole = "org_member"
const OrganizationRoleOrgViewer OrganizationRole = "org_viewer"

Status of an invitation

Accepts one of the following:
const InvitationStatusPending InvitationStatus = "pending"
const InvitationStatusAccepted InvitationStatus = "accepted"
const InvitationStatusExpired InvitationStatus = "expired"
const InvitationStatusRevoked InvitationStatus = "revoked"
UpdatedAt Time

The time the entity was mostly recently updated in utc

formatdate-time
Permissions map[string, map[string, bool]]optional

Permissions granted to the authenticated principal for this resource. Only populated when the 'expand[]=permissions' query parameter is provided. Keys are resource types (e.g., "organizations"), values are objects mapping permission names to boolean values indicating if the permission is granted.

type InvitationStatus string

Status of an invitation

Accepts one of the following:
const InvitationStatusPending InvitationStatus = "pending"
const InvitationStatusAccepted InvitationStatus = "accepted"
const InvitationStatusExpired InvitationStatus = "expired"
const InvitationStatusRevoked InvitationStatus = "revoked"