🧑‍🤝‍🧑Create User

Create a new user in the DrugNet system.

Good to know: A quick start guide can be good to help folks get up and running with your API in a few steps. Some people prefer diving in with the basics rather than meticulously reading every page of documentation!

Make your first request

To make your first request, send an authenticated request to the drugnet endpoint. This will create a user, which is nice.

Create user.

POST /create_user

This endpoint allows you to create a new user in the DrugNet System.

Request Body

NameTypeDescription

name*

string

The name of the user

email*

string

The email of the user

phone*

string

The phone of the user

{
  "status": "success",
  "message": "User created successfully",
  "user": {
    "id": 123,
    "name": "John Doe",
    "phone": "+233 xx xxx xxxx",
    "email": "john.doe@doe.com"
  }
}

Good to know: You can use the API Method block to fully document an API method. You can also sync your API blocks with an OpenAPI file or URL to auto-populate them.

Take a look at how you might call this method using our official libraries, or via curl:

curl --location '/create_user' \
--header 'x-api-key: YOUR API KEY' \
--form 'name="YOUR NAME"' \
--form 'phone="YOUR PHONE"' \
--form 'email="YOUR EMAIL"' 

Example

{
    "code": 200,
    "success": true,
    "message": "User created sucessfully"
}

Last updated