# Create Wallet

## Create 1app Wallet

<mark style="color:green;">`POST`</mark> `https://api.oneappgo.com/v1/business/createwallet`

To create wallet on 1app, you need to have 1app Business account. On your dashboard go to the create app section to create app and generate App ID/Token

#### Request Body

| Name                                       | Type   | Description                                                                                                                      |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------- |
| apptoken<mark style="color:red;">\*</mark> | String | Your generate App ID on 1app business account                                                                                    |
| email<mark style="color:red;">\*</mark>    | String | Email                                                                                                                            |
| phoneno<mark style="color:red;">\*</mark>  | String | Phone number                                                                                                                     |
| fname<mark style="color:red;">\*</mark>    | String | Account Firstname                                                                                                                |
| sname<mark style="color:red;">\*</mark>    | String | Account Surname                                                                                                                  |
| auth<mark style="color:red;">\*</mark>     | String | Create a secure account password of at least 6 characters long (special character,  number, letter) to authenticate your account |
| referby                                    | String |                                                                                                                                  |

Take a look at how you might do this:

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request POST 'https://api.oneappgo.com/v1/business/createwallet' \
--header 'Authorization: Bearer SECRET_KEY' \
--form 'apptoken="APPID"' \
--form 'fname="testname"' \
--form 'sname="testsurname"' \
--form 'email="email@example.com"' \
--form 'phoneno="08000000000"' \
--form 'auth="D@tqj8265!"' \
--form 'referby=""'
```

{% endtab %}

{% tab title="NodeJs" %}

```
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://api.oneappgo.com/v1/business/createwallet',
  'headers': {
    'Authorization': 'Bearer SECRET_KEY'
  },
  formData: {
    'apptoken': 'APPID',
    'fname': 'testname',
    'sname': 'testsurname',
    'email': 'email@example.com',
    'phoneno': '08000000000',
    'auth': 'D@tqj8265',
    'referby': ''
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.oneappgo.com/v1/business/createwallet',
  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 => array('apptoken' => 'APPID','fname' => 'testname','sname' => 'testsurname','email' => 'email@example.com','phoneno' => '08000000000','auth' => 'D@tqj8265','referby' => ''),
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Python" %}

```
import requests

url = "https://api.oneappgo.com/v1/business/createwallet"

payload={'apptoken': 'APPID',
'fname': 'testname',
'sname': 'testsurname',
'email': 'email@example.com',
'phoneno': '08000000000',
'auth': 'D@tqj8265',
'referby': ''}
files=[

]
headers = {
  'Authorization': 'Bearer SECRET_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

```

{% endtab %}
{% endtabs %}

### Sample Response

```json
{
    "status": true,
    "email": "email@example.com",
    "accountid": "3107908",
    "businessid": "",
    "msg": "Wallet successfully created!"
}
```
