IAM
10 routes. Paths are relative to https://api.intersink.com/v1.
- GET/iam/{scope}/{scopeId}/matrixRole × permission matrix
- PUT/iam/{scope}/{scopeId}/matrixReplace the permission keys of the listed roles
- GET/iam/{scope}/{scopeId}/meMy effective permissions in a business or channel
- PUT/iam/{scope}/{scopeId}/members/{memberId}/roleAssign (or clear) a member's role
- GET/iam/{scope}/{scopeId}/permissionsPermission keys of the scope (core + installed apps)
- GET/iam/{scope}/{scopeId}/rolesList roles of a business or channel
- POST/iam/{scope}/{scopeId}/rolesCreate a role
- PATCH/iam/{scope}/{scopeId}/roles/{roleId}Rename a role or replace its permissions
- DELETE/iam/{scope}/{scopeId}/roles/{roleId}Archive a role (409 while members hold it)
- GET/iam/levelsThe built-in levels (Owner, Admin, Manager, Editor, Viewer) of a business and a channel, with what each one holds
Role × permission matrix
GET/iam/{scope}/{scopeId}/matrix
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Replace the permission keys of the listed roles
PUT/iam/{scope}/{scopeId}/matrix
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| rolesrequired | object[] | |
| roles[].role_idrequired | string | |
| roles[].permissionsrequired | string[] |
Response
200. The payload in data is not described in the spec yet.
My effective permissions in a business or channel
GET/iam/{scope}/{scopeId}/me
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path | |
| scopeIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Assign (or clear) a member's role
PUT/iam/{scope}/{scopeId}/members/{memberId}/role
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path | |
| memberIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| role_id | string | Role to assign; null clears it (the legacy permission level applies again) |
Response
200. The payload in data is not described in the spec yet.
Permission keys of the scope (core + installed apps)
GET/iam/{scope}/{scopeId}/permissions
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path |
Response
200. The payload in data is not described in the spec yet.
List roles of a business or channel
GET/iam/{scope}/{scopeId}/roles
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Create a role
POST/iam/{scope}/{scopeId}/roles
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| titlerequired | string | At most 60 characters. Example: "Sales" |
| description | string | At most 255 characters. Example: "Leads, contacts, orders and tickets" |
| permissions | string[] | Permission keys (see GET /iam/:scope/:scopeId/permissions) |
Response
201. The payload in data is not described in the spec yet.
Rename a role or replace its permissions
PATCH/iam/{scope}/{scopeId}/roles/{roleId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path | |
| roleIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 60 characters. Example: "Sales" |
| description | string | At most 255 characters. Example: "Leads, contacts, orders and tickets" |
| permissions | string[] | Permission keys (see GET /iam/:scope/:scopeId/permissions) |
Response
200. The payload in data is not described in the spec yet.
Archive a role (409 while members hold it)
DELETE/iam/{scope}/{scopeId}/roles/{roleId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| scoperequired | string, path | |
| roleIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
The built-in levels (Owner, Admin, Manager, Editor, Viewer) of a business and a channel, with what each one holds
GET/iam/levels
Public: no sign-in needed.
Response
200. The payload in data is not described in the spec yet.