curl --request POST \
--url https://{host}/v1/applications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"state_of_origin": "<string>",
"lga_of_origin": "<string>",
"next_of_kin_name": "<string>",
"next_of_kin_phone": "<string>",
"bank": "<string>",
"bank_account_name": "<string>",
"bank_account_number": "<string>",
"bank_account_opened": "2023-12-25",
"bvn": "<string>",
"middle_name": "<string>",
"mothers_maiden_name": "<string>",
"next_of_kin_relationship": "<string>",
"next_of_kin_address": "<string>",
"nin": "<string>",
"tax_id": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
email: '<string>',
phone: '<string>',
street: '<string>',
city: '<string>',
state: '<string>',
postcode: '<string>',
state_of_origin: '<string>',
lga_of_origin: '<string>',
next_of_kin_name: '<string>',
next_of_kin_phone: '<string>',
bank: '<string>',
bank_account_name: '<string>',
bank_account_number: '<string>',
bank_account_opened: '2023-12-25',
bvn: '<string>',
middle_name: '<string>',
mothers_maiden_name: '<string>',
next_of_kin_relationship: '<string>',
next_of_kin_address: '<string>',
nin: '<string>',
tax_id: '<string>'
})
};
fetch('https://{host}/v1/applications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/applications"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"state_of_origin": "<string>",
"lga_of_origin": "<string>",
"next_of_kin_name": "<string>",
"next_of_kin_phone": "<string>",
"bank": "<string>",
"bank_account_name": "<string>",
"bank_account_number": "<string>",
"bank_account_opened": "2023-12-25",
"bvn": "<string>",
"middle_name": "<string>",
"mothers_maiden_name": "<string>",
"next_of_kin_relationship": "<string>",
"next_of_kin_address": "<string>",
"nin": "<string>",
"tax_id": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/applications"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode\": \"<string>\",\n \"state_of_origin\": \"<string>\",\n \"lga_of_origin\": \"<string>\",\n \"next_of_kin_name\": \"<string>\",\n \"next_of_kin_phone\": \"<string>\",\n \"bank\": \"<string>\",\n \"bank_account_name\": \"<string>\",\n \"bank_account_number\": \"<string>\",\n \"bank_account_opened\": \"2023-12-25\",\n \"bvn\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"mothers_maiden_name\": \"<string>\",\n \"next_of_kin_relationship\": \"<string>\",\n \"next_of_kin_address\": \"<string>\",\n \"nin\": \"<string>\",\n \"tax_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "application",
"id": "<string>",
"state": "sending",
"reference": "<string>",
"account": "<string>",
"reason": "<string>",
"reject_reason": "invalid_field",
"param": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"object": "application",
"id": "<string>",
"state": "sending",
"reference": "<string>",
"account": "<string>",
"reason": "<string>",
"reject_reason": "invalid_field",
"param": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}Apply for an account
Sends your customer’s application to the broker once. We pass the identity details through without storing or logging them. If an application ends in uncertain, we don’t send it again.
curl --request POST \
--url https://{host}/v1/applications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"state_of_origin": "<string>",
"lga_of_origin": "<string>",
"next_of_kin_name": "<string>",
"next_of_kin_phone": "<string>",
"bank": "<string>",
"bank_account_name": "<string>",
"bank_account_number": "<string>",
"bank_account_opened": "2023-12-25",
"bvn": "<string>",
"middle_name": "<string>",
"mothers_maiden_name": "<string>",
"next_of_kin_relationship": "<string>",
"next_of_kin_address": "<string>",
"nin": "<string>",
"tax_id": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
email: '<string>',
phone: '<string>',
street: '<string>',
city: '<string>',
state: '<string>',
postcode: '<string>',
state_of_origin: '<string>',
lga_of_origin: '<string>',
next_of_kin_name: '<string>',
next_of_kin_phone: '<string>',
bank: '<string>',
bank_account_name: '<string>',
bank_account_number: '<string>',
bank_account_opened: '2023-12-25',
bvn: '<string>',
middle_name: '<string>',
mothers_maiden_name: '<string>',
next_of_kin_relationship: '<string>',
next_of_kin_address: '<string>',
nin: '<string>',
tax_id: '<string>'
})
};
fetch('https://{host}/v1/applications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/applications"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"email": "<string>",
"phone": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"state_of_origin": "<string>",
"lga_of_origin": "<string>",
"next_of_kin_name": "<string>",
"next_of_kin_phone": "<string>",
"bank": "<string>",
"bank_account_name": "<string>",
"bank_account_number": "<string>",
"bank_account_opened": "2023-12-25",
"bvn": "<string>",
"middle_name": "<string>",
"mothers_maiden_name": "<string>",
"next_of_kin_relationship": "<string>",
"next_of_kin_address": "<string>",
"nin": "<string>",
"tax_id": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/applications"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode\": \"<string>\",\n \"state_of_origin\": \"<string>\",\n \"lga_of_origin\": \"<string>\",\n \"next_of_kin_name\": \"<string>\",\n \"next_of_kin_phone\": \"<string>\",\n \"bank\": \"<string>\",\n \"bank_account_name\": \"<string>\",\n \"bank_account_number\": \"<string>\",\n \"bank_account_opened\": \"2023-12-25\",\n \"bvn\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"mothers_maiden_name\": \"<string>\",\n \"next_of_kin_relationship\": \"<string>\",\n \"next_of_kin_address\": \"<string>\",\n \"nin\": \"<string>\",\n \"tax_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "application",
"id": "<string>",
"state": "sending",
"reference": "<string>",
"account": "<string>",
"reason": "<string>",
"reject_reason": "invalid_field",
"param": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"object": "application",
"id": "<string>",
"state": "sending",
"reference": "<string>",
"account": "<string>",
"reason": "<string>",
"reject_reason": "invalid_field",
"param": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}Authorizations
Authorization: Bearer <key>. Sandbox keys start with mgw_test_ and live keys start with mgw_live_. Each key works only in its own environment, and a live key works only from the IP addresses or ranges registered for it.
Headers
A key you choose to identify this request. Send the same key every time you retry the request. Once used, a key stays tied to that request permanently. It must be printable ASCII with no spaces, and we compare it byte for byte. Send the header only once.
1 - 255^[!-~]+$Body
Every field is a string of at most 200 bytes, trimmed at both ends, with no control or invisible characters. We reject unknown fields and any field that appears twice, even with different letter case.
200200M, F Must be after 1900-01-01, and no later than today in Lagos.
200200200200A code from GET /v1/reference/states.
^[A-Za-z0-9-]{1,32}$200A code from GET /v1/reference/states.
^[A-Za-z0-9-]{1,32}$A code from GET /v1/reference/states/{state}/lgas.
^[A-Za-z0-9-]{1,32}$200200A code from GET /v1/reference/banks.
^[A-Za-z0-9-]{1,32}$200200Can't be before date_of_birth or after today in Lagos.
^[0-9]{11}$200200200200^[0-9]{11}$200Response
This idempotency key was already used for this same application, so we didn't send anything new.
"application"Unique identifier for the application. Starts with app_.
sending: stored, and the send is in progress. submitted: the broker accepted it. opened: account is the new account, and you can trade for it. uncertain: we don't know whether the broker received it. We don't send it again; we reconcile it with the broker. rejected: see reject_reason and param. refused: it never reached the broker. unplaced: we found that the broker never had it.
sending, submitted, opened, uncertain, rejected, refused, unplaced The broker's reference for the application, once the broker has accepted it.
The account code, once the account is opened.
A sentence explaining the application's current state. It's for people to read, so don't use it in your logic.
Why the application was rejected. Set only when state is rejected.
invalid_field, already_at_broker, rejected_by_broker, declined_by_broker, null The field that caused the rejection, when the rejection names one. Never includes the field's value.