invites
Creates, updates, deletes, gets or lists an invites resource.
Overview
| Name | invites |
| Type | Resource |
| Id | anthropic_admin.organization.invites |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the Invite. |
email | string | Email of the User being invited. |
expires_at | string | RFC 3339 datetime string indicating when the Invite expires. |
invited_at | string | RFC 3339 datetime string indicating when the Invite was created. |
role | string | Organization role of the invited User. (admin, billing, claude_code_user, developer, user) |
status | string | Status of the Invite. (accepted, deleted, expired, pending) |
type | string | Object type. Always `invite`. (invite) |
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the Invite. |
email | string | Email of the User being invited. |
expires_at | string | RFC 3339 datetime string indicating when the Invite expires. |
invited_at | string | RFC 3339 datetime string indicating when the Invite was created. |
role | string | Organization role of the invited User. (admin, billing, claude_code_user, developer, user) |
status | string | Status of the Invite. (accepted, deleted, expired, pending) |
type | string | Object type. Always `invite`. (invite) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | invite_id | Get an organization invite by ID. | |
list | select | before_id, after_id | List pending and historical invites for the organization. | |
create | insert | email, role | Invite a user to the organization. Invites expire after 21 days. | |
delete | delete | invite_id | Delete an organization invite. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
invite_id | string | ID of the Invite. |
after_id | string | ID of the object to use as a cursor for pagination. Returns the page of results immediately after this object. |
before_id | string | ID of the object to use as a cursor for pagination. Returns the page of results immediately before this object. |
SELECT examples
- get
- list
Get an organization invite by ID.
SELECT
id,
email,
expires_at,
invited_at,
role,
status,
type
FROM anthropic_admin.organization.invites
WHERE invite_id = '{{ invite_id }}' -- required
;
List pending and historical invites for the organization.
SELECT
id,
email,
expires_at,
invited_at,
role,
status,
type
FROM anthropic_admin.organization.invites
WHERE before_id = '{{ before_id }}'
AND after_id = '{{ after_id }}'
;
INSERT examples
- create
- Manifest
Invite a user to the organization. Invites expire after 21 days.
INSERT INTO anthropic_admin.organization.invites (
email,
role
)
SELECT
'{{ email }}' /* required */,
'{{ role }}' /* required */
RETURNING
id,
email,
expires_at,
invited_at,
role,
status,
type
;
# Description fields are for documentation purposes
- name: invites
props:
- name: email
value: "{{ email }}"
description: |
Email of the User.
- name: role
value: "{{ role }}"
description: |
Role for the invited User. Cannot be `admin`.
valid_values: ['billing', 'claude_code_user', 'developer', 'user']
DELETE examples
- delete
Delete an organization invite.
DELETE FROM anthropic_admin.organization.invites
WHERE invite_id = '{{ invite_id }}' --required
;