Update a membership
PATCH
/v1/tenants/current/memberships/{membershipId}curl -X PATCH 'https://api.embodiflow.io/v1/tenants/current/memberships/{membershipId}' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"expiresAt": "2026-01-01T00:00:00Z",
"role": "owner",
"status": "active",
"permissionsOverlay": {
"grants": "project:read",
"denies": "project:read"
}
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
路径参数
- membershipIdstring必填
请求头参数
- If-Matchstring
Optional precondition. A matching tag proceeds and returns the new ETag. A stale tag returns 412 PRECONDITION_FAILED with no write. Absent proceeds (opt-in this release). If-Match: * succeeds when the resource exists. Malformed values return 400 IF_MATCH_INVALID.
请求体
Content-Typeapplication/json
- expiresAtstring (date-time) | null
- rolestring可选值owneradminresearcherbilling_adminviewer
- statusstring可选值activedisabledexpiredremoved
- permissionsOverlayobject | null
- grantsarray<string>
- deniesarray<string>
响应
Success
- dataobject必填
- idstring必填
- tenantIdstring必填
- userobject必填
- rolestring必填可选值owneradminresearcherbilling_adminviewer
- statusstring必填
- joinedAtstring必填
- invitedAtstring | null必填
- acceptedAtstring | null必填
- invitedByUserIdstring | null必填
- expiresAtstring | null必填
- permissionsOverlayobject
- effectivePermissionsobject
- metaobject必填
- requestIdstring必填
响应示例
{
"data": {
"id": "string",
"tenantId": "string",
"user": {
"id": "string",
"email": "string",
"displayName": "string",
"avatarUrl": "string",
"hasPassword": false,
"status": "string",
"lastLoginAt": "string",
"emailVerifiedAt": "string",
"handle": "string"
},
"role": "owner",
"status": "string",
"joinedAt": "string",
"invitedAt": "string",
"acceptedAt": "string",
"invitedByUserId": "string",
"expiresAt": "string",
"permissionsOverlay": {
"grants": "project:read",
"denies": "project:read"
},
"effectivePermissions": {
"rolePermissions": "project:read",
"grants": "project:read",
"denies": "project:read",
"effective": "project:read"
}
},
"meta": {
"requestId": "string"
}
}服务器https://api.embodiflow.io/v1https://api.embodiflow.dev/v1