Skip to content

Get the permission catalog (roles + scopes)

GET
/v1/permissions/roles
curl --request GET \
--url https://api.emite.cr/v1/permissions/roles \
--header 'Authorization: Bearer <token>'

Returns every predefined role with its scope bundle, every scope with its UI grouping and API-key grantability flag, and the named scope presets the API key screen offers (emit: what issuing a document end to end requires). The web caches this for the session and renders the team, roles and API key screens off it. The catalog is static; invalidate on a deploy that changes Role or Scope.

The system roles, every scope, and the API key presets.

Media typeapplication/json
object
roles
required

The six system roles, owner first, each with its scopes. A company’s custom roles are listed at GET /v1/tenants/me/roles.

Array<object>
object
slug
required

The system role, as a member’s role names it.

string
Allowed values: owner admin billing_manager accountant issuer viewer
scopes
required

Every scope the role grants. ["*"] for owner: every scope there is, including any added later — read it as a wildcard rather than expanding it.

Array<string>
Allowed values: invoices:read invoices:write invoices:sign invoices:submit invoices:void invoices:export proformas:read proformas:write recurring:read recurring:write recurring:run documents:read documents:import documents:accept parties:read parties:write items:read items:write branches:read branches:write terminals:read terminals:write sequences:read sequences:write tenant:read tenant:write tenant:transfer_ownership tenant:delete legal:accept credentials:read credentials:write settings:read settings:write members:read members:invite members:update_role members:remove api_keys:read api_keys:manage roles:read roles:manage security:manage economic_activities:read economic_activities:write fx:read fx:refresh reports:read reports:export fiscal:write webhooks:manage audit:read billing:read billing:manage sandbox:reset *
assignable
required

Whether the role can be given to a member, by invitation or by changing their role. false for owner: ownership only moves through the ownership transfer, which leaves the previous owner as admin.

boolean
scopes
required

Every scope, with its group and whether an API key may hold it.

Array<object>
object
slug
required

The scope, <resource>:<action>; * grants every scope.

string
Allowed values: invoices:read invoices:write invoices:sign invoices:submit invoices:void invoices:export proformas:read proformas:write recurring:read recurring:write recurring:run documents:read documents:import documents:accept parties:read parties:write items:read items:write branches:read branches:write terminals:read terminals:write sequences:read sequences:write tenant:read tenant:write tenant:transfer_ownership tenant:delete legal:accept credentials:read credentials:write settings:read settings:write members:read members:invite members:update_role members:remove api_keys:read api_keys:manage roles:read roles:manage security:manage economic_activities:read economic_activities:write fx:read fx:refresh reports:read reports:export fiscal:write webhooks:manage audit:read billing:read billing:manage sandbox:reset *
group
required

The resource the scope belongs to, for laying out a permission matrix.

string
Allowed values: invoices proformas documents parties items branches terminals sequences tenant credentials settings members api_keys economic_activities fx reports webhooks audit billing admin
grantableToApiKey
required

Whether an API key may hold the scope (scopes when creating one). false for what only a person may do: members, API keys, billing, credentials, ownership and the like. * is grantable, and on a key means every scope an API key may hold — never these.

boolean
apiKeyPresets
required

Named lists of scopes the API key screen offers as a starting point.

Array<object>
object
slug
required

The preset. emit: what issuing a document end to end needs — create the draft, sign it, submit it to Hacienda and read it back with its status, PDF and XML. read_only: read documents, contacts and the item catalog; change nothing.

string
Allowed values: emit read_only
scopes
required

The scopes it selects, all of them grantable to an API key.

Array<string>
Allowed values: invoices:read invoices:write invoices:sign invoices:submit invoices:void invoices:export proformas:read proformas:write recurring:read recurring:write recurring:run documents:read documents:import documents:accept parties:read parties:write items:read items:write branches:read branches:write terminals:read terminals:write sequences:read sequences:write tenant:read tenant:write tenant:transfer_ownership tenant:delete legal:accept credentials:read credentials:write settings:read settings:write members:read members:invite members:update_role members:remove api_keys:read api_keys:manage roles:read roles:manage security:manage economic_activities:read economic_activities:write fx:read fx:refresh reports:read reports:export fiscal:write webhooks:manage audit:read billing:read billing:manage sandbox:reset *
Example
{
"roles": [
{
"slug": "owner",
"scopes": [
"invoices:read",
"reports:read"
]
}
],
"scopes": [
{
"slug": "invoices:read",
"group": "invoices"
}
],
"apiKeyPresets": [
{
"slug": "emit",
"scopes": [
"invoices:read",
"invoices:write",
"invoices:sign",
"invoices:submit"
]
}
]
}