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
  }'

Tax authority connection

Connect your organization’s NRS (Nigeria Revenue Service) taxpayer identity. Required before submitting invoices to the tax authority in production. You can finalise invoices and send them to buyers without a connection — only submission requires it.

Get tax authority connection

GET /a/v1/organizations/:orgId/tax-registration

Get your organization’s current tax authority connection status. Returns null if no connection exists.

bash
curl https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/tax-registration \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
StatusCodeTrigger
404RES001Organization not found

Connect tax authority

PUT /a/v1/organizations/:orgId/tax-registration

Connect or update your NRS taxpayer identity. Verifies the credentials with the tax authority before marking the connection as connected. If verification fails, the connection remains pending and the error reason is returned. The nrsServiceId is an 8-character identifier assigned by NRS — find it in your NRS MBS portal.

Request body

FieldTypeRequiredDescription
nrsBusinessIdstringYesBusiness ID assigned by FIRS. Found in your NRS MBS portal  under your taxpayer profile after authorizing Yona as your Access Point.
nrsServiceIdstringYes8-character Service ID assigned by FIRS when you authorize an Access Point. Found in your NRS MBS portal under “Authorized Applications.”
irnTemplatestringNoCustom IRN format. Default: {{invoice_id}}-{ServiceID}-{{YYYYMMDD}}. Most users don’t need to change this.
bash
curl -X PUT https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/tax-registration \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "nrsBusinessId": "BUS-NG-12345",
    "nrsServiceId": "94ND90NR"
  }'
StatusCodeTrigger
400TAX001Verification with tax authority failed
400VAL001Invalid or missing fields
404RES001Organization not found

Revoke connection

POST /a/v1/organizations/:orgId/tax-registration/revoke

Revoke the tax authority connection. Invoice submission will be blocked until reconnected. Finalising and sending to buyers are unaffected. No request body.

bash
curl -X POST https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/tax-registration/revoke \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
StatusCodeTrigger
404RES001Organization or connection not found

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
GET/a/v1/organizations/:orgId/tax-registrationGet tax authority connection
PUT/a/v1/organizations/:orgId/tax-registrationConnect/update tax authority
POST/a/v1/organizations/:orgId/tax-registration/revokeRevoke tax authority connection
Last updated on