# Organizations

Source: https://www.pontive.com/docs/api-reference/management/organizations

Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so).

Authentication: send `Authorization: Bearer <token>` with a secret key (`pontive_sk_…`, which implies its instance) or an access token issued for this API. A token that can reach several instances also names one with `X-Pontive-Instance-ID: inst_…`. Secret keys are for servers only.

## List organizations

```http
GET https://api.{region}.pontive.com/v1/organizations
```

Retrieve a paginated list of organizations. Filter by status, external_id, and search query.

Operation ID: `ListOrganizations`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string |  | Filter by the organization's own status (active, suspended) |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |
| `sort` | string |  | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, slug, status. Default: -created_at |
| `search` | string |  | Search query |
| `external_id` | string |  | Exact match on the id the caller gave the organization |
| `slug` | string |  | Exact match on the slug: finds an organization by it (D17) |

### Responses

- `200` OK: ListOrganizationsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Create organization

```http
POST https://api.{region}.pontive.com/v1/organizations
```

Create a new organization. Organizations are the customer-facing tenant, and flat: structure below one is modelled as resources that belong to it. The slug (supplied, or generated from the name) is immutable once created; one another organization in the instance holds is refused with 409 slug_conflict, never suffixed.

Operation ID: `CreateOrganization`

### Request body (`application/json`, required): CreateOrganizationRequest

Organization creation details

### Responses

- `201` Created: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `409` Conflict: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get organization by external id

```http
GET https://api.{region}.pontive.com/v1/organizations/external_id/{external_id}
```

Retrieve the organization the caller gave this external id when creating or updating it: an exact match on the instance-unique external_id. Answers the organization or 404. Percent-encode the value.

Operation ID: `GetOrganizationByExternalId`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `external_id` | string | yes | The id the caller gave the organization |

### Responses

- `200` OK: Organization
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get organization settings

```http
GET https://api.{region}.pontive.com/v1/organizations/settings
```

The instance-wide policy that applies to every organization: whether members may leave, the roles given on joining, and how long an invitation stays open

Operation ID: `GetOrganizationSettings`

### Responses

- `200` OK: OrganizationSettingsResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update organization settings

```http
PATCH https://api.{region}.pontive.com/v1/organizations/settings
```

Change the instance-wide organization policy. Omitted fields are left as they are

Operation ID: `UpdateOrganizationSettings`

### Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `If-Match` | string |  | The ETag the document was read with: a stale one is refused 412 precondition_failed (D42) |

### Request body (`application/json`, required): UpdateOrganizationSettingsRequest

Fields to change

### Responses

- `200` OK: OrganizationSettingsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `412` precondition_failed: the document changed since it was read: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get organization

```http
GET https://api.{region}.pontive.com/v1/organizations/{organization}
```

Retrieve one organization by its id or its slug. A value in the id form (org_ and 26 base32 characters) is read as the id; anything else as the slug, which needs sys:org:read to resolve. Every route under /organizations/{organization} takes either.

Operation ID: `GetOrganization`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Responses

- `200` OK: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update organization

```http
PATCH https://api.{region}.pontive.com/v1/organizations/{organization}
```

Partially update an organization. Only provided fields are changed. The slug is immutable after creation and cannot be updated.

Operation ID: `UpdateOrganization`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Request body (`application/json`, required): UpdateOrganizationRequest

Fields to update

### Responses

- `200` OK: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete organization

```http
DELETE https://api.{region}.pontive.com/v1/organizations/{organization}
```

Permanently delete an organization together with its memberships, invitations, owned service accounts, instance-scoped roles and organization-scoped credentials (revoked), and the resources that belong to it. There is no restore.

Operation ID: `DeleteOrganization`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Responses

- `204` No Content
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## List assignable roles

```http
GET https://api.{region}.pontive.com/v1/organizations/{organization}/assignable-roles
```

