Create Permission

POST /permissions

Creates a permission that allows certain specified operations to be executed. Response is either the permission object itself (success) or a reason why it was not possible to create the permission (failure).

Required Permissions

NameConditions

Permissions:Create

Always Required

Request body

In the request body specify the permisison name, as well as a list of operations that this permission will allow.

propertyType - RequiredDescription

name

String -Required

Name of the permission.

operations

String Array - Required

List of allowed operations. This this list for all the available operations.

Request example

{
  "name": "US Perms",
  "operations": ["Wallets:Read", "Wallets:Create"]
}

Response

Response example

// permission
{
    "id": "pm-orange-apple-2b17a80613",
    "name": "US Perms",
    "operations": ["Wallets:Read", "Wallets:Create"],
    "status": "Active",
    "isImmutable": false,
    "dateCreated": "2022-10-26T08:30:25.348Z",
    "dateUpdated": "2022-10-26T08:30:25.348Z",
    "isArchived": false
}

Notes

A permission name cannot be an empty string and a permission must have at least one operation specified.

A permission name is the unique identifier of a permission created in your organization. Therefore, multiple permissions with the same name cannot exist. If a permission has been archived, its name is still considered as taken.

Last updated