Update a Team (Account)
PUT
/api/v2/accounts
const url = 'https://api.payhero.africa/api/v2/accounts';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"account_id":63,"description":"Renamed vendor","email":"billing@vendor-a.co","logo":"https://cdn.acme.co/vendor-a.png","theme_color":"#0A7C4A","notify_amount":500}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.payhero.africa/api/v2/accounts \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "account_id": 63, "description": "Renamed vendor", "email": "billing@vendor-a.co", "logo": "https://cdn.acme.co/vendor-a.png", "theme_color": "#0A7C4A", "notify_amount": 500 }'Updates settings on an existing Team. Identify the Team with account_id.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
account_id
required
integer
description
string
email
string
logo
string
theme_color
string
notify_amount
number
payment_note
string
Examples
ExampleRebrand
{ "account_id": 63, "description": "Renamed vendor", "email": "billing@vendor-a.co", "logo": "https://cdn.acme.co/vendor-a.png", "theme_color": "#0A7C4A", "notify_amount": 500}Responses
Section titled “Responses”The updated Team.
Media typeapplication/json
object
account
A Team — an isolated Account with its own scoped wallet, payment channels, KYC and members.
object
id
integer
organization_id
integer
name
string
description
string
currency
Derived from the account phone number’s country at creation.
string
number
string
email
string
status
string
account_type
string
kyc_tier
integer
kyc_verified
boolean
service_wallet_balance
number
logo
string
theme_color
string
notify_amount
integer
created_at
string format: date-time
updated_at
string format: date-time
Example
{ "account": { "id": 63, "organization_id": 9, "name": "Vendor A", "description": "WiFi vendor onboarded via our platform", "currency": "KES", "number": "254711000111", "email": "vendor-a@acme.co", "status": "active", "account_type": "prepaid", "kyc_tier": 1, "kyc_verified": false, "service_wallet_balance": 0, "theme_color": "#0A7C4A", "notify_amount": 500 }}Missing or invalid Basic auth credentials.
Media typeapplication/json
object
error_code
string
error_message
string
status_code
integer
Example
{ "error_code": "invalid_argument", "error_message": "the transaction amount is insufficient as it wont cater for cost: (4.62)", "status_code": 400}
