Skip to main content

Overview

This guide helps you troubleshoot common authentication and request errors when using the Reprompt API. Most 40x errors are related to API keys, organization slugs, or request formatting.

401 Unauthorized

A 401 error means your API key is invalid, missing, or revoked.

Common Causes

  1. Missing or malformed Authorization header
  2. Revoked API key
  3. Expired API key
  4. Copy-paste errors (extra spaces, truncated key)

How to Fix

1

Check your Authorization header

Ensure you’re including the header in the correct format:
Authorization: Bearer YOUR_API_KEY_HERE
Common mistakes:
  • Missing the word Bearer
  • Extra spaces before/after the key
  • Using single quotes instead of the actual key value
2

Verify your API key is active

Check if your key has been revoked:
  1. Go to Organization Settings → API Keys
  2. Click “Show revoked keys” to see if your key was disabled
  3. If revoked, generate a new API key
3

Generate a new API key

If your key is revoked or you suspect it’s compromised:
  1. Navigate to Organization Settings
  2. Go to the API Keys section
  3. Click “Create new API key”
  4. Copy the new key immediately (it won’t be shown again)
  5. Update your application with the new key

403 Forbidden

A 403 error means your API key is valid, but you don’t have permission to access the requested resource.

Common Causes

  1. Accessing another organization’s resources - Using an org slug that doesn’t match your API key
  2. Insufficient permissions - Your API key doesn’t have access to the specific resource or endpoint

How to Fix

1

Verify your organization slug matches your API key

Ensure you’re using the correct org slug for your API key:Check that the {org_slug} in your URL matches your organization

404 Not Found

A 404 error means the API endpoint doesn’t exist, usually due to an incorrect URL or org slug.

Common Causes

  1. Incorrect organization slug in the URL
  2. Typo in the endpoint path
  3. Wrong API version (using V1 endpoint format with V2 base URL or vice versa)
  4. Invalid batch ID or resource ID in the path

How to Fix

1

Verify your organization slug

Double-check your org slug is correct:
# ❌ Wrong
https://api.repromptai.com/v1/wrong-slug/place_enrichment/enrich

# ✅ Correct (replace {org_slug} with your actual org slug)
https://api.repromptai.com/v1/{org_slug}/place_enrichment/enrich
Find your org slug in the Dashboard URL when logged in.
2

Check your endpoint path

Ensure you’re using the correct endpoint path. Common endpoints include:V1 Endpoints (with org slug):
  • https://api.repromptai.com/v1/{org_slug}/place_enrichment/enrich - Single place enrichment
  • https://api.repromptai.com/v1/{org_slug}/place_enrichment/batches - Create/list batches
  • https://api.repromptai.com/v1/{org_slug}/place_enrichment/batches/{batch_id} - Get batch status
  • https://api.repromptai.com/v1/{org_slug}/place_enrichment/jobs - Get job results
V2 Endpoints (no org slug):
  • https://api.reprompt.io/v2/enrich - Single place enrichment
  • https://api.reprompt.io/v2/placematch - Place matching
  • https://api.reprompt.io/v2/attributes - List available attributes
3

Validate against the API docs

Cross-reference your request with the API Reference:
  1. Check the correct HTTP method (GET, POST, etc.)
  2. Verify the endpoint path matches the documentation
  3. Ensure required path parameters (like {batch_id}) are valid
  4. Confirm you’re using the right API version
4

Test with a minimal example

Try the basic example from the Quickstart guide to verify your configuration:
curl -X POST \
  'https://api.repromptai.com/v1/{org_slug}/place_enrichment/enrich' \
  -H 'Authorization: Bearer {YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
    "inputs": {
      "name": "Joe'\''s Pizza",
      "latitude": 40.7359,
      "longitude": -73.9911
    },
    "attributes": ["websites"]
  }'

Quick Reference Table

Error CodeMeaningPrimary CauseQuick Fix
401UnauthorizedInvalid/revoked API keyCheck API key status →
403ForbiddenAccessing unauthorized resourcesVerify org slug matches API key
404Not FoundWrong URL or org slugVerify org slug and endpoint path