Errors & Status Codes

The SignalStack API uses conventional HTTP status codes and returns structured JSON error responses for every non-2xx response. Always check the error.code field for machine-readable handling.

Error response format

Code
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The 'claim' field must be between 1 and 2000 characters.",
    "details": {
      "field": "claim",
      "constraint": "length",
      "max": 2000
    },
    "docs": "https://signal-stack-ten.vercel.app/docs/api-reference/verify-claim",
    "request_id": "vrf_a1b2c3d4e5f6"
  }
}
FieldTypeDescription
error.codestringMachine-readable error code for programmatic handling
error.messagestringHuman-readable description of the error
error.detailsobjectAdditional context (field name, constraints, etc.)
error.docsstringLink to relevant documentation
error.request_idstringUnique identifier for debugging with support

Error code reference

HTTP StatusError CodeMessageCommon Cause
400INVALID_REQUESTMalformed request body or missing required fieldsInvalid JSON, wrong Content-Type, missing parameter
401UNAUTHORIZEDMissing or invalid API keyNo Authorization header, revoked key, malformed token
403FORBIDDENAPI key lacks permission for this endpointStarter key used for verify/media
402INSUFFICIENT_CREDITSAccount has insufficient creditsMonthly quota exhausted
404NOT_FOUNDEndpoint or resource not foundWrong URL, invalid version
413CONTENT_TOO_LARGERequest content exceeds maximum sizeFile > 50 MB, claim > 2000 chars
409CONFLICTRequest conflicts with current stateIdempotency key reuse with different params
422VALIDATION_ERRORRequest body fails validationInvalid URL format, unsupported source, bad enum
429RATE_LIMITEDRate limit exceededToo many requests in window
500INTERNAL_ERRORUnexpected server errorTemporary internal failure
502UPSTREAM_ERRORUpstream data source unavailableData source timeout or error
503SERVICE_UNAVAILABLETemporary service disruptionPlanned maintenance or incident

HTTP status code summary

StatusCategoryRetry?Description
2xxSuccessRequest succeeded
4xxClient errorOnly 429Fix the request before retrying
5xxServer errorYesTemporary issue, retry with backoff

Validation error details

When a 422 VALIDATION_ERROR is returned, the details object may contain afields array pinpointing each validation failure:

Code
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "details": {
      "fields": [
        {
          "field": "sources.0",
          "message": "Unsupported source 'twitter'. Valid values: web, wikipedia, google_fact_check, semantic_scholar, gdelt"
        },
        {
          "field": "claim",
          "message": "Claim must not exceed 2000 characters (current: 2451)"
        }
      ]
    },
    "request_id": "vrf_z9y8x7w6v5u4"
  }
}

Idempotency

To safely retry requests, provide an Idempotency-Key header with a UUID. If a request is retried with the same key within 24 hours and the same request body, the API returns the original response (including cached results). This is safe for all POST endpoints.

Code
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

Next steps