Skip to content

Create a new account

Request

Security
oauth2ClientCredentials(Required scopes: accounts:write)
Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
namestringrequired

Account name

employeeIdstringrequired

Employee ID

currencystring

Currency code

isPersonalboolean

Is personal account

isDefaultboolean

Is default account

businessIdstring

Business ID

featureFlagsArray of strings

Feature flags

employeeTopupAllowedboolean

Employee topup allowed

curl -i -X POST \
  https://developer.boyahq.com/_mock/v2/openapi/accounts \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "name": "string",
    "employeeId": "string",
    "currency": "string",
    "isPersonal": true,
    "isDefault": true,
    "businessId": "string",
    "featureFlags": [
      "string"
    ],
    "employeeTopupAllowed": true
  }'

Responses

Account created successfully

Bodyapplication/json
statusnumberrequired

HTTP status code

Example:200
dataobjectrequired

Response data

messagestring

Optional response message

Example:"Operation completed successfully"
timestampstringrequired

Response timestamp in ISO format

Example:"2024-01-01T00:00:00.000Z"
pathstring

Request path (mainly for error responses)

Example:"/api/v1/accounts"
Response
{ "status": 200, "data": {}, "message": "Operation completed successfully", "timestamp": "2024-01-01T00:00:00.000Z", "path": "/api/v1/accounts" }