Manage user or token permissions
Manage user or token permissions. For this endpoint, you should send an array of objects (in JSON format) as the body of the request. If you send a combination of resource_type and resource_id that already exists, the permission is updated. If the combination doesn't exist, the permission is created. Permissions of an expired API token cannot be updated; such requests are rejected with a 422 error.
Pass the API token in the Api-Token
Unique account access ID
5142Returns message about successful update of permissions.
Returns unauthorized error message. Check your credentials.
Returns forbidden error message. Check your permissions.
Returns not found error message
Validation error or other business rule violation
curl -X PUT https://mailtrap.io/api/account_accesses/{account_access_id}/permissions/bulk \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"permissions": [
{"resource_id": "3281", "resource_type": "account", "access_level": "viewer"}
]
}'
{
"message": "Permissions have been updated!"
}Last updated
Was this helpful?

