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"
}
}'Authorization
Send a personal access token with every request.
- Authorization: Bearer PAT
Path parameters
- membershipIdstringrequired
Header parameters
- 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.
Request body
Content-Typeapplication/json
- expiresAtstring (date-time) | null
- rolestringAllowed valuesowneradminresearcherbilling_adminviewer
- statusstringAllowed valuesactivedisabledexpiredremoved
- permissionsOverlayobject | null
- grantsarray<string>
- deniesarray<string>
Responses
Success
- dataobjectrequired
- idstringrequired
- tenantIdstringrequired
- userobjectrequired
- rolestringrequiredAllowed valuesowneradminresearcherbilling_adminviewer
- statusstringrequired
- joinedAtstringrequired
- invitedAtstring | nullrequired
- acceptedAtstring | nullrequired
- invitedByUserIdstring | nullrequired
- expiresAtstring | nullrequired
- permissionsOverlayobject
- effectivePermissionsobject
- metaobjectrequired
- requestIdstringrequired
Response example
{
"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"
}
}Servershttps://api.embodiflow.io/v1https://api.embodiflow.dev/v1