curl --request POST \
--url https://api.openai.com/v1/organization/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"role": "reader",
"projects": [
{
"id": "<string>",
"role": "member"
}
]
}
'{
"object": "organization.invite",
"id": "<string>",
"email": "<string>",
"role": "owner",
"status": "accepted",
"invited_at": 123,
"expires_at": 123,
"accepted_at": 123,
"projects": [
{
"id": "<string>",
"role": "member"
}
]
}Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
curl --request POST \
--url https://api.openai.com/v1/organization/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"role": "reader",
"projects": [
{
"id": "<string>",
"role": "member"
}
]
}
'{
"object": "organization.invite",
"id": "<string>",
"email": "<string>",
"role": "owner",
"status": "accepted",
"invited_at": 123,
"expires_at": 123,
"accepted_at": 123,
"projects": [
{
"id": "<string>",
"role": "member"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The invite request payload.
Send an email to this address
owner or reader
reader, owner An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior.
Show child attributes
User invited successfully.
Represents an individual invite to the organization.
The object type, which is always organization.invite
organization.invite The identifier, which can be referenced in API endpoints
The email address of the individual to whom the invite was sent
owner or reader
owner, reader accepted,expired, or pending
accepted, expired, pending The Unix timestamp (in seconds) of when the invite was sent.
The Unix timestamp (in seconds) of when the invite expires.
The Unix timestamp (in seconds) of when the invite was accepted.
The projects that were granted membership upon acceptance of the invite.
Show child attributes
Was this page helpful?