Update a business membership
/v1/businesses/{id}/memberships/{membershipId}Requires an API client bearer token.
Edits a membership's relationship, role, permissions or evidence reference. A member never edits its own membership (self_edit_refused) and grants only what it holds; the last active admin is never demoted (last_admin). Requires an Idempotency-Key. Emits business_membership.updated naming the fields that changed. An API client names its acting person in X-Rigid-Acting-Person (400 acting_person_required without it); the person needs an active membership of the business with can_manage_members, else 403 acting_person_not_permitted. Every call with a well-formed body and an Idempotency-Key not already used with a different body, allowed or refused, writes one audit intent with the API client, the asserted person, the business and the decision. While the `business-cards` release flag is off for the caller's mode this route answers 404 to every authenticated, well-formed request not replaying an outcome stored while it was on, as if absent.
Parameters
Path parameters
| Name | Required | Description |
|---|---|---|
| id | required | |
| membershipId | required |
Header parameters
| Name | Required | Description |
|---|---|---|
| Idempotency-Key | required | Client-chosen. An identical retry with the same key returns the stored response; reusing the key with a different payload returns 409. |
| X-Rigid-Acting-Person | optional |
Request body
+ show properties− hide properties
Example
curl -X PATCH https://api.rigid.fi/v1/businesses/{id}/memberships/{membershipId} \
-H "Authorization: Bearer $RIGID_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"relationship": "owner",
"role": "admin",
"permissions": {
"can_hold_card": true,
"can_reveal_own_pan": true,
"can_view_all_cards": true,
"can_reveal_pans": true,
"can_grant_cards": true,
"can_manage_members": true,
"can_fund": true
},
"authority_evidence_ref": "string"
}'Responses
200Update a business membership — the result.
+ show properties− hide properties
400Validation error; or permission_requires_admin
401Authentication required
403The acting person is not permitted; self_edit_refused; permission_escalation_refused
404Business or membership not found, or the business routes are not released
409Idempotency-Key reused with a different payload; last_admin; admin_requirements_not_met; membership_removed; business_closed
500Internal server error