---
description: This endpoint can be used to create other users for your organization.
---

# Create

Create User

## Create user.&#x20;

<mark style="color:green;">`POST`</mark> `/user`

#### Headers

| Name                                            | Type            | Description |
| ----------------------------------------------- | --------------- | ----------- |
| secret-key<mark style="color:red;">\*</mark>    | user secret key |             |
| Authorization<mark style="color:red;">\*</mark> | Token           |             |

#### Request Body

| Name                                       | Type   | Description                       |
| ------------------------------------------ | ------ | --------------------------------- |
| fullname<mark style="color:red;">\*</mark> | String | User first name and last name     |
| email<mark style="color:red;">\*</mark>    | String | User email                        |
| password<mark style="color:red;">\*</mark> | String | User password                     |
| role<mark style="color:red;">\*</mark>     | String | User role (Either Basic or Admin) |

{% tabs %}
{% tab title="200 Success" %}
```json
{
    "status": "Success",
    "description": "User Created Successfully",
    "user_id": "G-K5YK-tk4jr"
}
```
{% endtab %}

{% tab title="401 Unauthorized " %}
```json
{
    "status": "Error",
    "description": "Organization Secret Key is Required"
}
```
{% endtab %}
{% endtabs %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/user',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "fullname":"Nnena Precious",
    "email":"nnkea2@gmail.com",
    "password":"1234",
    "role":"basic"
}',
  CURLOPT_HTTPHEADER => array(
    'secret-key: {{Your Secret Key}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```
