---
seo:
  description: >-
    Manage organizations, members, invitations, Roles, OAuth applications,
    single sign-on and billing. Every request carries an access token: see
    Authentication.
sidebar:
  label: Overview
title: Auth API
---
Manage organizations, members, invitations, Roles, OAuth applications, single sign-on and billing. Every request carries an access token: see [Authentication](/api#authentication).

Version 1.0.0

Base URL: `https://auth.kapten.io`

## Organizations

Organizations the caller belongs to.

- [`GET /organizations`](/api/auth/organizations/list-organizations) — List the caller's organizations.
- [`POST /organizations`](/api/auth/organizations/create-organization) — Create an organization.
- [`GET /organizations/{organizationId}`](/api/auth/organizations/get-organization) — Get an organization.
- [`PATCH /organizations/{organizationId}`](/api/auth/organizations/update-organization) — Update an organization.
- [`DELETE /organizations/{organizationId}`](/api/auth/organizations/delete-organization) — Delete an organization.

## Members

Members of an organization and their Roles.

- [`GET /organizations/{organizationId}/members`](/api/auth/members/list-members) — List members.
- [`DELETE /organizations/{organizationId}/members/{userId}`](/api/auth/members/remove-member) — Remove a member.
- [`PUT /organizations/{organizationId}/members/{userId}`](/api/auth/members/set-member-roles) — Set a member's Roles.

## Invitations

Invitations to join an organization.

- [`GET /organizations/{organizationId}/invitations`](/api/auth/invitations/list-invitations) — List pending invitations.
- [`POST /organizations/{organizationId}/invitations`](/api/auth/invitations/create-invitation) — Invite someone by email.
- [`DELETE /organizations/{organizationId}/invitations/{invitationId}`](/api/auth/invitations/cancel-invitation) — Cancel a pending invitation.
- [`POST /invitations/accept`](/api/auth/invitations/accept-invitation) — Accept an invitation.

## Roles and permissions

Roles, their scoped grants, and permission checks.

- [`GET /organizations/{organizationId}/roles`](/api/auth/roles/list-roles) — List Roles.
- [`POST /organizations/{organizationId}/roles`](/api/auth/roles/create-role) — Create a custom Role.
- [`PATCH /organizations/{organizationId}/roles/{roleId}`](/api/auth/roles/update-role) — Rename a custom Role or replace its Grants.
- [`DELETE /organizations/{organizationId}/roles/{roleId}`](/api/auth/roles/delete-role) — Delete a custom Role.
- [`POST /organizations/{organizationId}/permission-checks`](/api/auth/roles/check-permissions) — Check the caller's Permissions.
- [`GET /permissions`](/api/auth/roles/get-permission-catalog) — Get the Permission catalog.

## OAuth applications

Machine clients of an organization, using the client credentials grant.

- [`GET /organizations/{organizationId}/oauth-clients`](/api/auth/oauth-clients/list-o-auth-clients) — List OAuth applications.
- [`POST /organizations/{organizationId}/oauth-clients`](/api/auth/oauth-clients/create-o-auth-client) — Create an OAuth application.
- [`GET /organizations/{organizationId}/oauth-clients/{clientId}`](/api/auth/oauth-clients/get-o-auth-client) — Get an OAuth application.
- [`PATCH /organizations/{organizationId}/oauth-clients/{clientId}`](/api/auth/oauth-clients/update-o-auth-client) — Update an OAuth application.
- [`DELETE /organizations/{organizationId}/oauth-clients/{clientId}`](/api/auth/oauth-clients/revoke-o-auth-client) — Revoke an OAuth application.
- [`POST /organizations/{organizationId}/oauth-clients/{clientId}/keys`](/api/auth/oauth-clients/add-o-auth-client-key) — Register a public key.
- [`DELETE /organizations/{organizationId}/oauth-clients/{clientId}/keys/{keyId}`](/api/auth/oauth-clients/revoke-o-auth-client-key) — Revoke a public key.
- [`POST /organizations/{organizationId}/oauth-clients/{clientId}/secrets`](/api/auth/oauth-clients/add-o-auth-client-secret) — Create a client secret.
- [`DELETE /organizations/{organizationId}/oauth-clients/{clientId}/secrets/{secretId}`](/api/auth/oauth-clients/revoke-o-auth-client-secret) — Revoke a client secret.

## Single sign-on

The organization's OpenID Connect identity provider.

- [`GET /organizations/{organizationId}/sso`](/api/auth/sso/get-sso-connection) — Get the organization's identity provider.
- [`PUT /organizations/{organizationId}/sso`](/api/auth/sso/configure-sso-connection) — Create or replace the organization's identity provider.
- [`DELETE /organizations/{organizationId}/sso`](/api/auth/sso/delete-sso-connection) — Remove the organization's identity provider.
- [`POST /organizations/{organizationId}/sso/domains/{domain}/verify`](/api/auth/sso/verify-sso-domain) — Verify an email domain of the identity provider.

## Billing

The organization's subscription.

- [`GET /organizations/{organizationId}/billing/plans`](/api/auth/billing/list-billing-plans) — List the subscription plans.
- [`GET /organizations/{organizationId}/billing/subscription`](/api/auth/billing/get-billing-subscription) — Get the organization's current subscription.
- [`POST /organizations/{organizationId}/billing/subscription/cancel`](/api/auth/billing/cancel-billing-subscription) — Cancel the subscription.
- [`POST /organizations/{organizationId}/billing/subscription/resume`](/api/auth/billing/resume-billing-subscription) — Undo a scheduled cancellation.
- [`POST /organizations/{organizationId}/billing/preview`](/api/auth/billing/preview-billing) — Estimate the recurring invoice.
- [`POST /organizations/{organizationId}/billing/checkout`](/api/auth/billing/create-billing-checkout) — Subscribe, or change the plan or seats.
- [`POST /organizations/{organizationId}/billing/portal`](/api/auth/billing/create-billing-portal) — Open the Stripe Customer Portal.

## Passkeys

The caller's passkeys.

- [`GET /passkeys`](/api/auth/passkeys/list-passkeys) — List the caller's passkeys.
- [`PATCH /passkeys/{passkeyId}`](/api/auth/passkeys/rename-passkey) — Rename a passkey.
- [`DELETE /passkeys/{passkeyId}`](/api/auth/passkeys/revoke-passkey) — Revoke a passkey.

## Audit log

Changes made to the organization, its members and Roles.

- [`GET /organizations/{organizationId}/audit-events`](/api/auth/audit/list-audit-events) — List audit events.

## Discovery

OpenID Connect discovery document of the authorization server.

- [`GET /.well-known/openid-configuration`](/api/auth/oauth/get-openid-configuration) — Get the authorization server metadata.

## Token keys

Public keys that verify access tokens.

- [`GET /.well-known/jwks.json`](/api/auth/tokens/get-jwks) — Get token verification keys.
