Create

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

Create User

Create user.

POST /user

Headers

Name
Type
Description

secret-key*

user secret key

Authorization*

Token

Request Body

Name
Type
Description

fullname*

String

User first name and last name

email*

String

User email

password*

String

User password

role*

String

User role (Either Basic or Admin)

{
    "status": "Success",
    "description": "User Created Successfully",
    "user_id": "G-K5YK-tk4jr"
}
<?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;

Last updated