Account
Every /v1 route for account. This page is generated from the API's OpenAPI contract, so it always matches what the API accepts and returns.
Authentication, pagination, errors and idempotency work the same on every route. They are described once, in the API overview.
The signed-in person (or the owner of the API key)
GET /v1/me
Key scopes: READ and PLATFORM_API.
Returns
200withV1Me.
curl "https://api.naijacloud.com/v1/me" \
-H "Authorization: Bearer $NC_API_KEY"Sign in with email and password
POST /v1/auth/login
Returns a session token for Authorization: Bearer. On an account with two-factor on, accessToken is null and twoFactor.pendingToken goes to POST /v1/auth/two-factor. Throttled to 10 a minute; failures count towards the account lockout.
Key scopes: WRITE and PLATFORM_API.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
email | string (email) | yes | |
password | string | yes |
Returns
200withV1Session.
curl -X POST "https://api.naijacloud.com/v1/auth/login" \
-H "Authorization: Bearer $NC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"…","password":"…"}'Finish a sign-in that asked for a two-factor code
POST /v1/auth/two-factor
Each code works once; five wrong codes lock the account for 15 minutes.
Key scopes: WRITE and PLATFORM_API.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
pendingToken | string | yes | The pendingToken the sign-in returned. |
code | string | yes | A 6-digit authenticator code, or a one-time recovery code. |
Returns
200withV1Session.
curl -X POST "https://api.naijacloud.com/v1/auth/two-factor" \
-H "Authorization: Bearer $NC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"pendingToken":"…","code":"…"}'Types
V1Me
| Field | Type | Notes |
|---|---|---|
id | string (uuid) | |
email | string (email) | |
firstName | string, or null | |
lastName | string, or null | |
emailVerifiedAt | string (date-time), or null | When the email address was confirmed; null until then. |
createdAt | string (date-time) |
V1Session
| Field | Type | Notes |
|---|---|---|
accessToken | string, or null | |
user | V1Me, or null | |
twoFactor | V1TwoFactorChallenge, or null |
V1TwoFactorChallenge
| Field | Type | Notes |
|---|---|---|
pendingToken | string | Send to POST /v1/auth/two-factor with a code. |
expiresAt | string (date-time) |