SentiSnap.com | Online surveys with AI translations and response analysis

Errors

The Sentisnap API uses conventional HTTP status codes and returns errors in a consistent JSON format.

CodeDescription
200Success
201Created (resource successfully created)
204No Content (successful deletion)
400Bad Request (invalid parameters)
401Unauthorized (invalid or missing API key)
403Forbidden (insufficient permissions)
404Not Found
429Too Many Requests (rate limit exceeded)
500Internal Server Error

Error Response Format

All errors follow this structure:

{
  "error": {
    "code": "error_code",
    "message": "Human-readable error message",
    "details": {}
  }
}

Error Codes

Authentication Errors

CodeHTTPDescription
unauthorized401Missing Authorization header
invalid_api_key401Invalid API key format or key not found
expired_api_key401API key has expired
revoked_api_key401API key has been revoked

Authorization Errors

CodeHTTPDescription
forbidden403General permission denied
insufficient_scope403API key lacks required scope

Request Errors

CodeHTTPDescription
validation_error400Invalid request parameters
not_found404Resource not found
rate_limit_exceeded429Rate limit exceeded

Server Errors

CodeHTTPDescription
internal_error500Internal server error

Validation Error Details

For validation errors, the details field contains specific field errors:

{
  "error": {
    "code": "validation_error",
    "message": "Validation failed",
    "details": [
      {
        "path": [
          "url"
        ],
        "message": "Invalid url"
      },
      {
        "path": [
          "events"
        ],
        "message": "Required"
      }
    ]
  }
}

Example Error Handling

async function makeApiRequest(endpoint) {
    const response = await fetch(
      `https://public-api.sentisnap.com/v1${endpoint}`,
      {
        headers: {
          'Authorization': `Bearer ${API_KEY}`
        }
      }
    );

    if (!response.ok) {
      const error = await response.json();
      switch (error.error.code) {
        case 'invalid_api_key':
          throw new Error('Please check your API key');
        case 'rate_limit_exceeded':
          const retryAfter = response.headers.get('Retry-After');
          throw new Error(`Rate limited. Retry after ${retryAfter} seconds`);
        case 'not_found':
          return null;
        default:
          throw new Error(error.error.message);
      }
    }

    return response.json();
  }
SentiSnap.com

Capture every mention of your brand, monitor feedback across all channels, and turn the noise of the internet into clear insights that drive your business growth through social listening.

Copyright © 2026 SentiSnap s.r.o.

SentiSnap s.r.o., Rybná 716/24, Staré Město, 110 00 Praha 1, IČO: 21384053, DIČ: CZ21384053

circle-gray