Skip to Content
API ReferenceOrganizations

Organizations

Base path: https://gateway.useyona.com/a/v1/organizations

An organization is your business entity on Yona. It holds your subscription, credit pool, team members, and API keys. B2B2B platforms can create child organizations to manage multiple businesses under one account.


Create organization

POST /a/v1/organizations

Create a new organization or child organization (for B2B2B platforms).

Request body

FieldTypeRequiredDescription
businessNamestringYesOrganization name, 2-255 chars
emailstringYesContact email
taxNostringNoTax number (format: XXXXXXXX-XXXX)
phoneNumberstringNoContact phone
websitestringNoWebsite URL
countrystringNoISO 2-letter country code
bash
curl -X POST https://gateway.useyona.com/a/v1/organizations \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "businessName": "Lagos Tech Innovations Nigeria Ltd",
    "email": "admin@lagostech.ng",
    "country": "NG"
  }'

Get current organization

GET /a/v1/organizations/me

bash
curl https://gateway.useyona.com/a/v1/organizations/me \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Update organization

PATCH /a/v1/organizations/me

bash
curl -X PATCH https://gateway.useyona.com/a/v1/organizations/me \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "businessName": "Zenith Software Solutions Nigeria Ltd",
    "phoneNumber": "+2348012345678"
  }'

Verify tax number

POST /a/v1/organizations/me/onboarding/verify-tax-number

Request body

FieldTypeRequiredDescription
taxNostringYesTax number (format: XXXXXXXX-XXXX)
bash
curl -X POST https://gateway.useyona.com/a/v1/organizations/me/onboarding/verify-tax-number \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{ "taxNo": "31245678-0001" }'

Send phone verification

POST /a/v1/organizations/me/onboarding/send-phone-verification

Request body

FieldTypeRequiredDescription
phoneNumberstringYesPhone number to verify
bash
curl -X POST https://gateway.useyona.com/a/v1/organizations/me/onboarding/send-phone-verification \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{ "phoneNumber": "+2348012345678" }'

Verify phone

POST /a/v1/organizations/me/onboarding/verify-phone

Request body

FieldTypeRequiredDescription
otpstringYesOTP received via SMS
bash
curl -X POST https://gateway.useyona.com/a/v1/organizations/me/onboarding/verify-phone \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{ "otp": "482916" }'

Update credit pool config

PATCH /a/v1/organizations/me/credit-pool-config

Configure how credits flow to child organizations (B2B2B).

Request body

FieldTypeRequiredDescription
primaryCoversSecondarybooleanNoPrimary pool pays for all child usage
fallbackToPrimarybooleanNoChild uses own pool first, primary covers shortfall
minimumReservenumberNoCredits to keep in reserve
bash
curl -X PATCH https://gateway.useyona.com/a/v1/organizations/me/credit-pool-config \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "primaryCoversSecondary": true,
    "minimumReserve": 500
  }'

Other organization endpoints

MethodPathDescription
GET/a/v1/organizationsList organizations
GET/a/v1/organizations/:idGet organization by ID
POST/a/v1/organizations/me/onboarding/completeComplete onboarding
POST/a/v1/organizations/switchSwitch active organization
GET/a/v1/organizations/me/childrenList child organizations
GET/a/v1/organizations/me/credit-pool-configGet credit pool config
Last updated on