POST
/
v1
/
customers
curl --request POST \
  --url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/customers \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'x-carbon-key: <x-carbon-key>' \
  --data '{
  "first_name": "Provide first name",
  "last_name": "Provide last name",
  "email": "Provide email",
  "phone": "Provide phone number",
  "dob": "Provide date of birth",
  "gender": "Provide gender",
  "street": "Provide street address",
  "city": "Provide city",
  "state": "Provide state",
  "country": "Provide country",
  "bvn": "Provide BVN",
  "nin": "Provide NIN"
}'
{
  "status": "success",
  "message": "Customer created successfully",
  "data": {
    "id": "e128cc08-a43a-4db3-a27d-64bbcba0a0f2",
    "first_name": "ola",
    "last_name": "ajayi",
    "email": "ola@yahoo.com",
    "phone": "08071000030",
    "gender": "MALE",
    "dob": "1990-01-01T00:00:00.000Z",
    "nin": "11111111111",
    "bvn": "11111111111",
    "address": {
      "street": "NO 1 LAGOS ROAD",
      "city": "IKEJA",
      "state": "LAGOS STATE",
      "country": "NIGERIA"
    },
    "is_business": false,
    "business_name": null,
    "mode": "sandbox",
    "created_at": "2024-03-07T10:12:34.000Z",
    "updated_at": "2024-03-07T10:12:34.000Z"
  }
}

Overview

This endpoint allows you to create a new customer by providing their details such as name, email, phone, and more.

Request

Method: POST
URL: /v1/customers

Parameters

NameInTypeRequiredDescription
x-carbon-keyHeaderstringYesAPI key for authentication.

Request Body

{
  "first_name": "Provide first name",
  "last_name": "Provide last name",
  "email": "Provide email",
  "phone": "Provide phone number",
  "dob": "Provide date of birth",
  "gender": "Provide gender",
  "street": "Provide street address",
  "city": "Provide city",
  "state": "Provide state",
  "country": "Provide country",
  "bvn": "Provide BVN",
  "nin": "Provide NIN"
}

Response

Status Code: 200 OK
Content-Type: application/json

Example Response

{
  "status": "success",
  "message": "Customer created successfully",
  "data": {
    "id": "e128cc08-a43a-4db3-a27d-64bbcba0a0f2",
    "first_name": "Ola",
    "last_name": "Ajayi",
    "email": "ola@yahoo.com",
    "phone": "08071000030",
    "gender": "MALE",
    "dob": "1990-01-01T00:00:00.000Z",
    "nin": "11111111111",
    "bvn": "11111111111",
    "address": {
      "street": "NO 1 LAGOS ROAD",
      "city": "Lagos",
      "state": "Lagos",
      "country": "Nigeria"
    },
    "is_business": false,
    "business_name": null,
    "mode": "sandbox",
    "created_at": "2024-03-07T10:12:34.000Z",
    "updated_at": "2024-03-07T10:12:34.000Z"
  }
}

Authorizations

apikey
string
header
required

Provide your API key in the 'apikey' header.

Headers

x-carbon-key
string
required

Body

application/json
Provide the required values for the request body.

The body is of type object.

Response

200
application/json
OK

The response is of type object.