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

Create a role

POST
/roles
POST
/v1/roles
$curl -X POST https://api.sandbox.monite.com/v1/roles \
> -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 '{
> "name": "name",
> "permissions": {}
>}'
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}
Create a new role from the specified values.
Was this page helpful?
Previous

Get a role by ID

Next
Built with

Authentication

AuthorizationBearer

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

Headers

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

Request

This endpoint expects an object.
namestringRequired1-255 characters

The role name must be unique within the entity and can contain only ASCII characters. Role names are case-sensitive.

permissionsobjectRequired
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
Post Roles Request Bad Request Error
401
Post Roles Request Unauthorized Error
422
Post Roles Request Unprocessable Entity Error
429
Post Roles Request Too Many Requests Error