---
# System prepended metadata

title: API key

---

# API key 

![](https://i.imgur.com/4IK49ib.png)



### Roles UI example
| Name | Role | CreatedAt |
| -------- | -------- | -------- |
| Key for projects    | projects admin, modules editor     | Date    |


### The list of the roles
For each entity (organization, project, platforms) we will have options:

Admin - all actions are available
Editor - view and edit (can not delete something or create new)
Viewer - only view

Also we can have like Viewer, Editor and Admin for all entities
in a case when you do not want to exclude something

![](https://i.imgur.com/zjcmwpT.png)


### Log collections
we need to store information about actions for each API key
exactly, when somebody edit, create or delete something in our app



| Field Name | Type | Comments |
| -------- | -------- | -------- |
| API key name     | String     |     |
| Action type     | Create or Update or Delete     |      |
| Changes   | Object     |  Only for create and update actions    |
| Date   | Date     |      |

#### Changes example:

```
{
    organizationId: 7,
    data: {
        name: 'New name'
    }
}
```
or 
```
{
    facebookBotId: 74,
    data: {
        prevValue: {
            applicationId: 6
        },
        newValue: {
          applicationId: 7
        }
    }
}
```