List the roles a member of the organization can be given, each marked with whether the caller may grant or remove it on a member other than themselves (assignable_by_caller) and whether doing so hands the organization over, which needs sys:org:transfer (requires_transfer). Decided on sys:member:read on the organization, so an organization's own administrators can read it; the roles of the org resource type, and the organization's own. Not paginated.

Operation ID: `ListAssignableRoles`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page, 1 to 100 |

### Responses

- `200` OK: ListAssignableRolesResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## List invitations

```http
GET https://api.{region}.pontive.com/v1/organizations/{organization}/invitations
```

Get a list of invitations for an organization with pagination and filtering

Operation ID: `ListOrganizationInvitations`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `roles` | string[] |  | Filter by invitation roles |
| `invitee_emails` | string[] |  | Filter by invitees email |
| `invited_by` | string |  | Filter by inviter user ID |
| `resource_id` | string |  | Only the invitations to this resource |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |
| `search` | string |  | Search by invitation email or invitee email |
| `sort` | string |  | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, expires_at, last_sent_at, status. Default: -created_at |

### Responses

- `200` OK: ListInvitationsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Invite members

```http
POST https://api.{region}.pontive.com/v1/organizations/{organization}/invitations
```

Invite multiple members to an organization, or to one of its resources (resource_id with resource_roles). Invitees to a resource who are not organization members join the organization too. Addresses are matched case-insensitively. An address that is already a member of the target is skipped and listed in skipped rather than failing the request. An address that already holds a pending, unexpired invitation to the target has that invitation reissued with this request's roles, a fresh expiry and a new link, instead of a second one sent. Inviting someone as the organization's owner needs sys:org:transfer, refused 403 owner_transfer_required. 200 when every address was skipped, 201 when any invitation was sent.

Operation ID: `CreateOrganizationInvitations`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Request body (`application/json`, required): InviteMembersRequest

Invite members payload

### Responses

- `200` OK: InvitationResult
- `201` Created: InvitationResult
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get invitation

```http
GET https://api.{region}.pontive.com/v1/organizations/{organization}/invitations/{invitation_id}
```

Get invitation by ID

Operation ID: `GetOrganizationInvitation`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invitation_id` | string | yes | Invitation ID |
| `organization` | string | yes | The organization's id, or its slug |

### Responses

- `200` OK: Invitation
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse

## Delete invitation

```http
DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/invitations/{invitation_id}
```

Withdraw an invitation: it is deleted, and its link stops working. An invitation exists only while it is open — accepting one deletes it too, and an expired one is purged.

Operation ID: `DeleteOrganizationInvitation`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invitation_id` | string | yes | Invitation ID |
| `organization` | string | yes | The organization's id, or its slug |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `notify_invitee` | boolean |  | Email the invitee that the invitation was withdrawn |

### Responses

- `204` No Content
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse

## Resend invitation

```http
POST https://api.{region}.pontive.com/v1/organizations/{organization}/invitations/{invitation_id}/resend
```

Resend an invitation

