Skip to main content

HTTP Status Codes

Pixel Patrol uses standard HTTP status codes to indicate success or failure:

Error Response Format

All error responses follow a consistent JSON format:

Common Errors

Invalid Site Key

Status: 401 Unauthorized Solutions:
  • Verify your site key format: site_xxxxxxxxxxxxxxxxxxxx
  • Check that the site key exists in your dashboard
  • Ensure the site key hasn’t been rotated or disabled

Missing Required Fields

Status: 400 Bad Request Solutions:
  • Include the api_key field in your request body
  • Provide either body (text) or content_url (image URL)
  • Check field names match the API specification exactly

Moderation Limit Exceeded

Status: 403 Forbidden Solutions:
  • Upgrade your subscription plan
  • Wait for your monthly limit to reset
  • Contact support for temporary limit increases

No Active Subscription

Status: 403 Forbidden Solutions:
  • Subscribe to a paid plan in your dashboard
  • Ensure your payment method is valid and current
  • Contact billing support if you believe this is an error

Rate Limit Exceeded

Status: 429 Too Many Requests Solutions:
  • Implement exponential backoff retry logic
  • Reduce request frequency
  • Use the Retry-After header value for timing

Media Not Found

Status: 404 Not Found Solutions:
  • Verify the media_id or app_media_id is correct
  • Ensure the media belongs to your site
  • Check that the media wasn’t deleted

Content Too Large

Status: 400 Bad Request Solutions:
  • Reduce text content size to under 100KB
  • For images, ensure files are under 10MB
  • Consider splitting large content into smaller chunks

Invalid URL

Status: 400 Bad Request Solutions:
  • Ensure the URL is publicly accessible
  • Verify the URL points to a supported image format (JPEG, PNG, GIF, WebP)
  • Check that the image server allows external access

Error Handling Best Practices

1. Implement Retry Logic

2. Validate Input Before Sending

3. Handle Specific Error Types

Getting Help

If you encounter errors not covered here:
  1. Check the API status page for known issues
  2. Review your request format against the OpenAPI specification
  3. Contact support@pixelpatrol.net with:
    • Your site key (last 4 characters only)
    • The exact request you’re making
    • The full error response
    • Timestamp of when the error occurred