Astrocal
API ReferenceTeamV1OrganizationsOrgidMembersMemberid

Update member role

Updates a member's role. Cannot change the owner's role (use transfer-ownership). Requires owner or admin role.

PATCH
/v1/organizations/{orgId}/members/{memberId}

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

In: header

Path Parameters

orgId*string
Formatuuid
memberId*string
Formatuuid

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

curl -X PATCH "https://example.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/members/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "role": "admin"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "user_id": "string",
  "user_email": "string",
  "role": "owner",
  "invited_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}