General
The Slink API provides a RESTful interface for managing images, users, and application settings.
Base URL
Section titled “Base URL”https://your-domain.com/api
Authentication
Section titled “Authentication”Slink supports two authentication methods:
JWT Authentication
Section titled “JWT Authentication”- Access Token: Short-lived token (1 hour TTL) for API access
- Refresh Token: Long-lived token for obtaining new token pair
- Token Rotation: Automatic token refresh mechanism
API Key Authentication
Section titled “API Key Authentication”- API Keys: Long-lived authentication tokens
- User-generated: Created and managed through user profile
- Bearer token: Sent via
Authorization: Bearer sk_...
header
Content Type
Section titled “Content Type”All API requests and responses use JSON:
Content-Type: application/json
Error Handling
Section titled “Error Handling”HTTP status codes indicate the result of API requests:
200
- Success201
- Created400
- Bad Request401
- Unauthorized403
- Forbidden404
- Not Found422
- Validation Error500
- Internal Server Error
API Sections
Section titled “API Sections”- Authentication - Login, logout, token management
- Images - Upload, retrieve, update, and delete images
- Users - User management and profile operations
- Settings - Application configuration