ATStatus
ATStatus WikiLoading documentation...

API Authentication

How to authenticate with the ATStatus REST API.

Overview

The ATStatus API uses API keys for authentication. All requests must include a valid API key.

Getting an API Key

  1. Go to Admin → API Keys
  2. Click Create API Key
  3. Name your key
  4. Select required scopes
  5. Copy the generated key

Using the API Key

Include the key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

cURL Example

curl -X GET "https://status.example.com/api/v1/statuspages" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

JavaScript Example

const response = await fetch('https://status.example.com/api/v1/statuspages', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();

Python Example

import requests

response = requests.get(
    'https://status.example.com/api/v1/statuspages',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    }
)

data = response.json()

Authentication Errors

CodeDescription
401Missing or invalid API key
403API key lacks required scope

API Scopes

API keys can be limited to specific operations:

  • read:* - Read operations
  • write:* - Write operations

Security Best Practices

  • Never expose API keys in client-side code
  • Use environment variables
  • Rotate keys periodically
  • Use minimal required scopes