GET
/
external
/
users
Fetch Users
curl --request GET \
  --url https://direct-pub-api.directgh.com/api/v1/external/users \
  --header 'Authorization: <api-key>'
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"otherName": "Michael",
"email": "john.doe@example.com",
"mobileNumber": "+233241234567",
"ghanaCardNumber": "GHA-123456789-1",
"account": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"accountType": "MOMO",
"accountNumber": "0241234567",
"network": "MTN",
"accountName": "John Doe",
"createdAt": "2024-01-15T10:30:00Z"
},
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com",
"mobileNumber": "+233241234568",
"ghanaCardNumber": "GHA-987654321-2",
"account": {
"id": "770e8400-e29b-41d4-a716-446655440001",
"accountType": "BANK",
"accountNumber": "1234567890",
"bankName": "Ghana Commercial Bank",
"accountName": "Jane Smith",
"createdAt": "2024-01-15T10:30:00Z"
},
"createdAt": "2024-01-15T10:30:00Z"
}
],
"meta": {
"page": 1,
"perPage": 10,
"total": 2,
"totalPages": 1
}
}

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 for POST/PUT requests. For GET requests, the signature is generated using the query parameters (JSON stringified) instead of the request body. Contact your account manager to obtain your public key and secret key for generating signatures.

Query Parameters

keyword
string

Search keyword to filter users by first name, other name, last name, mobile number, or Ghana Card number

perPage
string
default:10

Number of users per page (used when paginate is true)

paginate
string
default:false

Whether to paginate the results

page
string
default:1

Page number (used when paginate is true)

Response

Users fetched successfully

Paginated list of users

data
object[]

Array of user objects

meta
object

Pagination metadata