Operation ID: `ResendOrganizationInvitation`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invitation_id` | string | yes | Invitation ID |
| `organization` | string | yes | The organization's id, or its slug |

### Request body (`application/json`, required): ResendInvitationRequest

Resend Invitation payload

### Responses

- `200` OK: Invitation
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse

## Remove a member limit

```http
DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/member-limits/{source}
```

Remove one source's member limit from an organization. The lowest limit left, if any, is then in force. Removing a limit that is not set changes nothing and succeeds. While the instance's billing capability is on, the billing limit is managed by billing: removing it here is refused with 403, an instance admin included. With the capability off, an instance admin may remove it. If the capability cannot be read, a billing write is refused with 503.

Operation ID: `DeleteOrganizationMemberLimit`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |
| `source` | "manual" \| "billing" | yes | Who set the limit |

### Responses

- `200` OK: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse
- `503` Service Unavailable: ErrResponse

## Set a member limit

```http
PUT https://api.{region}.pontive.com/v1/organizations/{organization}/member-limits/{source}
```

Set one source's member limit on an organization, 0 or more. source is manual (an instance admin or the client's backend) or billing (Pontive billing). While the instance's billing capability is on, the billing limit is managed by billing: setting it here is refused with 403, an instance admin included, and a manual limit may still be set, since the lowest limit wins. With the capability off, an instance admin may set it. If the capability cannot be read, a billing write is refused with 503. The lowest limit set is in force, as member_limit. A write that would add a member past it is refused with 409 seat_limit_reached. Lowering a limit below the current number of members blocks new members and removes no one. Pontive billing does not call this route: it writes its limit to identity-svc over gRPC with its system credential.

Operation ID: `ReplaceOrganizationMemberLimit`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |
| `source` | "manual" \| "billing" | yes | Who sets the limit |

### Request body (`application/json`, required): SetMemberLimitRequest

The limit

### Responses

- `200` OK: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse
- `503` Service Unavailable: ErrResponse

## List organization members

```http
GET https://api.{region}.pontive.com/v1/organizations/{organization}/members
```

List members of an organization with pagination and filtering

Operation ID: `ListOrganizationMembers`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user_ids` | string[] |  | Filter by user IDs |
| `emails` | string[] |  | Filter by emails |
| `roles` | string[] |  | Filter by roles |
| `search` | string |  | search query |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |
| `sort` | string |  | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, joined_at, email. Default: -created_at |

### Responses

- `200` OK: ListMembersResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Add member to organization

```http
POST https://api.{region}.pontive.com/v1/organizations/{organization}/members
```

Add a user as a member of an organization. Adding them as owner needs sys:org:transfer, refused 403 owner_transfer_required. Adding one past the organization's member limit is refused 409 seat_limit_reached, and nothing is written.

Operation ID: `CreateOrganizationMember`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Request body (`application/json`, required): AddOrganizationMemberRequest

Add member payload

### Responses

- `201` Created: Member
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `409` Conflict: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get organization member

```http
GET https://api.{region}.pontive.com/v1/organizations/{organization}/members/{user_id}
```

Get an organization member by user ID

Operation ID: `GetOrganizationMember`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |
| `user_id` | string | yes | User ID |

### Responses

- `200` OK: Member
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update organization member roles

```http
PATCH https://api.{region}.pontive.com/v1/organizations/{organization}/members/{user_id}
```

Replace an organization member's roles. Granting or removing owner needs sys:org:transfer, refused 403 owner_transfer_required. A caller from the instance itself (not the Pontive console) may add or remove only roles whose permissions they hold on the organization, or hold sys:root:grant, refused 403 role_ceiling, and cannot change their own roles, refused 403 self_role_change. Roles that changed while the change was being decided are refused 409 member_roles_changed: read the member again and retry.

Operation ID: `UpdateOrganizationMember`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |
| `user_id` | string | yes | User ID |

### Request body (`application/json`, required): UpdateMemberRolesRequest

Update member roles payload

### Responses

- `200` OK: Member
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` Conflict: ErrResponse
- `500` Internal Server Error: ErrResponse

## Remove member from organization

```http
DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/members/{user_id}
```

Remove a user from an organization, which removes every role they hold there. Removing oneself is leaving: when the organization settings do not let members leave (allow_members_to_leave off), it is refused 403 leave_disabled, as leaving it with POST /me/memberships/{container_id}/leave is, before any rule below; removing someone else is not affected. Removing a member who holds owner needs sys:org:transfer, removing oneself included, refused 403 owner_transfer_required. A caller from the instance itself (not the Pontive console) may remove only a member whose roles' permissions they hold on the organization, or hold sys:root:grant, refused 403 role_ceiling. Roles that changed while the removal was being decided are refused 409 member_roles_changed: read the member again and retry.

Operation ID: `DeleteOrganizationMember`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |
| `user_id` | string | yes | User ID |

### Responses

- `204` No Content
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` Conflict: ErrResponse

## Reactivate organization

```http
POST https://api.{region}.pontive.com/v1/organizations/{organization}/resume
```

