POST
Send a one-time code to a customer

Authorizations

Authorization
string
header
default:sk_test_docs_246e232c64ccc7a001bf61ec0f2e6ab0
required

Authorization: Bearer <secret key>. Secret keys belong to your organisation, are shown once when created in the dashboard, and are scoped (see x-required-scope on each operation). Keep them on your server. Live keys are issued after your business is verified. Publishable keys (pk_) are only for @ketapay/checkout and don't work here.

Headers

Idempotency-Key
string
required

Unique key for this operation. Retries with the same key return the first result.

Maximum string length: 255
Example:

"7f3e2a10-6c4d-4b8e-9a1f-2d5c8e7b6a40"

Body

application/json

Exactly one of email and phone; the code goes there.

email
string<email>
required

Email address. Matched without regard to case.

Maximum string length: 254
Example:

"ada@example.com"

phone
string

Nigerian mobile number in E.164 format

Pattern: ^\+234[789][01]\d{8}$
Example:

"+2348012345678"

Response

Code sent

id
string<uuid>
required
object
string
required
Allowed value: "customer_session"
email
string<email> | null
required

Email address. Matched without regard to case.

Maximum string length: 254
Example:

"ada@example.com"

phone
string | null
required

Nigerian mobile number in E.164 format

Pattern: ^\+234[789][01]\d{8}$
Example:

"+2348012345678"

status
enum<string>
required
Available options:
code_sent,
verified,
failed,
expired
channel
enum<string>
required

Where the code was delivered

Available options:
email,
whatsapp,
sms
expires_at
string<date-time>
required

When the code stops working