Overview

The SmarterPix Client API provides programmatic access to SmarterPix services. API keys can be issued on request by contacting smarterpix.com.


Base URL

All API requests are made to the following base URL:https://client-api.smarterpix.com/api/


Authentication

All API endpoints require authentication using an API key. You can pass the API key in one of three ways:

  1. Authorization Header (Recommended):

    Authorization: Bearer YOUR_API_KEY
  2. Custom Header:

    X-API-Key: YOUR_API_KEY
  3. Query Parameter:

    ?api_key=YOUR_API_KEY

Error Responses

401 Unauthorized

Returned when authentication fails or API key is missing/invalid.

{
  "message": "Unauthenticated."
}

422 Validation Error

Returned when request parameters are invalid.

{
  "message": "The given data was invalid.",
  "errors": {
    "id": ["The id field is required."],
    "limit": ["The limit must not be greater than 100."]
  }
}

500 Server Error

Returned when an unexpected error occurs.

{
  "message": "Server Error",
  "error": "Error details"
}

Best Practices

  1. Always use HTTPS for API requests
  2. Store API keys securely - never commit them to version control
  3. Handle errors gracefully - implement proper error handling in your application
  4. Respect rate limits - implement exponential backoff when rate limited
  5. Cache responses when appropriate to reduce API calls
  6. Use pagination for large result sets (offset/limit parameters)