For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • API Concepts
    • Overview
    • Environments and URLs
    • Authentication
    • API versioning
    • Rate limiting
    • HTTP headers
    • Pagination, sorting, and filtering
  • General
  • Common
      • GETSearch roles
      • POSTCreate a role
      • GETGet a role by ID
      • DELDelete a role
      • PATCHUpdate a role
  • Accounts payable
  • Accounts receivable
  • E-invoicing
  • Payments
  • Accounting integration
  • Expense management
  • Utilities
LogoLogo
API StatusPartner Portal
CommonRoles

Update a role

PATCH
/roles/:role_id
PATCH
/v1/roles/:role_id
$curl -X PATCH https://api.sandbox.monite.com/v1/roles/role_id \
> -H "x-monite-version: 2024-05-25" \
> -H "x-monite-entity-id: 9d2b4c8f-2087-4738-ba91-7359683c49a4" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": "id",
3 "created_at": "2024-01-15T09:30:00Z",
4 "updated_at": "2024-01-15T09:30:00Z",
5 "name": "name",
6 "permissions": {
7 "objects": [
8 {
9 "object_type": "accounting_tax_rate",
10 "actions": [
11 {
12 "action_name": "create",
13 "permission": "allowed"
14 }
15 ]
16 }
17 ]
18 },
19 "status": "active"
20}
Change the specified fields with the provided values.
Was this page helpful?
Previous

Get all entity users

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

role_idstringRequired

Headers

x-monite-versionstringRequired
x-monite-entity-idstringRequired
The ID of the entity that owns the requested resource.

Request

This endpoint expects an object.
namestringOptional1-255 characters

The new name for this role. Role names are case-sensitive, can contain only ASCII characters, and must be unique.

permissionsobjectOptional
Access permissions

Response

Successful Response
idstringformat: "uuid"
UUID role ID
created_atdatetime
UTC datetime
updated_atdatetime
UTC datetime
namestring>=1 character
Role name
permissionsobject
Access permissions
statusenum
record status, 'active' by default
Allowed values:

Errors

400
Patch Roles ID Request Bad Request Error
401
Patch Roles ID Request Unauthorized Error
404
Patch Roles ID Request Not Found Error
422
Patch Roles ID Request Unprocessable Entity Error
429
Patch Roles ID Request Too Many Requests Error