Ultahost Client API
Programmatic access to your Ultahost account — manage services, billing, domains, and contacts directly from your own apps and automations. One JSON endpoint, authenticated POST requests, with an action field per operation.
Overview & Authentication
All requests are issued as POST against the single base endpoint below. Authenticate by including your API key in the x-api-key header.
- Always send requests over HTTPS.
- Keep your API key out of client-side code and source control.
- Rotate keys regularly from the dashboard.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"get_profile"}'Get Client Profile
Retrieves the complete profile data of the authenticated client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_profile" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Profile retrieved successfully",
"data": {
"id": 5,
"uuid": "3f780121-c5ba-4573-ae4b-01483cff101a",
"firstname": "John",
"lastname": "Doe",
"companyname": "Acme Inc.",
"email": "john.doe@example.com",
"address1": "123 Main Street",
"address2": "",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US",
"phonenumber": "+1.5555550123",
"tax_id": "",
"currency": 1,
"credit": "150.00",
"taxexempt": 0,
"status": "Active",
"language": "english",
"created_at": "2026-03-02 11:08:00",
"updated_at": "2026-05-08 08:01:04",
"currency_code": "USD"
}
}Get Client Services
Retrieves a paginated list of all services associated with the client. Supports status filtering and sorting.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_services&limit=10&offset=0&status=Active" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Services retrieved successfully",
"meta": { "total_records": 2, "limit": 10, "current_offset": 0, "has_more": false, "next_offset": null, "prev_offset": null, "total_pages": 1 },
"data": [
{
"id": 134,
"product_name": "Basic Windows VPS",
"domain": "",
"amount": "19.99",
"billingcycle": "Monthly",
"nextduedate": "2026-06-06",
"nextinvoicedate": "2026-06-06",
"status": "Pending",
"regdate": "2026-05-06"
},
{
"id": 125,
"product_name": "Linux VPS Basic",
"domain": "example.com",
"amount": "19.99",
"billingcycle": "Monthly",
"nextduedate": "2026-06-04",
"nextinvoicedate": "2026-06-04",
"status": "Active",
"regdate": "2026-05-04"
}
]
}Get Service Details
Retrieves detailed information regarding a single specific service owned by the client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_service&serviceid=130" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Service retrieved successfully",
"data": {
"id": 130,
"product_name": "Basic Windows VPS",
"domain": "",
"amount": "19.99",
"billingcycle": "Monthly",
"nextduedate": "2026-06-06",
"nextinvoicedate": "2026-06-06",
"status": "Pending",
"regdate": "2026-05-06",
"dedicatedip": "",
"assignedips": "",
"ns1": "",
"ns2": ""
}
}Request Service Cancellation
Submits an official request to cancel an active product or service. The endpoint validates ownership before processing.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"request_cancellation","serviceid":143,"cancellationreason":"No longer needed","type":"Immediate"}'{
"status": 200,
"message": "Cancellation request submitted successfully",
"data": { "serviceid": 143, "type": "Immediate" }
}Reset Service Password
Changes or resets the password for a service owned by the authenticated client using the associated module.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"service_reset_password","serviceid":130,"servicepassword":"NewStrongPass!2026"}'{
"status": 200,
"message": "Service reset password executed successfully",
"data": { "result": "success" }
}Execute Service Module Command
Executes an allowed custom module command for a service owned by the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"service_module_custom","serviceid":130,"func_name":"reboot"}'{
"status": 200,
"message": "Service 'reboot' executed successfully",
"data": { "result": "success" }
}Get Client Orders
Retrieves a paginated list of all product/service orders placed by the client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_orders&limit=10&offset=0&status=Pending&sort=DESC_id" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Orders retrieved successfully",
"meta": { "total_records": 26, "limit": 10, "current_offset": 0, "has_more": true, "next_offset": 10, "prev_offset": null, "total_pages": 3 },
"data": [
{
"id": 175,
"ordernum": 9178151183,
"amount": "10.00",
"paymentmethod": "banktransfer",
"status": "Pending",
"date": "2026-05-06 14:42:31"
}
]
}Get Order Details
Retrieves detailed information regarding a single specific order, including associated services and domains.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_order&orderid=160" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Order retrieved successfully",
"data": {
"id": 160,
"ordernum": 5104338431,
"amount": "19.99",
"paymentmethod": "banktransfer",
"status": "Pending",
"date": "2026-05-06 12:21:53",
"invoiceid": 183,
"notes": "",
"services": [
{ "id": 129, "product_name": "Basic Windows VPS", "domain": "", "amount": "19.99", "billingcycle": "Monthly", "status": "Pending" }
],
"domains": []
}
}Create Order
Creates a new order for services, domains, addons, or renewals for the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"create_order","paymentmethod":"stripe","pid":[1],"billingcycle":["monthly"]}'{
"status": 200,
"message": "Order created successfully",
"data": {
"orderid": 201,
"invoiceid": 230,
"serviceids": "",
"addonids": "",
"domainids": "29"
}
}Upgrade Service
Processes or calculates an upgrade for an existing service owned by the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"upgrade_service","serviceid":123,"type":"product","newproductid":5,"paymentmethod":"stripe"}'{
"status": 200,
"message": "Upgrade processed successfully",
"data": {
"result": "success",
"serviceid": 123,
"amount": "9.99",
"currency": "USD"
}
}Get Client Invoices
Retrieves a paginated list of invoices for the client. Supports status filtering and detailed sorting.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_invoices&limit=10&offset=0&status=Unpaid&sort=DESC_date" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Invoices retrieved successfully",
"meta": { "total_records": 27, "limit": 10, "current_offset": 0, "has_more": true, "next_offset": 10, "prev_offset": null, "total_pages": 3 },
"data": [
{
"id": 198,
"invoicenum": "",
"date": "2026-05-06",
"duedate": "2026-05-06",
"total": "0.00",
"status": "Paid",
"paymentmethod": "banktransfer"
}
]
}Get Invoice Details
Retrieves detailed information regarding a single invoice, including all associated line items.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_invoice&invoiceid=198" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Invoice retrieved successfully",
"data": {
"id": 198,
"invoicenum": "",
"date": "2026-05-06",
"duedate": "2026-05-06",
"subtotal": "10.00",
"credit": "10.00",
"tax": "0.00",
"tax2": "0.00",
"total": "0.00",
"status": "Paid",
"paymentmethod": "banktransfer",
"notes": "",
"items": [
{ "id": 205, "description": "Addon - SSL (06/05/2026 - 05/06/2026)", "amount": "10.00", "taxed": 0 }
]
}
}Pay Invoice
Captures payment for an unpaid invoice belonging to the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"pay_invoice","invoiceid":1234}'{
"status": 200,
"message": "Payment captured successfully.",
"data": { "result": "success" }
}Get Payment Methods
Retrieves all available payment methods configured for the authenticated client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_payment_methods" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Payment methods retrieved successfully.",
"data": [
{
"id": 1,
"type": "BankAccount",
"description": "Business Checking",
"gateway_name": "",
"contact_type": "Client",
"contact_id": 5,
"bank_name": "Chase Bank",
"remote_token": "",
"last_updated": "15/06/2026 12:46"
}
]
}Add Payment Method
Adds a new payment method (credit card, remote credit card, or bank account) for the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"add_payment_method","type":"CreditCard","description":"Personal Visa","card_number":"4111111111111111","card_expiry":"12/2030"}'{
"status": 200,
"message": "Payment method added successfully.",
"data": { "paymethodid": 1 }
}Delete Payment Method
Removes a saved payment method from the authenticated client account.
curl -X DELETE https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"delete_payment_method","paymethodid":1}'{
"status": 200,
"message": "Payment method deleted successfully."
}Get Client Emails
Retrieves a paginated list of email logs sent to the client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_emails&limit=10&offset=0" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Emails retrieved successfully",
"meta": { "total_records": 279, "limit": 10, "current_offset": 20, "has_more": true, "next_offset": 30, "prev_offset": 10, "total_pages": 28 },
"data": [
{ "id": 520, "date": "2026-04-21 14:35:38", "subject": "Customer Invoice" },
{ "id": 519, "date": "2026-04-21 14:35:37", "subject": "Invoice Payment Confirmation" }
]
}Get Email Details
Retrieves the full message content and metadata of a specific email sent to the client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_email&emailid=511" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Email retrieved successfully",
"data": {
"id": 511,
"userid": 5,
"subject": "Invoice Payment Confirmation",
"message": "",
"date": "2026-04-21 14:25:20",
"to": "John Doe <john.doe@example.com>",
"cc": "",
"bcc": "",
"attachments": "[\"Invoice-138.pdf\"]",
"pending": 0,
"message_data": null,
"failed": 0,
"failure_reason": "",
"retry_count": 0,
"created_at": null,
"updated_at": "2026-04-21 14:25:20",
"campaign_id": 0
}
}Get Announcements
Retrieves a paginated list of published system announcements available to the client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_announcements&limit=10&offset=0" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Announcements retrieved successfully",
"meta": { "total_records": 2, "limit": 10, "current_offset": 0, "has_more": false, "next_offset": null, "prev_offset": null, "total_pages": 1 },
"data": [
{ "id": 2, "date": "2026-05-21 08:19:00", "title": "Scheduled Maintenance" },
{ "id": 1, "date": "2026-02-09 08:29:30", "title": "Welcome to our hosting service!" }
]
}Get Announcement Details
Retrieves the full body and details of a specific announcement.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_announcement&announcementid=2" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Announcement retrieved successfully",
"data": {
"id": 2,
"date": "2026-05-21 08:19:00",
"title": "Scheduled Maintenance",
"announcement": "We will be performing scheduled maintenance on our servers.",
"published": 1,
"parentid": 0,
"language": "",
"created_at": "2026-05-21 08:19:00",
"updated_at": "2026-05-21 08:19:00"
}
}Get Client Quotes
Retrieves a paginated list of custom quotes generated for the client.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_quotes&limit=10&offset=0" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Quotes retrieved successfully",
"meta": { "total_records": 1, "limit": 10, "current_offset": 0, "has_more": false, "next_offset": null, "prev_offset": null, "total_pages": 1 },
"data": [
{
"id": 1,
"subject": "VPS Quote",
"stage": "On Hold",
"validuntil": "2026-06-21",
"datecreated": "2026-05-21",
"total": "19.99"
}
]
}Get Quote Details
Retrieves detailed information regarding a single quote, including associated items and pricing breakdown.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_quote"eid=1" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Quote retrieved successfully",
"data": {
"id": 1,
"subject": "VPS Quote",
"stage": "On Hold",
"validuntil": "2026-06-21",
"userid": 5,
"firstname": "John",
"lastname": "Doe",
"companyname": "Acme Inc.",
"email": "john.doe@example.com",
"address1": "123 Main Street",
"address2": "",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US",
"phonenumber": "+1.5555550123",
"tax_id": "",
"currency": 1,
"subtotal": "19.99",
"tax1": "0.00",
"tax2": "0.00",
"total": "19.99",
"proposal": "",
"customernotes": "",
"adminnotes": "",
"datecreated": "2026-05-21",
"lastmodified": "2026-05-21",
"datesent": "0000-00-00",
"dateaccepted": "0000-00-00",
"items": [
{
"id": 1,
"quoteid": 1,
"description": "Windows VPS - Basic Windows VPS",
"quantity": "1",
"unitprice": "19.99",
"discount": "0.00",
"taxable": 1,
"created_at": "0000-00-00 00:00:00",
"updated_at": "2026-05-21 09:45:12"
}
]
}
}Accept Quote
Accepts a sales quote and automatically generates an invoice for the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"accept_quote","quoteid":1}'{
"status": 200,
"message": "Quote accepted successfully. Invoice has been generated.",
"data": { "invoiceid": 232 }
}Create Client Contact
Creates a new sub-contact or alternate billing profile under the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"create_contact","firstname":"John","lastname":"Doe","email":"john.doe@example.com","companyname":"Acme","phonenumber":"+90.5012345678","country":"TR","generalemails":1,"invoiceemails":1,"supportemails":1}'{
"status": 200,
"message": "Contact created successfully",
"data": {
"contact_id": 6,
"details": {
"clientid": 5,
"firstname": "John",
"lastname": "Doe",
"companyname": "Acme Inc.",
"email": "john.doe@example.com",
"address1": "123 Main Street",
"address2": "Suite 200",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US",
"phonenumber": "+1.5555550123",
"tax_id": "",
"generalemails": 1,
"email_preferences": { "general": 1, "product": 1, "domain": 1, "invoice": 1, "support": 1, "affiliate": 1 },
"productemails": 1,
"domainemails": 1,
"invoiceemails": 1,
"supportemails": 1,
"affiliateemails": 1
}
}
}Get Client Contacts
Retrieves a paginated list of all sub-contacts associated with the client account.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_contacts&limit=10&offset=0" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Contacts retrieved successfully",
"meta": { "total_records": 2, "limit": 10, "current_offset": 0, "has_more": false, "next_offset": null, "prev_offset": null, "total_pages": 1 },
"data": [
{ "id": 5, "firstname": "John", "lastname": "Doe", "email": "john.doe@example.com" },
{ "id": 4, "firstname": "Jane", "lastname": "Smith", "email": "jane.smith@example.com" }
]
}Get Contact Details
Retrieves detailed information regarding a specific sub-contact profile.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_contact&contactid=1" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Contact retrieved successfully",
"data": {
"id": 1,
"userid": 5,
"firstname": "John",
"lastname": "Doe",
"companyname": "Acme Inc.",
"email": "john.doe@example.com",
"address1": "123 Main Street",
"address2": "Suite 200",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US",
"phonenumber": "+1.5555550123",
"tax_id": "",
"subaccount": 0,
"password": "",
"permissions": "",
"domainemails": 0,
"generalemails": 0,
"invoiceemails": 0,
"productemails": 0,
"supportemails": 0,
"affiliateemails": 0,
"pwresetkey": "",
"created_at": "0000-00-00 00:00:00",
"updated_at": "0000-00-00 00:00:00",
"pwresetexpiry": "0000-00-00 00:00:00"
}
}Update Contact
Updates an existing contact belonging to the authenticated client. Only the fields provided in the request will be modified.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"update_contact","contactid":5,"firstname":"John","invoiceemails":1}'{
"status": 200,
"message": "Contact updated successfully",
"data": {
"contactid": 1,
"firstname": "John",
"lastname": "Doe",
"companyname": "Acme Inc.",
"email": "john.doe@example.com",
"address1": "123 Main Street",
"address2": "Suite 200",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US",
"phonenumber": "+1.5555550123",
"tax_id": "",
"email_preferences": { "general": 1, "product": 1, "domain": 1, "invoice": 1, "support": 1, "affiliate": 1 }
}
}Delete Contact
Permanently deletes a contact belonging to the authenticated client.
curl -X DELETE https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"delete_contact","contactid":5}'{
"status": 200,
"message": "Contact deleted successfully"
}Get Client Domains
Retrieves a paginated list of domain names owned by the client. Supports comprehensive status filtering.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_domains&limit=10&offset=0&status=Active" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Domains retrieved successfully",
"meta": { "total_records": 12, "limit": 10, "current_offset": 0, "has_more": true, "next_offset": 10, "prev_offset": null, "total_pages": 2 },
"data": [
{
"id": 17,
"domain": "example.com",
"firstpaymentamount": "10.00",
"recurringamount": "0.00",
"registrationperiod": 1,
"registrationdate": "2026-05-05",
"nextduedate": "2027-05-05",
"status": "Pending",
"registrar": ""
}
]
}Get Domain Details
Retrieves detailed information regarding a specific domain name.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_domain&domainid=15" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "Domain retrieved successfully",
"data": {
"id": 15,
"userid": 5,
"orderid": 146,
"type": "Register",
"registrationdate": "2026-05-05",
"domain": "example.com",
"firstpaymentamount": "10.00",
"recurringamount": "0.00",
"registrar": "",
"registrationperiod": 1,
"expirydate": "0000-00-00",
"subscriptionid": "",
"promoid": 0,
"status": "Pending",
"nextduedate": "2027-05-05",
"nextinvoicedate": "2026-05-05",
"additionalnotes": "",
"paymentmethod": "banktransfer",
"dnsmanagement": 0,
"emailforwarding": 0,
"idprotection": 0,
"is_premium": 0,
"donotrenew": 0,
"reminders": "",
"synced": 0,
"created_at": "0000-00-00 00:00:00",
"updated_at": "0000-00-00 00:00:00"
}
}Update Nameservers
Updates the nameservers for a domain owned by the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"update_nameservers","domainid":17,"ns1":"ns1.example.com","ns2":"ns2.example.com"}'{
"status": 200,
"message": "Nameservers updated successfully at the registrar.",
"data": {
"domainid": 28,
"ns1": "ns1.example.com",
"ns2": "ns2.example.com"
}
}Manage Domain Lock
Enables or disables the registrar lock for a domain owned by the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"manage_domain_lock","domainid":17,"lockstatus":"locked"}'{
"status": 200,
"message": "Domain registrar lock successfully set to: locked"
}Get EPP Code
Retrieves the EPP (Authorization) code for a domain owned by the authenticated client. Typically required when transferring a domain to another registrar.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=get_epp_code&domainid=17" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "EPP Code retrieved successfully",
"data": { "result": "success", "na": true }
}Toggle Auto-Renew
Enables or disables automatic renewal for a domain owned by the authenticated client.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"toggle_autorenew","domainid":17,"autorenew":1}'{
"status": 200,
"message": "Auto-renew has been successfully Enabled."
}Update Account Details
Updates the profile and account configuration of the authenticated client. You only need to pass the fields you wish to change; omitted fields remain unmodified.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"update_account","firstname":"John","lastname":"Doe","email":"john@example.com","country":"TR"}'{
"status": 200,
"message": "Account details updated successfully",
"data": {
"firstname": "John",
"lastname": "Doe",
"companyname": "Acme Inc.",
"email": "john.doe@example.com",
"address1": "123 Main Street",
"address2": "",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US",
"phonenumber": "+1.5555550123",
"defaultgateway": "banktransfer",
"billingcid": 0,
"language": "english",
"marketing_emails_opt_in": 1,
"emailoptout": 0,
"email_preferences": "{\"general\":1,\"invoice\":1,\"support\":1,\"product\":1,\"domain\":1,\"affiliate\":0}",
"updated_at": "2026-06-05 10:34:34"
}
}Change Password
Updates the login password for the primary user associated with the authenticated client account. Requires the current active password for security verification.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"change_password","existingpw":"OldPassword!","newpw":"NewPassword!","confirmpw":"NewPassword!"}'{
"status": 200,
"message": "Password changed successfully"
}Disable Two-Factor Authentication
Disables Two-Factor Authentication (2FA) for the authenticated client's primary user account. Requires the current account password to authorize the change.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"disable_2fa","password":"CurrentPassword!"}'{
"status": 200,
"message": "Two-Factor Authentication has been successfully disabled."
}Setup Two-Factor Authentication
Generates a Time-Based One-Time Password (TOTP) secret and a QR code image URL for configuring 2FA in apps like Google Authenticator or Authy. This endpoint only generates the setup data; you must pass the 6-digit code to verify_2fa to officially enable 2FA.
curl -X GET "https://bill.ultahost.com/client-api/v1?action=setup_2fa" \
-H "x-api-key: sk_live_••••••••••••"{
"status": 200,
"message": "2FA Setup Data generated",
"data": {
"secret": "DQUEKJKFTHNFKOS5",
"qr_image_url": "https://quickchart.io/qr?size=300&text=otpauth%3A%2F%2Ftotp%2FUltahost%253Auser%2540ultahost.com%3Fsecret%3DDQUEKJKFTHNFKOS5%26issuer%3DUltahost",
"manual_entry_code": "DQUE KJKF THNF KOS5"
}
}Verify Two-Factor Authentication
Validates a 6-digit authenticator code against the generated secret and finalizes the setup, officially enabling Two-Factor Authentication on the client's primary user account.
curl -X POST https://bill.ultahost.com/client-api/v1 \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_••••••••••••" \
-d '{"action":"verify_2fa","secret":"DQUEKJKFTHNFKOS5","code":"123456"}'{
"status": 200,
"message": "Two-Factor Authentication has been successfully enabled."
}Errors
| Code | Status | Meaning |
|---|---|---|
| 200 | OK | Request succeeded. |
| 400 | Bad Request | Missing or invalid parameters in the request body. |
| 401 | Unauthorized | API key missing or invalid. |
| 403 | Forbidden | Key does not have access to this resource. |
| 404 | Not Found | Requested service or resource does not exist. |
| 429 | Too Many Requests | Rate limit exceeded — back off and retry. |
| 5xx | Server Error | Something went wrong on our end. |
Rate limits
Every response includes X-RateLimit-Remaining and X-RateLimit-Reset headers. When you exceed the limit you receive a 429 — wait until the reset timestamp before retrying.
