API Overview
Get started with the SeggWat API, including base URLs and authentication methods.
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
API tokens are shown only once when created. Store them securely in your environment variables or secrets manager. If you lose a token, you'll need to create a new one.
Using the API Token
Include your token in the X-API-Key header for all authenticated requests:
X-API-Key: oat_xxxxxxxxxxxxxxxxxxxxxcurl -X GET "https://seggwat.com/api/v1/projects/{project_id}/feedback" \
-H "X-API-Key: oat_xxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json"Token Format
Organization Access Tokens follow the format:
- Prefix:
oat_(Organization Access Token) - Key: 43 URL-safe random characters
Example: 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
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 the Content-Type: application/json header in requests.
