Base URLs
| Environment | Base URL |
|---|---|
| Production | https://seggwat.com/api/v1 |
| Staging | https://seggwat.oxidt.com/api/v1 |
Authentication
SeggWat uses Organization Access Tokens (OAT) to authenticate API requests. These tokens grant access to all projects within your organization.Creating an API Token
- Log in to the SeggWat Dashboard
- Navigate to Settings from the sidebar
- Click on API Tokens tab
- Click Create New Token
- (Optional) Add a label to identify the token (e.g., “Production Server”, “CI/CD Pipeline”)
- Copy the generated token immediately - it will only be shown once
Using the API Token
Include your token in theX-API-Key header for all authenticated requests:
Token Format
Organization Access Tokens follow the format:- Prefix:
oat_(Organization Access Token) - Key: 43 URL-safe random characters
oat_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v
Managing Tokens
From the API Tokens settings page, you can:| Action | Description |
|---|---|
| Create | Generate a new token with an optional label |
| View | See token prefix, label, creation date, and last used timestamp |
| Revoke | Disable a token (soft-delete, keeps history) |
| Delete | Permanently remove a token |
Security Best Practices
Use environment variables
Use environment variables
Never hardcode tokens in your source code. Use environment variables or a secrets manager:
Rotate tokens regularly
Rotate tokens regularly
Create new tokens periodically and revoke old ones to minimize exposure risk.
Use labels
Use labels
Label tokens by their purpose (e.g., “Production”, “Staging”, “CI/CD”) to easily identify and manage them.
Monitor usage
Monitor usage
Check the “Last Used” timestamp in the dashboard to identify unused or potentially compromised tokens.
Error Responses
| Status Code | Description |
|---|---|
401 Unauthorized | Missing, invalid, or revoked API token |
403 Forbidden | Token valid but lacks permission for the requested resource |
Content Types
The SeggWat API always accepts JSON in request bodies and returns JSON in response bodies. Always include theContent-Type: application/json header in requests.