curl --request PATCH \
--url https://api.example.com/organizations/{organizationId}/memberships/{membershipId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"roleSlug": "<string>"
}
'{
"membershipId": "om_01HQZC8G2T9YX5J8VQBW3KPQR7",
"userId": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"role": {
"slug": "editor"
},
"status": "ACTIVE",
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
Atualizar o role de uma membership pelo ID.
curl --request PATCH \
--url https://api.example.com/organizations/{organizationId}/memberships/{membershipId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"roleSlug": "<string>"
}
'{
"membershipId": "om_01HQZC8G2T9YX5J8VQBW3KPQR7",
"userId": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"role": {
"slug": "editor"
},
"status": "ACTIVE",
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
curl -X PATCH https://api.awsales.io/studio/organizations/ORG_ID/memberships/MEMBERSHIP_ID \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"roleSlug": "editor"
}'
memberships:write.{
"membershipId": "om_01HQZC8G2T9YX5J8VQBW3KPQR7",
"userId": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"role": {
"slug": "editor"
},
"status": "ACTIVE",
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
404 | organization.not_found | Organizacao nao encontrada |
404 | membership.not_found | Membership nao encontrada |
500 | internal_server_error | Ocorreu um erro inesperado |