DailyAPI Documentationv1

Errors

Handle Daily error categories, stable codes, and request IDs safely.

View OpenAPI

All public API errors use the same JSON shape:

{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "A valid API key is required."
  },
  "request_id": "req_docserrors001"
}

Use HTTP status and error.code for program logic. Treat message as safe display text, not a stable parser interface. Record request_id without Authorization data.

Public error catalog

StatusTypeCodeMessage / causeRecommended action
401authentication_errormissing_api_keyA valid API key is required.Configure the Authorization header; do not retry unchanged.
401authentication_errorinvalid_api_keyMissing format match, wrong environment, unknown key, or wrong secret.Replace the configured secret.
401authentication_errorexpired_api_keyThe API key is no longer active.Create or rotate to a valid key.
401authentication_errorrevoked_api_keyThe API key is no longer active.Replace the revoked key.
403authorization_errorinsufficient_permissionThe key cannot access the resource.Add the required permission or use the correct key.
403authorization_errorapi_access_inactivePublic API access is unavailable for this subscription.Restore eligible Daily subscription access.
403authorization_errorip_not_allowedCurrent source IP is not permitted.Update the key allowlist or route from an approved address.
400invalid_request_errorinvalid_filterInvalid query, cursor, UUID, unsupported filter, unknown parameter, or oversized query.Correct the request; do not retry unchanged.
404not_found_errorresource_not_foundResource or route not found in the authenticated scope.Stop or reconcile the local reference.
405invalid_request_errormethod_not_allowedOnly GET and HEAD are supported.Change the method.
429rate_limit_errorrate_limit_exceededToo many requests.Honor Retry-After: 1 and back off with jitter.
500api_errorinternal_errorAn internal error occurred.Retry with backoff if safe; escalate with request ID.
503api_errorservice_unavailableThe API is temporarily unavailable.Honor Retry-After: 5 and retry with backoff.

Validation failures intentionally do not expose internal field-validator details. Database and unexpected failures intentionally return a generic message.

Safe client pattern

import os
import requests

api_key = os.environ.get("DAILY_API_KEY")
if not api_key:
    raise RuntimeError("DAILY_API_KEY is required")

response = requests.get(
    "https://api.godaily.co.il/v1/products",
    headers={"Accept": "application/json", "Authorization": f"Bearer {api_key}"},
    timeout=30,
)
body = response.json()
if not response.ok:
    error = body.get("error", {})
    request_id = body.get("request_id", response.headers.get("X-Request-ID", "not-returned"))
    code = error.get("code", "unknown_error")
    if response.status_code in (429, 503):
        retry_after = response.headers.get("Retry-After")
        raise RuntimeError(f"Transient Daily API error {code}; retry after {retry_after}s; request {request_id}")
    raise RuntimeError(f"Daily API error {code}; request {request_id}")

Never include the API key, complete request headers, or a signed PDF URL in error telemetry.

On this page