Skip to content
API Reference

Organizations

Create
client.Organizations.New(ctx, params) (*Organization, error)
POST/organizations
List
client.Organizations.List(ctx, params) (*OrganizationListResponse, error)
GET/organizations
Retrieve
client.Organizations.Get(ctx, organizationID, params) (*Organization, error)
GET/organizations/{organization_id}
Update
client.Organizations.Update(ctx, organizationID, params) (*Organization, error)
PATCH/organizations/{organization_id}
Exchange Token
client.Organizations.ExchangeToken(ctx, organizationID, body) (*TokenResponse, error)
POST/organizations/{organization_id}/token
List available roles
client.Organizations.ListRoles(ctx, organizationID, params) (*OrganizationListRolesResponse, error)
GET/organizations/{organization_id}/roles
List Identities
client.Organizations.ListIdentities(ctx, organizationID, params) (*OrganizationListIdentitiesResponse, error)
GET/organizations/{organization_id}/identities
ModelsExpand Collapse
type Organization 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
Label string

A domain name segment for the entity, often derived from the name.

maxLength63
Name string

A name for the entity to be displayed in UI

SSOEnabled bool

Whether SSO is enabled for this organization

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 PageInfoCursor struct{…}

Pagination information using cursor-based pagination

HasNextPage bool

Whether there are more items after the current page

HasPrevPage bool

Whether there are more items before the current page

EndCursor stringoptional

Cursor pointing to the last item in the current page

minLength1
maxLength255
StartCursor stringoptional

Cursor pointing to the first item in the current page

minLength1
maxLength255
type RoleScope string

The scope at which a role can be assigned.

  • organization: Roles that apply at the organization level (e.g., org_admin)
  • zone: Roles that apply at the zone level (e.g., zone_manager)
Accepts one of the following:
const RoleScopeOrganization RoleScope = "organization"
const RoleScopeZone RoleScope = "zone"
type TokenResponse struct{…}

OAuth2-style token response for M2M tokens

AccessToken string

The M2M access token

TokenType string

Token type (always "Bearer")

ExpiresIn int64optional

Token expiration time in seconds

OrganizationsUsers

List
client.Organizations.Users.List(ctx, organizationID, params) (*OrganizationUserListResponse, error)
GET/organizations/{organization_id}/users
Retrieve
client.Organizations.Users.Get(ctx, userID, params) (*OrganizationUser, error)
GET/organizations/{organization_id}/users/{user_id}
Update
client.Organizations.Users.Update(ctx, userID, params) (*OrganizationUser, error)
PATCH/organizations/{organization_id}/users/{user_id}
Delete
client.Organizations.Users.Delete(ctx, userID, params) error
DELETE/organizations/{organization_id}/users/{user_id}
ModelsExpand Collapse
type OrganizationRole string

User's role in the organization

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

Status of organization membership

Accepts one of the following:
const OrganizationStatusActive OrganizationStatus = "active"
const OrganizationStatusDisabled OrganizationStatus = "disabled"
type OrganizationUser struct{…}
ID string

The keycard account ID

minLength1
maxLength255
CreatedAt Time

The time the entity was created in utc

formatdate-time

User's role in the organization

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

Identity provider issuer

formaturi

Status of organization membership

Accepts one of the following:
const OrganizationStatusActive OrganizationStatus = "active"
const OrganizationStatusDisabled OrganizationStatus = "disabled"
UpdatedAt Time

The time the entity was mostly recently updated in utc

formatdate-time
Email stringoptional

User email address

formatemail
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.

OrganizationsInvitations

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"

OrganizationsService Accounts

Create
client.Organizations.ServiceAccounts.New(ctx, organizationID, params) (*ServiceAccount, error)
POST/organizations/{organization_id}/service-accounts
List
client.Organizations.ServiceAccounts.List(ctx, organizationID, params) (*OrganizationServiceAccountListResponse, error)
GET/organizations/{organization_id}/service-accounts
Retrieve
client.Organizations.ServiceAccounts.Get(ctx, serviceAccountID, params) (*ServiceAccount, error)
GET/organizations/{organization_id}/service-accounts/{service_account_id}
Update
client.Organizations.ServiceAccounts.Update(ctx, serviceAccountID, params) (*ServiceAccount, error)
PATCH/organizations/{organization_id}/service-accounts/{service_account_id}
Delete
client.Organizations.ServiceAccounts.Delete(ctx, serviceAccountID, params) error
DELETE/organizations/{organization_id}/service-accounts/{service_account_id}
ModelsExpand Collapse
type ServiceAccount 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
Name string

A name for the entity to be displayed in UI

UpdatedAt Time

