Base URL

https://api.oupickylab.org/v1

Authentication

All API requests require authentication using your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Available Endpoints

Method Endpoint Description Auth Required
GET /users Retrieve all users Yes
GET /users/{id} Get specific user by ID Yes
POST /users Create a new user Yes
PUT /users/{id} Update existing user Yes
DELETE /users/{id} Delete user Yes
POST /auth/login Authenticate user No
POST /auth/logout Logout user Yes
GET /projects List all projects Yes
POST /projects Create new project Yes
GET /analytics/stats Get analytics data Yes

Request Examples

GET /users

Retrieve a list of all users with optional pagination.

Request

curl -X GET "https://api.oupickylab.org/v1/users?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

{
  "data": [
    {
      "id": "user_123",
      "name": "John Doe",
      "email": "[email protected]",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 25
  }
}

POST /auth/login

Authenticate a user and receive an access token.

Request

curl -X POST "https://api.oupickylab.org/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "securepassword"
  }'

Response

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "user": {
    "id": "user_123",
    "email": "[email protected]"
  }
}

Rate Limits

API rate limits are enforced to ensure fair usage across all developers.

Free Tier

1,000 requests/hour

Pro Tier

10,000 requests/hour

Enterprise

Unlimited requests