POST
/
v1
/
accounts
curl --request POST \
  --url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'x-carbon-key: <x-carbon-key>' \
  --data '{
  "customer_id": "Provide customer ID",
  "account_type": "static or dynamic"
}'
{
  "status": "success",
  "message": "account created successfully",
  "data": {
    "id": "5da78692-ffbc-4f1e-b60b-4febd75c4d66",
    "account": {
      "bank_name": "CARBON LIMITED",
      "bank_code": "565",
      "account_name": "MARK ERELU-CARBON",
      "account_number": "6142285181",
      "client_id": "452716534"
    },
    "owner": {
      "first_name": "mark",
      "last_name": "erelu",
      "email": "erelu@yahoo.com",
      "phone": "08088000030"
    },
    "account_type": "static",
    "mode": "sandbox",
    "created_at": "2024-03-07T15:03:03.000Z",
    "updated_at": "2024-03-07T15:03:03.000Z"
  }
}

Overview

This endpoint creates a new virtual account for a customer.

Endpoint

POST /accounts

Request Body

{
    "customer_id": "string",
    "account_type": "static"
}

Response

{
    "status": "success",
    "message": "account created successfully",
    "data": {
        "id": "5da78692-ffbc-4f1e-b60b-4febd75c4d66",
        "account": {
            "bank_name": "DEMO BANK",
            "bank_code": "565",
            "account_name": "OJO BENSON - DEMO BANK",
            "account_number": "0000000000",
            "client_id": "0000000"
        },
        "owner": {
            "first_name": "ojo",
            "last_name": "erelu",
            "email": "erelu@yahoo.com",
            "phone": "08088000030"
        },
        "account_type": "static",
        "mode": "sandbox",
        "created_at": "2024-03-07T15:03:03.000Z",
        "updated_at": "2024-03-07T15:03:03.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.
customer_id
string
required

Provide customer ID

account_type
string
required

static or dynamic

Response

200 - application/json
OK

The response is of type object.