The time the entity was mostly recently updated in utc

formatdate-time
Description stringoptional

Optional description of the service account

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.

OrganizationsService AccountsCredentials

Create
client.Organizations.ServiceAccounts.Credentials.New(ctx, serviceAccountID, params) (*OrganizationServiceAccountCredentialNewResponse, error)
POST/organizations/{organization_id}/service-accounts/{service_account_id}/credentials
List
client.Organizations.ServiceAccounts.Credentials.List(ctx, serviceAccountID, params) (*OrganizationServiceAccountCredentialListResponse, error)
GET/organizations/{organization_id}/service-accounts/{service_account_id}/credentials
Retrieve
client.Organizations.ServiceAccounts.Credentials.Get(ctx, credentialID, params) (*ServiceAccountCredential, error)
GET/organizations/{organization_id}/service-accounts/{service_account_id}/credentials/{credential_id}
Update
client.Organizations.ServiceAccounts.Credentials.Update(ctx, credentialID, params) (*ServiceAccountCredential, error)
PATCH/organizations/{organization_id}/service-accounts/{service_account_id}/credentials/{credential_id}
Delete
client.Organizations.ServiceAccounts.Credentials.Delete(ctx, credentialID, params) error
DELETE/organizations/{organization_id}/service-accounts/{service_account_id}/credentials/{credential_id}
ModelsExpand Collapse
type ServiceAccountCredential struct{…}

Service account credential (without secret)

ID string

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

minLength1
maxLength255
ClientID string

The client ID for authentication

CreatedAt Time

The time the entity was created in utc

formatdate-time
Name string

A name for the entity to be displayed in UI

Description stringoptional

Optional description of the credential

LastUsedAt Timeoptional

When the credential was last used

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.

OrganizationsSSO Connection

Enable
client.Organizations.SSOConnection.Enable(ctx, organizationID, params) (*SSOConnection, error)
POST/organizations/{organization_id}/sso-connection
Retrieve
client.Organizations.SSOConnection.Get(ctx, organizationID, params) (*SSOConnection, error)
GET/organizations/{organization_id}/sso-connection
Update
client.Organizations.SSOConnection.Update(ctx, organizationID, params) (*SSOConnection, error)
PATCH/organizations/{organization_id}/sso-connection
Disable
client.Organizations.SSOConnection.Disable(ctx, organizationID, body) error
DELETE/organizations/{organization_id}/sso-connection
ModelsExpand Collapse
type SSOConnection struct{…}

SSO connection configuration for an organization

ID string

Unique identifier for the SSO connection

ClientID string

OAuth 2.0 client ID

ClientSecretSet bool

Whether a client secret is configured

CreatedAt Time

The time the entity was created in utc

formatdate-time
Identifier string

SSO provider identifier (e.g., issuer URL)

minLength1
maxLength2048
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.

Protocols SSOConnectionProtocoloptional

Protocol configuration for SSO connection

Oauth2 SSOConnectionProtocolOauth2optional

OAuth 2.0 protocol configuration for SSO connection

AuthorizationEndpoint stringoptional

OAuth 2.0 authorization endpoint

formaturi
CodeChallengeMethodsSupported []stringoptional

Supported PKCE code challenge methods

JwksUri stringoptional

JSON Web Key Set endpoint

formaturi
RegistrationEndpoint stringoptional

OAuth 2.0 registration endpoint

formaturi
ScopesSupported []stringoptional

Supported OAuth 2.0 scopes

TokenEndpoint stringoptional

OAuth 2.0 token endpoint

formaturi
Openid SSOConnectionProtocolOpenidoptional

OpenID Connect protocol configuration for SSO connection

UserinfoEndpoint stringoptional

OpenID Connect UserInfo endpoint

formaturi
type SSOConnectionProtocol struct{…}

Protocol configuration for SSO connection

Oauth2 SSOConnectionProtocolOauth2optional

OAuth 2.0 protocol configuration for SSO connection

AuthorizationEndpoint stringoptional

OAuth 2.0 authorization endpoint

formaturi
CodeChallengeMethodsSupported []stringoptional

Supported PKCE code challenge methods

JwksUri stringoptional

JSON Web Key Set endpoint

formaturi
RegistrationEndpoint stringoptional

OAuth 2.0 registration endpoint

formaturi
ScopesSupported []stringoptional

Supported OAuth 2.0 scopes

TokenEndpoint stringoptional

OAuth 2.0 token endpoint

formaturi
Openid SSOConnectionProtocolOpenidoptional

OpenID Connect protocol configuration for SSO connection

UserinfoEndpoint stringoptional

OpenID Connect UserInfo endpoint

formaturi