Invitation
Invitations to join an organization: list, send or withdraw one.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/invitations |
create |
Organization invitation |
GET |
/api/v1/organizations/{organization_id}/invitations |
list |
Organization invitations page (organization summary plus invitations) |
DELETE |
/api/v1/organizations/{organization_id}/invitations/{id} |
remove |
Success |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
invitations, err := client.Invitation(nil).List(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(invitations)
created, err := client.Invitation(nil).Create(map[string]any{"organization_id": "example", "email": "example", "role": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
removed, err := client.Invitation(nil).Remove(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local invitations, err = client:Invitation():list({ organization_id = "example" })
local created, err = client:Invitation():create({ organization_id = "example", email = "example", role = "example" })
local removed, err = client:Invitation():remove({ id = "example_id", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$invitations = $client->Invitation()->list(["organization_id" => "example"]);
$created = $client->Invitation()->create(["organization_id" => "example", "email" => "example", "role" => "example"]);
$client->Invitation()->remove(["id" => "example_id", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
invitations = client.Invitation().list({"organization_id": "example"})
created = client.Invitation().create({ "organization_id": "example", "email": "example", "role": "example" })
client.Invitation().remove({"id": "example_id", "organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
invitations = client.Invitation.list({ "organization_id" => "example" })
created = client.Invitation.create({ "organization_id" => "example", "email" => "example", "role" => "example" })
client.Invitation.remove({ "id" => "example_id", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const invitations = await client.Invitation().list({ organization_id: "example" })
const created = await client.Invitation().create({ organization_id: "example", email: "example", role: "example" })
await client.Invitation().remove({ id: "example_id", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
accepted_at |
one,string,null |
Yes | Accepted At |
accepted_by_user |
any |
Yes | Accepted By User |
created_at |
string |
Yes | Created At |
created_at_label |
one,string,null |
Yes | Created At Label |
email |
string |
Yes | |
email_delivery_status |
string |
No | Email Delivery Status |
expires_at |
one,string,null |
Yes | Expires At |
expires_at_label |
one,string,null |
Yes | Expires At Label |
id |
string |
Yes | Id |
invite_url |
one,string,null |
Yes | Invite Url |
invited_by_user |
any |
Yes | Invited By User |
organization |
object |
Yes | Organization |
revoked_at |
one,string,null |
Yes | Revoked At |
role |
string |
Yes | Role |
status |
string |
Yes | Status |
updated_at |
string |
Yes | Updated At |
updated_at_label |
one,string,null |
Yes | Updated At Label |
create
POST /api/v1/organizations/{organization_id}/invitations
Operation ID: post_api_v1_organizations_organization_id_invitations.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
email |
string (email) |
Yes | |
role |
enum: owner, admin, member |
Yes |
Responses
200: Organization invitation
application/json
| Property | Type | Required | Description |
|---|---|---|---|
invitation |
object |
Yes | |
invitation.accepted_at |
string (date-time) |
Yes | |
invitation.accepted_by_user |
object or null |
Yes | |
invitation.created_at |
string (date-time) |
Yes | |
invitation.created_at_label |
string |
Yes | |
invitation.email |
string (email) |
Yes | |
invitation.email_delivery_status |
string |
No | |
invitation.expires_at |
string (date-time) |
Yes | |
invitation.expires_at_label |
string |
Yes | |
invitation.id |
string |
Yes | |
invitation.invite_url |
string |
Yes | |
invitation.invited_by_user |
object or null |
Yes | |
invitation.organization |
object |
Yes | |
invitation.organization.id |
string |
Yes | |
invitation.organization.logo_url |
string |
Yes | |
invitation.organization.name |
string |
Yes | |
invitation.organization.slug |
string |
Yes | |
invitation.revoked_at |
string (date-time) |
Yes | |
invitation.role |
enum: owner, admin, member |
Yes | |
invitation.status |
enum: pending, accepted, revoked, expired |
Yes | |
invitation.updated_at |
string (date-time) |
Yes | |
invitation.updated_at_label |
string |
Yes |
201: Organization invitation
application/json
| Property | Type | Required | Description |
|---|---|---|---|
invitation |
object |
Yes | |
invitation.accepted_at |
string (date-time) |
Yes | |
invitation.accepted_by_user |
object or null |
Yes | |
invitation.created_at |
string (date-time) |
Yes | |
invitation.created_at_label |
string |
Yes | |
invitation.email |
string (email) |
Yes | |
invitation.email_delivery_status |
string |
No | |
invitation.expires_at |
string (date-time) |
Yes | |
invitation.expires_at_label |
string |
Yes | |
invitation.id |
string |
Yes | |
invitation.invite_url |
string |
Yes | |
invitation.invited_by_user |
object or null |
Yes | |
invitation.organization |
object |
Yes | |
invitation.organization.id |
string |
Yes | |
invitation.organization.logo_url |
string |
Yes | |
invitation.organization.name |
string |
Yes | |
invitation.organization.slug |
string |
Yes | |
invitation.revoked_at |
string (date-time) |
Yes | |
invitation.role |
enum: owner, admin, member |
Yes | |
invitation.status |
enum: pending, accepted, revoked, expired |
Yes | |
invitation.updated_at |
string (date-time) |
Yes | |
invitation.updated_at_label |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
list
GET /api/v1/organizations/{organization_id}/invitations
Operation ID: api_v1_organization_invitations.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Responses
200: Organization invitations page (organization summary plus invitations)
application/json
| Property | Type | Required | Description |
|---|---|---|---|
invitations |
array of object |
Yes | |
invitations[].accepted_at |
string (date-time) |
Yes | |
invitations[].accepted_by_user |
object or null |
Yes | |
invitations[].created_at |
string (date-time) |
Yes | |
invitations[].created_at_label |
string |
Yes | |
invitations[].email |
string (email) |
Yes | |
invitations[].email_delivery_status |
string |
No | |
invitations[].expires_at |
string (date-time) |
Yes | |
invitations[].expires_at_label |
string |
Yes | |
invitations[].id |
string |
Yes | |
invitations[].invite_url |
string |
Yes | |
invitations[].invited_by_user |
object or null |
Yes | |
invitations[].organization |
object |
Yes | |
invitations[].organization.id |
string |
Yes | |
invitations[].organization.logo_url |
string |
Yes | |
invitations[].organization.name |
string |
Yes | |
invitations[].organization.slug |
string |
Yes | |
invitations[].revoked_at |
string (date-time) |
Yes | |
invitations[].role |
enum: owner, admin, member |
Yes | |
invitations[].status |
enum: pending, accepted, revoked, expired |
Yes | |
invitations[].updated_at |
string (date-time) |
Yes | |
invitations[].updated_at_label |
string |
Yes | |
organization |
object |
Yes | |
organization.activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organization.agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organization.can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organization.created_at |
string (date-time) |
Yes | |
organization.created_at_label |
string |
Yes | |
organization.github_prs_authored_by_change_author |
boolean |
Yes | |
organization.id |
string |
Yes | |
organization.logo_url |
string |
Yes | |
organization.member_count |
integer |
Yes | |
organization.name |
string |
Yes | |
organization.pending_invitation_count |
integer |
Yes | |
organization.personal |
boolean |
Yes | |
organization.repository_count |
integer |
Yes | |
organization.role |
string |
Yes | |
organization.sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organization.shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organization.slug |
string |
Yes | |
organization.source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organization.source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organization.timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organization.updated_at |
string (date-time) |
Yes | |
organization.updated_at_label |
string |
Yes | |
organization.verify_pr_scenario_writing_enabled |
boolean |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
remove
DELETE /api/v1/organizations/{organization_id}/invitations/{id}
Operation ID: api_v1_organization_invitation.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.