Skip to content

Errors

All error responses follow a consistent shape:

json
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}

Always check the success field before accessing data.

Error codes

These are the only error codes the API returns:

StatusCodeWhen
400BAD_REQUESTMissing or invalid parameters — e.g. no q on search, no file on upload, empty creator name, or storage quota exceeded
401UNAUTHORIZEDMissing, malformed, or unknown API key
404NOT_FOUNDResource doesn't exist in your workspace
500INTERNAL_SERVER_ERRORUnexpected server failure — safe to retry

Handling errors

A robust integration should:

  1. Check response.success === true before using response.data
  2. Handle 401 by verifying your API key (Settings → API Keys)
  3. Fix the request on 400/404 — retrying won't help
  4. Retry 500 errors with backoff, then contact support if they persist

Example error handling

typescript
const res = await fetch('https://findclix.com/api/v1/media/search?q=hello', {
  headers: { 'Authorization': `Bearer ${apiKey}` }
})

const json = await res.json()

if (!json.success) {
  console.error(`API error: ${json.error.code}${json.error.message}`)
  return
}

// Use json.data safely
for (const clip of json.data) {
  console.log(clip.filename, clip.score)
}