Remove one suspension reason from an organization, and no other. The reason is admin when the body is absent or names none. The organization is active again, with access to the resources parented under it, once it holds no reason; while it holds another it stays suspended. Removing a reason it does not hold changes nothing and succeeds. A reactivate that names no reason removes admin only, never billing. While the instance's billing capability is on, the billing reason is managed by billing: adding or removing it here is refused with 403, an instance admin included, so only billing lifts a billing suspension. With the capability off, an instance admin may add or remove it. If the capability cannot be read, a billing write is refused with 503.

Operation ID: `ResumeOrganization`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Request body (`application/json`): ReactivateOrganizationRequest

The reason to remove; admin when omitted

### Responses

- `200` OK: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse
- `503` Service Unavailable: ErrResponse

## Suspend organization

```http
POST https://api.{region}.pontive.com/v1/organizations/{organization}/suspend
```

Add a suspension reason to an organization. It is suspended while it holds any reason, and access to it and to every resource parented under it is denied. The reason is admin when the body is absent or names none. billing is Pontive billing's own reason. closed says the organization's owners closed their account and the client may reopen it: Pontive billing keeps its owner able to pay its invoices and manage its payment method while it is held. While the instance's billing capability is on, the billing reason is managed by billing: adding or removing it here is refused with 403, an instance admin included, so only billing lifts a billing suspension. With the capability off, an instance admin may add or remove it. If the capability cannot be read, a billing write is refused with 503. Adding a reason the organization already holds changes nothing and succeeds. Pontive billing does not call this route: it writes the billing reason to identity-svc over gRPC with its system credential.

Operation ID: `SuspendOrganization`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Request body (`application/json`): SuspendOrganizationRequest

The reason to add; admin when omitted

### Responses

- `200` OK: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse
- `503` Service Unavailable: ErrResponse

## Transfer organization ownership

```http
POST https://api.{region}.pontive.com/v1/organizations/{organization}/transfer-ownership
```

Transfer ownership of an organization to another user.

Operation ID: `TransferOwnership`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | yes | The organization's id, or its slug |

### Request body (`application/json`, required): TransferOwnershipRequest

New owner

### Responses

