🧑💻 API Documentation
AtomicHost User API
The⚠️AtomicHostSecurityUserwarning — keep your APIletskey privateNever share your API key with anyone or with an application you
servicemanagedoyournotowntrust.gameAnyoneserviceswithprogrammaticallyaccess—to it can use thesame services you can manage in the web panel,API with the samepermissions.permissions
BaseasURL:yourhttps://atomichost.xyz/api/client/v1Auth:Bearer API key (one active key per account)Format:JSON request/response (Accept: application/json)Credits:every request costs credits from a daily allowance (default2,500/day)
This is separate from the admin "application" API at/api/v1.account.
1. GettingGenerating an API key1. Open Account Settings
Generate, view, regenerate or revokeSelect yourkeyuserfromicon in the top-right corner, then choose Account→Settings.Settings→2. Open API Access
Select API Access.
3. Name your API key
Scroll to Manage Key and enter a name for the key.
4. Generate the key
Select Generate API Key.
5. Copy and store the key securely
Select Copy and save the key in a secure location, such as a password manager or secrets vault.
Important key details
YouEachmayaccount can have one active API key at a time.- The full key is shown only once, immediately after
generation. Storeitsecurely.is generated.- Regenerating a key immediately invalidates the previous key.
- Keys
lookuselikethis format:ah_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.WeAtomicHoststorestores only a saltedSHA‑SHA-256 hash of the key, so a lost key— itcannot be recoveredif lost..
API overview
The AtomicHost User API allows you to manage your own game services programmatically. It provides the same service access and permissions available through the AtomicHost web panel.
Setting Value Base URL https://atomichost.xyz/api/client/v1Authentication Bearer API key Request and response format JSON Required response header Accept: application/jsonDefault daily allowance 2,500 credits per day Note: This API is separate from the administrator Application API, which is available at
/api/v1.
Using the AtomicHost API
Authenticating1. AuthenticationSend your API key in the
keyAuthorizationheader as a Bearer token:Authorization: Bearer ah_your_key_here Accept: application/jsonEvery authenticated request is
validatedchecked server-sidefor:toaconfirm:valid/active
key,- The
anAPIexistingkeynon-is valid and active.- The account exists and is not banned
account,orownership/suspended.- The account has permission
ofto access thetargetrequestedservice,service andrate/action.- The request is within the applicable rate and credit limits.
limits
2. Credits
&and ratelimitingTwo independent protections
apply:apply to API usage:
Protection Default limit ExceededResponseresponsewhen exceededDaily credits 2, 500/day (admin-configurable500 peruser)day, configurable by an administrator429daily_credit_limit_reachedPer-key rate limit 120 requests/requests per minute429rate_limitedCredit usage
- Most requests cost 1 credit.
= 1 requestby default.- Opening a console stream costs 5 credits
;.reading/- Reading from or sending
oncommandsanwhile a console stream is already openstreamdoescostsnotnothingcostextra.additional credits.- Credits reset once per day
inusing the server's configured timezone.FailedRequestsrequeststhatcausedfailbybecause of a server-side(5xx)error arerefunded.refunded.Every response includes
theserate-limitheaders:and credit information:X-RateLimit-Limit: 120 X-RateLimit-Remaining: 119 X-Credits-Limit: 2500 X-Credits-Used: 12 X-Credits-Remaining: 2488 X-Credits-Reset: 2026-06-28T00:00:00+00:00
formats
3. Response
&and errorformat
Success:Successful response
{ "success": true, "data": {...} }
Error:Error response
{ "success": false, "error": { "code": "forbidden", "message": "..." } }HTTP status codes
Status Meaning 200/201OKRequest completed successfully401MissingAPI/keyinvalidis/missing,revokedinvalid,/revoked, or expiredkey403BannedTheaccount,account is banned, ornothe user does not have permission forthistheservice/requested service or action404ServiceThe service does notfoundexist or is notyoursaccessible(existencebyistheneverauthenticatedleaked)user422Validation errorfailed,(e.g.suchbadaspath,an invalidsignal)path or power signal429RateThe rate limit or dailycreditscreditexhaustedallowance has been exceeded502The service backend could not be reached Common error
codes:codes
missing_token,invalid_key,account_banned,insufficient_service_permission,feature_unavailable,service_inactive,not_found,validation_failed,rate_limited,daily_credit_limit_reached,too_many_streams,backend_unavailable.
4. Permission model
The API never grants more access than the AtomicHost website.
For every service
actionaction,weAtomicHostre-check,verifiesserver-side:that:
- You are the service owner, an
adminadministrator, or a memberthatwhothehasownerbeen granted thematchingrequiredpermissionpermission,(such asconsole,files, orbackups, …).- The service is active and
yourits packageenablesincludesthatthe requested feature.
IfWhenyouanotherwereusergivensharesaccessatoservicesomeonewithelse's service,you, the API only allowswhatthe permissions granted by thatownerservice'sgrantedowner.you on that service.Service IDs supplied in
the requestrequests are nevertrustedtrusted.—Attemptingchangingto access a serviceIDthat is not available tooneyourthat isn't yoursaccount returns404., preventing the API from revealing whether that service exists.
5. Endpoints
AccountAccount
GET /meReturns information about the API key
ownerowner, the active API key, and the account's current creditstanding.usage.curl "https://atomichost.xyz/api/client/v1/meme" \ -H "Authorization: Bearer ah_your_key" \ -H "Accept: application/json"Example response:
{ "success": true, "data": { "user": { "id": 42, "username": "steve", "email": "[email protected]" }, "api_key": { "name": "My Key", "prefix": "ah_ab12cd34", "created_at": "2026-06-27T10:00:00+00:00", "last_used_at": "2026-06-27T12:00:00+00:00" }, "credits": { "limit": 2500, "used": 12, "remaining": 2488, "reset_at": "2026-06-28T00:00:00+00:00", "reset_timezone": "UTC" } } }
Services
Services
GET /servers
ListLists every serviceyouthe authenticated user canaccessaccess,(ownedincluding+services they own and services shared withyou).them.Example response:
{ "success": true, "data": [ { "id": 101, "name": "My Rust Server", "status": "active", "service": "pterodactyl", "package": { "id": 5, "name": "Rust 4GB" }, "role": "owner", "created_at": "2026-06-01T00:00:00+00:00", "due_date": "2026-07-01T00:00:00+00:00" } ] }
GET /servers/{id}
ViewReturns information about a single service.(Relationship required.)The authenticated user must have an existing relationship with the service.
GET /servers/{id}/status
LiveReturns the service's live powerstatestate, suspension status, and resource usage.Example response:
{ "success": true, "data": { "id": 101, "state": "running", "is_suspended": false, "resources": { "memory_bytes": 1073741824, "cpu_absolute": 42.5, "disk_bytes": 5368709120 } } }
POST /servers/{id}/power
SendSends a powersignal.signalRequiresto theconsolepermission.service.
Body:Required permission:consoleRequest body:
{ "signal": "start" }—Valid
onesignals:of
start,stop,restart,kill.Example response:
{ "success": true, "data": { "signal": "start", "accepted": true } }
Console
(requiresAll console endpoints require the
consolepermission)permission.
POST /servers/{id}/console/command
SendSends a singleconsolecommandcommand.toAudited.the service console. Commands are audited.
Body:Request body:{ "command": "say hello" }Example response:
{ "success": true, "data": { "sent": true } }
GET /servers/{id}/console/stream— live output (SSE)Opens a live console output stream using Server-Sent Events.
stream that relays live console output.
CostsCost: 5 creditstoeachopen.time a stream is opened.Stream behaviour
- The connection is
server-controlled:ifbyyoutheareserver.- If the account is banned or
loseloses access, the streamis closedcloses within~15s.approximatelyIt15alsoseconds.auto-closes- Streams automatically close after the configured maximum duration, which is 10 minutes by default.
- Reconnect to continue receiving output after a
maxstreamduration (default 10 min) — reconnect to continue.closes.UpEach account can have up to 3 concurrent streamsper account..SSE
events:event types
Event Description ready,The stream is connected and ready output(aA line of console line),outputstatus(powerA state),service power-state updatestats(resourceResource JSON),usage data in JSON formaterror,A stream error occurred closed.The stream was closed Example JavaScript:
const es = new EventSource( "https://atomichost.xyz/api/client/v1/servers/101/console/stream", // EventSource can't set headers; use a proxy/fetch-stream, or a browser // extension that adds the Authorization header. See note below.); es.addEventListener("output",e(event) => { console.log(e.event.data); }); es.addEventListener("closed",e() => { es.close(); });
Browsers'Important: A browser's nativeEventSourceAPI cannot set anAuthorizationheader. Consume the streamfromthrough a trusted server, a CLI(tool such ascurl-N -H "Authorization: Bearer …"),orafetch()reader.streamCommandsreader,areorsentanotheroverclient that supports custom headers. Send commands separately through theseparate/console/commandendpoint.Example using
curl:curl -N "https://atomichost.xyz/api/client/v1/servers/101/console/streamstream" \ -H "Authorization: Bearer ah_your_key" \ -H "Accept: text/event-stream"
Files
(requiresAll file endpoints require the
filespermission)permission.
AllFile paths arevalidatedcheckedagainstfor directorytraversal;traversal. Paths containing..segments are rejected with422before anybackendrequestcall.is sent to the service backend.
Method PathEndpointBody /orQueryqueryGET/servers/{id}/files?path=/listLists a directoryGET/servers/{id}/files/contents?path=/server.propertiesreadReads a filePOST/servers/{id}/files/write{ "path": "/a.txt", "content": "..." }POST/servers/{id}/files/delete{ "root": "/", "files": ["a.txt"] }POST/servers/{id}/files/create-folder{ "root": "/", "name": "plugins" }PUT/servers/{id}/files/rename{ "root": "/", "from": "a.txt", "to": "b.txt" }GET/servers/{id}/files/download?path=/world.zipreturnsReturns a one-time download URLGET/servers/{id}/files/upload-url?path=/returnsReturns a one-time upload URLExample request:
curl "https://atomichost.xyz/api/client/v1/servers/101/files?path=/" \ -H "Authorization: Bearer ah_your_key" \ -H "Accept: application/json"Example response:
{ "success": true, "data": { "path": "/", "files": [ { "name": "server.properties", "size": 1234, "is_file": true, "mode": "rw-r--r--" } ] } }
Backups
(requiresAll backup endpoints require the
backupspermission)permission.
Method PathEndpointBody GET/servers/{id}/backupslistLists backupsPOST/servers/{id}/backups{ "name": "pre-update", "ignored": "" }GET/servers/{id}/backups/{backup}viewReturns information about a backupDELETE/servers/{id}/backups/{backup}deleteDeletes a backupExample request:
curl -X POST "https://atomichost.xyz/api/client/v1/servers/101/backupsbackups" \ -H "Authorization: Bearer ah_your_key" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"name":"pre-update"}'Example response:
{ "success": true, "data": { "backup": { "uuid": "f3...", "name": "pre-update", "is_locked": false } } }
6. Banned
/or suspended accounts
IfWhenyouran account is banned orsuspended,suspended:all
- All API keys are revoked
immediately,immediately.in-flight- Active console streams are
closed,closed.and- Further
furtherAPI requests are rejected(with403).UnbanningRemoving a ban or suspension does not restore the
oldprevious API key. A new key—mustgeneratebeageneratednewbeforeone.the API can be used again.




