Skip to content
Sendtier Docs
API reference

Change an organization member's role

Source: OpenAPI (openapi/openapi.yaml).

curl -X PATCH "https://api.sendtier.example/organizations/string/members/string" \  -H "Authorization: Bearer st_live_REPLACE_ME" \  -H "Content-Type: application/json" \  -d '{    "role": "owner"  }'
Empty
PATCH
/organizations/{tenant_id}/members/{user_id}

Owners only. The last owner cannot be demoted. The path must match the selected membership.

Authorization

dashboardToken
headerAuthorizationBearer <token>

Dashboard server token: EdDSA Ed25519, issuer is the dashboard origin, audience sendtier-api, iat and exp are required with a maximum lifetime of 15 minutes, sub is the identity subject, email is required. Sendtier-Tenant selects a membership; omission selects the sole membership. Without a selected tenant only GET /me and POST /organizations are available. Sendtier-Mode is live (default) or test; test mode cannot create live keys. Owners, admins and developers have full access. Viewers may only GET or HEAD.

Path Parameters

tenant_id*string
user_id*string

Request Body

application/json
  1. body
role*MembershipRole
Value in"owner""admin""developer""viewer"

Response Body

Role updated.