- `200` OK: Organization
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListOrganizationsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Organization[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ErrResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | ErrBody |  |  |

### CreateOrganizationRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `external_id` | string |  |  |
| `metadata` | Metadata |  |  |
| `name` | string | yes |  |
| `owners` | string[] |  | Owners hold the `owner` role from the start, each made a member with it. At least one is required; an organization always keeps one. |
| `slug` | string |  | Slug is set once, here, and is immutable afterwards. Generated from the name when omitted. Unique within the instance; released on delete. |

### Organization

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `external_id` | string |  |  |
| `id` | string |  |  |
| `instance_id` | string |  |  |
| `member_count` | integer |  |  |
| `member_limit` | integer |  | MemberLimit is the limit in force: the lowest of member_limits, or null when none is set (pontive-spec 09, Member limits). |
| `member_limits` | MemberLimits |  | MemberLimits are the member limits set on the organization, by source. |
| `metadata` | Metadata |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `slug` | string |  |  |
| `status` | "active" \| "suspended" |  | Status is the organization's status. Suspending it also suspends access to every resource parented under it. |
| `suspended_at` | string |  |  |
| `suspension_reasons` | string[] |  | SuspensionReasons is why the organization is suspended: admin, billing, closed, or several. It is suspended while this is not empty, and the list is empty while it is active (pontive-spec 09, Suspension reasons). |
| `updated_at` | string |  |  |

### OrganizationSettingsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `settings` | OrganizationSettings |  |  |

### UpdateOrganizationSettingsRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allow_members_to_leave` | boolean |  |  |
| `invitation_expiry_days` | integer |  |  |
| `roles_on_join` | string[] |  | RolesOnJoin replaces the roles given on joining; omitted leaves them. |

### UpdateOrganizationRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `external_id` | string |  |  |
| `metadata` | Metadata |  |  |
| `name` | string |  |  |

### ListAssignableRolesResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | AssignableRole[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ListInvitationsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Invitation[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### InviteMembersRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string |  | AppID is the application this invitation is for: whose sign-in domain the link points at, whose branding and flows the invitee sees while accepting, and whose initiate_login_uri they land on once they have. It must admit the organization. Optional when exactly one active app of the instance admits it; required when several do. |
| `emails` | string[] | yes |  |
| `message` | string |  |  |
| `resource_id` | string |  | ResourceID is a resource of the organization the invitees also join, with ResourceRoles (roles of the resource's type, at least one). An organization member can be invited to one of its resources. |
| `resource_roles` | string[] |  |  |
| `roles` | string[] |  | Roles are the organization roles. Optional: with none, the invitee joins the organization with the membership settings' roles_on_join (none by default, a membership holding no role). |

### InvitationResult

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `invitations` | Invitation[] |  | Invitations are the invitations sent: new ones, and live ones an address already held to the same target, reissued with this request's roles and a new link (resend_count > 0) — the earlier link stops working. |
| `object` | string |  |  |
| `organization_id` | string |  | OrganizationID is the organization invited into; absent for an invitation to the instance. |
| `skipped` | SkippedInvitee[] |  | Skipped are the addresses that got no invitation, and why. Skipping is not an error: a request whose every address was skipped still succeeds. |

### Invitation

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `expires_at` | string |  |  |
| `id` | string |  |  |
| `invited_by` | InvitedBy |  | InvitedBy is the user of the instance who sent it. Absent when a service account or a Pontive operator (from the dashboard) sent it. |
| `invitee_email` | string |  |  |
| `last_sent_at` | string |  |  |
| `message` | string |  |  |
| `object` | string |  |  |
| `organization_id` | string |  | OrganizationID is the organization the invitee joins; absent for an invitation to the instance alone. |
| `resend_count` | integer |  |  |
| `resource_id` | string |  | ResourceID is the resource of the organization the invitation also grants membership of, with ResourceRoles; absent for an invitation to the organization alone. |
| `resource_roles` | RoleRef[] |  |  |
| `resource_type` | string |  |  |
| `roles` | RoleRef[] |  |  |
| `updated_at` | string |  |  |

### ResendInvitationRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string |  |  |
| `new_expire_at` | string |  |  |

### SetMemberLimitRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | yes | Limit is the most members the organization may have, 0 or more. |

### ListMembersResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Member[] |  | List of members |
| `object` | string |  | The object type |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### AddOrganizationMemberRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `roles` | string[] | yes |  |
| `user_id` | string | yes |  |

### Member

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `instance_id` | string |  |  |
| `joined_at` | string |  |  |
| `last_active_at` | string |  |  |
| `object` | string |  |  |
| `resource_id` | string |  |  |
| `resource_name` | string |  |  |
| `resource_type` | string |  |  |
| `roles` | RoleRef[] |  |  |
| `updated_at` | string |  |  |
| `user` | MemberUser |  |  |

### UpdateMemberRolesRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `roles` | string[] |  |  |

### ReactivateOrganizationRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | "admin" \| "billing" \| "closed" |  | Reason is the suspension reason to remove: admin (the default), billing or closed. The organization stays suspended while it holds another. While the instance's billing capability is on, only billing removes billing. |

### SuspendOrganizationRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | "admin" \| "billing" \| "closed" |  | Reason is the suspension reason to add: admin (the default), billing or closed. billing is Pontive billing's own: while the instance's billing capability is on, only billing adds it; with it off, an instance admin may too. closed says the organization's owners closed their account and the client may reopen it: Pontive billing keeps its owner able to pay its invoices and manage its payment method meanwhile. |

### TransferOwnershipRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `new_owner_id` | string |  |  |
| `previous_owner_id` | string |  | The member giving `owner` up. Defaults to the caller when the caller is a user; required when a service calls on someone's behalf. |
| `retain_as` | string[] |  | The roles the previous owner keeps; none when omitted. |

### Pagination

Pagination is the page answered (api-route-review D9).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer |  | Limit is the maximum number of items per page. |
| `page` | integer |  | Page is the 1-based index of the returned page. |
| `total` | integer |  | Total is the total number of items across all pages. |
| `total_pages` | integer |  | TotalPages is the total number of pages available. |

### ErrBody

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string |  | Code is the spec's machine-readable code for this error, in snake case: a domain code such as seat_limit_reached where the refusal has one, otherwise a generic one such as permission_denied, not_found, conflict, invalid_request or service_unavailable. |
| `details` | ErrDetail[] |  | Details are per-field findings, present only on a refusal that has them, e.g. a 422 invalid_theme names each invalid value by its path, a 422 package_invalid each problem, and a 409 capability_in_use each count by its name. |
| `doc_url` | string |  | DocURL links to documentation about this error, when available. |
| `message` | string |  | Message is a human-readable description of what went wrong. |
| `object` | string |  | Object is the discriminator; always "error". |
| `param` | string |  | Param names the request parameter this error refers to, when applicable. |
| `type` | "validation_error" \| "authentication_error" \| "authorization_error" \| "not_found" \| "conflict_error" \| "rate_limit_error" \| "internal_error" |  | Type is the error's category, set by its HTTP status: one of validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error, internal_error. |

### Metadata

Type: Record<string, string>

### MemberLimits

MemberLimits are the member limits set on the organization, by source.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billing` | integer |  | Billing is set by Pontive billing from the max of a members subscription. While the instance's billing capability is on, only billing sets it. |
| `manual` | integer |  | Manual is set by an instance admin or the client's backend. |

### OrganizationSettings

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allow_members_to_leave` | boolean |  | AllowMembersToLeave lets a member leave an organization on their own. Off, only someone else removes a member: POST /me/memberships/{container_id}/leave on an organization, and a member removing themselves through DELETE /organizations/{org_id}/members/{user_id}, answer 403 leave_disabled. |
| `instance_id` | string |  |  |
| `invitation_expiry_days` | integer |  | InvitationExpiryDays is how many days an invitation stays open, 1 to 365. Default 7. |
| `object` | string |  |  |
| `roles_on_join` | string[] |  | RolesOnJoin are the organization roles a user is given when they join it without being given any: by joining one of its resources, or accepting an invitation that names none. Empty, the default, joins them holding no role. Never owner. |
| `updated_at` | string |  |  |

### AssignableRole

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `assignable_by_caller` | boolean |  | AssignableByCaller: the caller may grant or remove it on a member other than themselves. |
| `description` | string |  |  |
| `key` | string |  | Key identifies the role on the organization type. |
| `name` | string |  |  |
| `object` | string |  |  |
| `organization_scoped` | boolean |  | OrganizationScoped: the role is this organization's own, not one of the instance's organization roles. |
| `requires_transfer` | boolean |  | RequiresTransfer: granting or removing it hands the organization over, which needs sys:org:transfer (the owner role). |

### SkippedInvitee

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string |  |  |
| `reason` | "already_member" \| "already_registered" |  | Reason is already_member: a member of the target already (an invite does not change a member's roles); or, for an invitation to the instance, already_registered: the address already has an account. |

### InvitedBy

InvitedBy is the user of the instance who sent it. Absent when a service
account or a Pontive operator (from the dashboard) sent it.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  |  |
| `name` | string |  |  |

### RoleRef

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | string |  |  |
| `name` | string |  |  |

### MemberUser

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string |  |  |
| `email_verified` | boolean |  |  |
| `family_name` | string |  |  |
| `given_name` | string |  |  |
| `id` | string |  |  |
| `name` | string |  |  |
| `picture` | string |  |  |
| `status` | string |  |  |
| `username` | string |  |  |

### ErrDetail

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `field` | string |  | Field is where the finding is: for a theme, its dotted path. |
| `message` | string |  | Message is what is wrong there. |
