Authorizations
Body
application/json
Update a member’s role in an organization
curl --request PATCH \
--url https://api.wacht.dev/organizations/{organization_id}/members/{membership_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"role_id": "<string>"
}'{
"id": "<string>",
"user_id": "<string>",
"organization_id": "<string>",
"role_id": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"user": {
"id": "1234567890123456",
"email": "user@example.com",
"username": "johndoe",
"first_name": "John",
"last_name": "Doe",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-01T12:00:00Z",
"is_active": true,
"emails": [
{
"id": "<string>",
"email": "jsmith@example.com",
"is_primary": true,
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z"
}
],
"phones": [
{
"id": "<string>",
"phone_number": "+1234567890",
"is_primary": true,
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z"
}
],
"social_connections": [
{
"provider": "google",
"enabled": true,
"client_id": "<string>",
"scopes": [
"<string>"
],
"redirect_uri": "<string>"
}
]
},
"role": {
"id": "<string>",
"name": "Owner",
"description": "<string>",
"permissions": [
"org.manage",
"billing.manage",
"members.manage"
],
"is_default": false,
"created_at": "2023-11-07T05:31:56Z"
}
}curl --request PATCH \
--url https://api.wacht.dev/organizations/{organization_id}/members/{membership_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"role_id": "<string>"
}'{
"id": "<string>",
"user_id": "<string>",
"organization_id": "<string>",
"role_id": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"user": {
"id": "1234567890123456",
"email": "user@example.com",
"username": "johndoe",
"first_name": "John",
"last_name": "Doe",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-01T12:00:00Z",
"is_active": true,
"emails": [
{
"id": "<string>",
"email": "jsmith@example.com",
"is_primary": true,
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z"
}
],
"phones": [
{
"id": "<string>",
"phone_number": "+1234567890",
"is_primary": true,
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z"
}
],
"social_connections": [
{
"provider": "google",
"enabled": true,
"client_id": "<string>",
"scopes": [
"<string>"
],
"redirect_uri": "<string>"
}
]
},
"role": {
"id": "<string>",
"name": "Owner",
"description": "<string>",
"permissions": [
"org.manage",
"billing.manage",
"members.manage"
],
"is_default": false,
"created_at": "2023-11-07T05:31:56Z"
}
}