Mailmus

Access

POST
/projects/{projectId}/access/check
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/projects/string/access/check" \  -H "Content-Type: application/json" \  -d '{    "permission": "invoice:create"  }'
{  "allowed": true,  "reason": "PROJECT_ROLE",  "permission": "string",  "scope": "PROJECT",  "roles": [    "string"  ],  "explanation": [    {      "step": "customer",      "ok": true    }  ]}
GET
/projects/{projectId}/access/roles
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Query Parameters

scope?string

Value in

  • "PROJECT"
  • "ORGANIZATION"

Response Body

application/json

curl -X GET "https://example.com/projects/string/access/roles"
[  {    "key": "string",    "name": "string",    "description": "string",    "scope": "PROJECT",    "appliesToAllOrganizations": true,    "system": true,    "permissions": [      "string"    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]
POST
/projects/{projectId}/access/roles
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/projects/string/access/roles" \  -H "Content-Type: application/json" \  -d '{    "key": "billing-admin",    "name": "Billing admin",    "scope": "PROJECT"  }'
{  "key": "string",  "name": "string",  "description": "string",  "scope": "PROJECT",  "appliesToAllOrganizations": true,  "system": true,  "permissions": [    "string"  ],  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
GET
/projects/{projectId}/access/roles/{key}
AuthorizationBearer <token>

In: header

Path Parameters

key*string
projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/access/roles/string"
{  "key": "string",  "name": "string",  "description": "string",  "scope": "PROJECT",  "appliesToAllOrganizations": true,  "system": true,  "permissions": [    "string"  ],  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/projects/{projectId}/access/roles/{key}
AuthorizationBearer <token>

In: header

Path Parameters

key*string
projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/projects/string/access/roles/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "key": "string",  "name": "string",  "description": "string",  "scope": "PROJECT",  "appliesToAllOrganizations": true,  "system": true,  "permissions": [    "string"  ],  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
DELETE
/projects/{projectId}/access/roles/{key}
AuthorizationBearer <token>

In: header

Path Parameters

key*string
projectId*string

Response Body

application/json

curl -X DELETE "https://example.com/projects/string/access/roles/string"
{  "deleted": true}
GET
/projects/{projectId}/access/permissions
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/access/permissions"
[  {    "key": "string",    "description": "string",    "createdAt": "2019-08-24T14:15:22Z"  }]
POST
/projects/{projectId}/access/permissions
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/projects/string/access/permissions" \  -H "Content-Type: application/json" \  -d '{    "key": "invoice:create"  }'
{  "key": "string",  "description": "string",  "createdAt": "2019-08-24T14:15:22Z"}
DELETE
/projects/{projectId}/access/permissions/{key}
AuthorizationBearer <token>

In: header

Path Parameters

key*string
projectId*string

Response Body

application/json

curl -X DELETE "https://example.com/projects/string/access/permissions/string"
{  "deleted": true}