Change a member's role (owner-protected)
Change a member's role (owner-protected): CustomDomain™ API reference in the members group. Covers parameters, request body, responses and error codes.
Demoting the tenant's last owner is refused with 400, also when two demotions or removals of owners race each other. A 409 means the member's role changed after this request read it; reload and retry.
Authorization
apiKey Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/members/string" \ -H "Content-Type: application/json" \ -d '{ "role": "owner" }'{ "id": "string", "tenant_id": "string", "email": "string", "role": "owner", "status": "active", "invited_by": "string", "inviter_email": "string", "inviter_name": "string", "invite_sent_at": "2019-08-24T14:15:22Z", "invite_expires_at": "2019-08-24T14:15:22Z", "invite_token": "string", "accepted_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}