Invites
Invite and manage invitations for an organization. Invited users are automatically added to the Default project.
List invites
get https://api.openai.com/v1/organization/invites
Returns a list of invites in the organization.
Query parameters
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Returns
A list of Invite objects.
Example request
1
2
3
curl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
Response
Create invite
post https://api.openai.com/v1/organization/invites
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
Returns
The created Invite object.
Example request
1
2
3
4
5
6
7
curl -X POST https://api.openai.com/v1/organization/invites \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"role": "owner"
}'
Response
Retrieve invite
get https://api.openai.com/v1/organization/invites/{invite_id}
Retrieves an invite.
Returns
The Invite object matching the specified ID.
Example request
1
2
3
curl https://api.openai.com/v1/organization/invites/invite-abc \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
Response
Delete invite
delete https://api.openai.com/v1/organization/invites/{invite_id}
Delete an invite. If the invite has already been accepted, it cannot be deleted.
Returns
Confirmation that the invite has been deleted
Example request
1
2
3
curl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
Response
The invite object
Represents an individual invite
to the organization.
OBJECT The invite object
1
2
3
4
5
6
7
8
9
10
{
"object": "organization.invite",
"id": "invite-abc",
"email": "user@example.com",
"role": "owner",
"status": "accepted",
"invited_at": 1711471533,
"expires_at": 1711471533,
"accepted_at": 1711471533
}