API Access
REST API and API keys: Create access tokens, set permissions and automate server management with the API.
API Access
RespawnHost provides a REST API that lets you manage your servers programmatically. With an API key, you can automate server management, build custom tools, or integrate RespawnHost into your own workflows.
Generating an API Key
- Log in to the RespawnHost panel.
- Navigate to your Account Settings.
- Select the API Keys tab.
- Click Create API Key.
- Enter a description for the key (for example, “Discord bot” or “Monitoring script”).
- Select the permissions you want to grant this key.
- Click Create.
Your API key will be displayed once. Copy it immediately and store it securely — you will not be able to see the full key again.
Permissions
Each API key can be scoped to specific permissions:
- Read — View server status, resource usage, and account information.
- Control — Start, stop, and restart servers.
- Files — Access the file manager API to read, write, and delete files.
- Admin — Full access including creating and deleting servers.
Grant only the permissions your integration actually needs. This limits potential damage if a key is compromised.
Using the API
The API follows REST conventions and returns JSON responses. Authenticate by including your API key in the Authorization header:
Authorization: Bearer your-api-key-here
Example request to list your servers:
curl -H "Authorization: Bearer your-api-key-here" \
https://api.respawnhost.com/v1/servers
Managing Keys
You can view all your active API keys in the panel. For each key, you can see:
- Description and creation date
- Last used timestamp
- Assigned permissions
To revoke a key, click Delete next to it. The key stops working immediately.
Best Practices
- Never share your API keys or commit them to version control.
- Use separate keys for separate integrations so you can revoke them independently.
- Rotate keys periodically, especially if team members with access have changed.
- Use the most restrictive permission set that still allows your integration to function.