POST
/
external
/
users
curl --request POST \
--url https://direct-pub-api.directgh.com/api/v1/external/users \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"otherName": "Michael",
"mobileNumber": "+233241234567",
"dateOfBirth": "1990-05-15",
"ghanaCardNumber": "GHA-123456789-1",
"accountType": "MONO",
"accountNumber": "0241234567",
"network": "MTN",
"accountName": "John Doe"
}
'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"otherName": "Michael",
"email": "john.doe@example.com",
"mobileNumber": "+233241234567",
"createdAt": "2024-01-20T14:45:00Z"
}

Authorizations

Authorization
string
header
required

HMAC signature authentication. The Authorization header must contain your public key and HMAC signature in the format: public_key:signature

Format: Authorization: public_key:signature

Example: Authorization: pub_abc123xyz:abc123def456ghi789...

The signature is generated by creating an HMAC hash of the request body (JSON stringified) using your secret key. Contact your account manager to obtain your public key and secret key for generating signatures.

Body

application/json
email
string<email>
required

User's email address

Example:

"john.doe@example.com"

firstName
string
required

User's first name

Example:

"John"

lastName
string
required

User's last name

Example:

"Doe"

mobileNumber
string
required

User's mobile phone number (must be a valid Ghanaian mobile number)

Example:

"+233241234567"

dateOfBirth
string<date>
required

User's date of birth

Example:

"1990-05-15"

ghanaCardNumber
string
required

User's Ghana Card number

Example:

"GHA-123456789-1"

otherName
string | null

User's middle name or other name (optional)

Example:

"Michael"

accountType
enum<string> | null

Type of account (MONO for Mobile Money, BANK for bank account). Required if account details are provided.

Available options:
MONO,
BANK
Example:

"MONO"

accountNumber
string | null

Account number. Required if accountType is provided.

Example:

"0241234567"

network
enum<string> | null

Mobile Money network. Required if accountType is MONO.

Available options:
MTN,
AIRTEL_TIGO,
TELECEL
Example:

"MTN"

bankName
string | null

Bank name. Required if accountType is BANK.

Example:

"Ghana Commercial Bank"

accountName
string | null

Name on the account. Required if accountType is provided.

Example:

"John Doe"

Response

User created or added to institution successfully

User information

id
string<uuid>

Unique identifier of the user

Example:

"550e8400-e29b-41d4-a716-446655440000"

firstName
string

User's first name

Example:

"John"

lastName
string

User's last name

Example:

"Doe"

otherName
string | null

User's middle name or other name

Example:

"Michael"

email
string<email>

User's email address

Example:

"john.doe@example.com"

mobileNumber
string | null

User's mobile phone number

Example:

"+233241234567"

createdAt
string<date-time> | null

Date and time when the user was created

Example:

"2024-01-15T10:30:00Z"