teams
由 openapi.json 自动生成的 9 个端点及其请求、响应和权限元数据。
此参考由已发布 API 契约生成。字段、请求头和权限要求如下。
下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525
标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.
PUT /api/v1/admin/enterprise-prices/{id}
PUT /api/v1/admin/enterprise-prices/{id}
Mark a price option enterprise and configure its member limit
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"in": "header",
"name": "idempotency-key",
"required": true,
"schema": {
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"pattern": "^[\\x21-\\x7e]{16,128}$",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"member_limit": {
"maximum": 500,
"minimum": 2,
"type": "integer"
}
},
"required": [
"member_limit"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"saved": {
"enum": [
true
],
"type": "boolean"
}
},
"required": [
"saved"
],
"type": "object"
}
}
},
"description": "Enterprise designation saved"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Mark a price option enterprise and configure its member limit",
"tags": [
"teams"
],
"x-audit": "subscription.team.manage",
"x-body": "json",
"x-body-limit": 4096,
"x-idempotency": "required",
"x-permission": "catalog.price.manage",
"x-rate-limit": "subscription.teams.user",
"x-reauth": true,
"effectiveSecurity": []
}GET /api/v1/admin/subscriptions/{id}/team
GET /api/v1/admin/subscriptions/{id}/team
Team usage for an enterprise subscription
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"member_limit": {
"type": [
"integer",
"null"
]
},
"members": {
"items": {
"additionalProperties": false,
"properties": {
"allocation_bytes": {
"pattern": "^\\d{1,19}$",
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"subscription_id": {
"format": "uuid",
"type": "string"
},
"used_bytes": {
"pattern": "^\\d{1,19}$",
"type": "string"
}
},
"required": [
"id",
"role",
"subscription_id",
"allocation_bytes",
"used_bytes"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"team_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"team_id",
"name",
"role",
"member_limit",
"members"
],
"type": "object"
}
}
},
"description": "Team usage"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Team usage for an enterprise subscription",
"tags": [
"teams"
],
"x-audit": "subscription.team.read",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-permission": "subscription.subscription.read",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/me/subscriptions/{id}/team
POST /api/v1/me/subscriptions/{id}/team
Enable an enterprise subscription team
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"in": "header",
"name": "idempotency-key",
"required": true,
"schema": {
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"pattern": "^[\\x21-\\x7e]{16,128}$",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"name": {
"maxLength": 100,
"minLength": 1,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"member_limit": {
"type": [
"integer",
"null"
]
},
"members": {
"items": {
"additionalProperties": false,
"properties": {
"allocation_bytes": {
"pattern": "^\\d{1,19}$",
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"subscription_id": {
"format": "uuid",
"type": "string"
},
"used_bytes": {
"pattern": "^\\d{1,19}$",
"type": "string"
}
},
"required": [
"id",
"role",
"subscription_id",
"allocation_bytes",
"used_bytes"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"team_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"team_id",
"name",
"role",
"member_limit",
"members"
],
"type": "object"
}
}
},
"description": "Team"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Enable an enterprise subscription team",
"tags": [
"teams"
],
"x-audit": "subscription.team.manage",
"x-body": "json",
"x-body-limit": 4096,
"x-idempotency": "required",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/me/team-invitations/accept
POST /api/v1/me/team-invitations/accept
Accept a team invitation using a verified matching email
{
"parameters": [
{
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"in": "header",
"name": "idempotency-key",
"required": true,
"schema": {
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"pattern": "^[\\x21-\\x7e]{16,128}$",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"proof": {
"pattern": "^[0-9A-Za-z]{43}$",
"type": "string"
}
},
"required": [
"proof"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"member_limit": {
"type": [
"integer",
"null"
]
},
"members": {
"items": {
"additionalProperties": false,
"properties": {
"allocation_bytes": {
"pattern": "^\\d{1,19}$",
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"subscription_id": {
"format": "uuid",
"type": "string"
},
"used_bytes": {
"pattern": "^\\d{1,19}$",
"type": "string"
}
},
"required": [
"id",
"role",
"subscription_id",
"allocation_bytes",
"used_bytes"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"team_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"team_id",
"name",
"role",
"member_limit",
"members"
],
"type": "object"
}
}
},
"description": "Joined team"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Accept a team invitation using a verified matching email",
"tags": [
"teams"
],
"x-audit": "subscription.team.manage",
"x-body": "json",
"x-body-limit": 4096,
"x-idempotency": "required",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}GET /api/v1/me/teams
GET /api/v1/me/teams
My team names and roles
{
"parameters": [
{
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"has_more": {
"type": "boolean"
},
"items": {
"items": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"team_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"team_id",
"name",
"role"
],
"type": "object"
},
"type": "array"
},
"next_cursor": {
"format": "uuid",
"type": [
"string",
"null"
]
}
},
"required": [
"items",
"next_cursor",
"has_more"
],
"type": "object"
}
}
},
"description": "My teams"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "My team names and roles",
"tags": [
"teams"
],
"x-audit": "subscription.team.read",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}GET /api/v1/me/teams/{id}
GET /api/v1/me/teams/{id}
Team name and role-scoped usage
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"member_limit": {
"type": [
"integer",
"null"
]
},
"members": {
"items": {
"additionalProperties": false,
"properties": {
"allocation_bytes": {
"pattern": "^\\d{1,19}$",
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"subscription_id": {
"format": "uuid",
"type": "string"
},
"used_bytes": {
"pattern": "^\\d{1,19}$",
"type": "string"
}
},
"required": [
"id",
"role",
"subscription_id",
"allocation_bytes",
"used_bytes"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"team_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"team_id",
"name",
"role",
"member_limit",
"members"
],
"type": "object"
}
}
},
"description": "Team"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Team name and role-scoped usage",
"tags": [
"teams"
],
"x-audit": "subscription.team.read",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/me/teams/{id}/invitations
POST /api/v1/me/teams/{id}/invitations
Invite a verified account to a team
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"in": "header",
"name": "idempotency-key",
"required": true,
"schema": {
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"pattern": "^[\\x21-\\x7e]{16,128}$",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"email": {
"format": "email",
"maxLength": 320,
"type": "string"
},
"role": {
"enum": [
"manager",
"member"
],
"type": "string"
}
},
"required": [
"email",
"role"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"expires_at": {
"format": "date-time",
"type": "string"
},
"invitation_id": {
"format": "uuid",
"type": "string"
},
"proof": {
"type": "string"
}
},
"required": [
"invitation_id",
"proof",
"expires_at"
],
"type": "object"
}
}
},
"description": "Single-use invitation proof"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Invite a verified account to a team",
"tags": [
"teams"
],
"x-audit": "subscription.team.manage",
"x-body": "json",
"x-body-limit": 4096,
"x-capability": "me.referral.invite",
"x-idempotency": "required",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}DELETE /api/v1/me/teams/{id}/members/{member_id}
DELETE /api/v1/me/teams/{id}/members/{member_id}
Remove one member and revoke only their credentials
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"in": "path",
"name": "member_id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"in": "header",
"name": "idempotency-key",
"required": true,
"schema": {
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"pattern": "^[\\x21-\\x7e]{16,128}$",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"member_limit": {
"type": [
"integer",
"null"
]
},
"members": {
"items": {
"additionalProperties": false,
"properties": {
"allocation_bytes": {
"pattern": "^\\d{1,19}$",
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"subscription_id": {
"format": "uuid",
"type": "string"
},
"used_bytes": {
"pattern": "^\\d{1,19}$",
"type": "string"
}
},
"required": [
"id",
"role",
"subscription_id",
"allocation_bytes",
"used_bytes"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"team_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"team_id",
"name",
"role",
"member_limit",
"members"
],
"type": "object"
}
}
},
"description": "Updated team"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Remove one member and revoke only their credentials",
"tags": [
"teams"
],
"x-audit": "subscription.team.manage",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "required",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}PATCH /api/v1/me/teams/{id}/members/{member_id}
PATCH /api/v1/me/teams/{id}/members/{member_id}
Set a team member role or traffic allocation
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"in": "path",
"name": "member_id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"in": "header",
"name": "idempotency-key",
"required": true,
"schema": {
"description": "Idempotency-Key: 16–128 visible ASCII characters",
"pattern": "^[\\x21-\\x7e]{16,128}$",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"allocation_bytes": {
"pattern": "^\\d{1,19}$",
"type": [
"string",
"null"
]
},
"role": {
"enum": [
"manager",
"member"
],
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"member_limit": {
"type": [
"integer",
"null"
]
},
"members": {
"items": {
"additionalProperties": false,
"properties": {
"allocation_bytes": {
"pattern": "^\\d{1,19}$",
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"subscription_id": {
"format": "uuid",
"type": "string"
},
"used_bytes": {
"pattern": "^\\d{1,19}$",
"type": "string"
}
},
"required": [
"id",
"role",
"subscription_id",
"allocation_bytes",
"used_bytes"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"role": {
"enum": [
"owner",
"manager",
"member"
],
"type": "string"
},
"team_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"team_id",
"name",
"role",
"member_limit",
"members"
],
"type": "object"
}
}
},
"description": "Updated team"
},
"403": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team role does not permit this action"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Team or member not found"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Subscription, membership or allocation conflict"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid input"
}
},
"summary": "Set a team member role or traffic allocation",
"tags": [
"teams"
],
"x-audit": "subscription.team.manage",
"x-body": "json",
"x-body-limit": 4096,
"x-idempotency": "required",
"x-rate-limit": "subscription.teams.user",
"x-reauth": false,
"effectiveSecurity": []
}