# Generate API Keys

| **API URL**         | {{url}}/fhir-user-service/api-key-managers/generate |
| ------------------- | --------------------------------------------------- |
| **Method**          | POST                                                |
| **Request Headers** | Authorization : Bearer \[token]                     |
| **Description**     | Generates a new API key for a specific user         |

#### **Input** <a href="#accountcreate-input" id="accountcreate-input"></a>

<table data-header-hidden><thead><tr><th width="233"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Field Name</strong></td><td><strong>Type</strong></td><td><strong>Example</strong></td></tr><tr><td>Authorization(Header)</td><td>String</td><td>Authorized token from login response</td></tr><tr><td>userId</td><td>Long</td><td>2</td></tr></tbody></table>

#### **Sample Input:** <a href="#accountcreate-sampleinput" id="accountcreate-sampleinput"></a>

```postman_json
{
    "id": 1
}
```

#### **Sample Output:** <a href="#accountcreate-sampleoutput" id="accountcreate-sampleoutput"></a>

```
{
    "message": "API key manager created successfully.",
    "entity": {
    accessKeyId: "K5rbzpch9JJku88lf4wNgSktoJGF4A7zd2QjHPV0w9RlF1JFgKSC4dcsr3+Val3Z0xHRsk9CmhwzI0iO"
    secretAccessKey: "SBJRfD4MXP/DmnkTLXnjJbn2yXNLqxt8iSbzfjbDuasB8hMv2/FdDO+DmgwkbXrAGZhGnnJOJyvqBBUUtPQJBdW0ARH78NC/o9dHVXNpjUrYAZq4OpH/3aKYCQd3hZgafQ2hRHODG5vqanVlgz533erFu/IhjBeK"
     },
    "status": true,
    "entityList": null,
    "responseCode": 200,
    "totalCount": null
}
```
