Phone Number Verification in Ghana

Verify a Ghanaian mobile phone number and retrieve the subscriber's name.

Prerequisites

You'll need an API key. See Quickstart or Authentication if you don't have one yet.

Note: Verification endpoints use an API key in the X-API-Key header โ€” not a Bearer token. Verification POST requests also require an Idempotency-Key header.


Make the verification request

Ghana requires a networkCode to identify the carrier.

curl -X POST https://api.lira.com/api/v1/verify/phone \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: YOUR_IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "0240000000",
    "country": "GH",
    "networkCode": "MTN"
  }'

Request body fields

Field Type Required Description
phoneNumber string Yes Ghanaian phone number. Local format (e.g. 0240000000) or E.164 (e.g. +233240000000).
country string Yes Always GH.
networkCode string Yes Mobile network code. Must be one of: MTN, VOD, ATM.
mode string No sync (default) or async. Use async to receive the result via webhook.

Important: Omitting networkCode for Ghana will return a NETWORK_CODE_REQUIRED error. Always include the carrier code.

Supported networks

Network networkCode
MTN Ghana MTN
Vodafone Ghana VOD
AirtelTigo ATM

Read the result

Successful verification

{
  "id": "b2c3d4e5-...-...-...-...",
  "status": "success",
  "verificationType": "PHONE_NUMBER",
  "identifier": "0240000000",
  "country": "GH",
  "verifiedAt": "2026-03-09T10:06:00.000Z",
  "verified": true,
  "phoneNumber": "0240000000",
  "fullName": "Kwame Asante"
}

Note: Ghana phone verifications return fullName only. Individual name components (firstName, lastName) and dateOfBirth are not available for Ghanaian numbers.

Failed verification

{
  "id": "b2c3d4e5-...-...-...-...",
  "status": "failed",
  "verificationType": "PHONE_NUMBER",
  "identifier": "0240000000",
  "country": "GH",
  "verifiedAt": "2026-03-09T10:06:00.000Z",
  "verified": false,
  "error": {
    "code": "SUBSCRIBER_NOT_FOUND",
    "message": "No subscriber found for the provided phone number"
  }
}

Note: A 200 OK HTTP response does not mean the verification succeeded. Always check the status field.


Error handling

error.code Cause Action
SUBSCRIBER_NOT_FOUND Phone number not registered with the carrier Ask the user to verify their number is correct and active
INVALID_PHONE_NUMBER Phone number format is invalid Validate format (local or E.164) before submitting
INVALID_NETWORK_CODE networkCode not recognised Check the supported values in the table above
NETWORK_CODE_REQUIRED Verification submitted without networkCode Add networkCode to the request
PROVIDER_ERROR Upstream system returned an error Retry with exponential backoff
PROVIDER_TIMEOUT Upstream system timed out Retry โ€” transient error

For the full error code reference, see Errors.


Next steps