codecamp

OpenAI 获取组织邀请

获取邀请

get /organization/invites/{invite_id}

获取一个邀请。

路径参数

  • invite_id: string

要获取的邀请 ID。

返回值

  • Invite object { id, created_at, email, 6 more }

表示发往组织的单个 invite(邀请)。

  • id: string

标识符,可在 API 端点中引用。

  • created_at: integer

邀请发送时间的 Unix 时间戳,单位为秒。

format: unixtime

  • email: string

邀请接收者的电子邮件地址。

  • object: "organization.invite"

对象类型,固定为 organization.invite。

  • "organization.invite"

  • projects: array of object { id, role }

接受邀请时获授成员身份的项目。

  • id: string

项目的公开 ID。

  • role: "member" or "owner"

项目成员角色。

  • "member"

  • "owner"

  • role: "owner" or "reader"

owner(所有者)或 reader(读取者)。

  • "owner"

  • "reader"

  • status: "accepted" or "expired" or "pending"

accepted(已接受)、expired(已过期)或 pending(待接受)。

  • "accepted"

  • "expired"

  • "pending"

  • accepted_at: optional integer or null

邀请接受时间的 Unix 时间戳,单位为秒。

format: unixtime

  • expires_at: optional integer or null

邀请过期时间的 Unix 时间戳,单位为秒。

format: unixtime

示例

## 使用组织管理员密钥按邀请 ID 查询邀请状态
curl https://api.openai.com/v1/organization/invites/invite-abc \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json"

响应示例

以下为对应请求的响应示例。

{
    "object": "organization.invite",
    "id": "invite-abc",
    "email": "user@example.com",
    "role": "owner",
    "status": "accepted",
    "created_at": 1711471533,
    "expires_at": 1711471533,
    "accepted_at": 1711471533,
    "projects": []
}
OpenAI 创建组织邀请
OpenAI 删除组织邀请
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

其他能力与进阶指南

Embeddings 接口参考

审计日志接口参考

项目管理及子资源接口参考

Agents 接口及子资源

Decisions 接口参考

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }