API

Errors & limits

HTTP status codes

Status Meaning What to do
401 Missing or invalid token Check Authorization header / rotated token
403 Token does not match the workspace Remove mismatched team_public_id, or use the correct token
404 Unknown resource Form disabled/missing, or bad public id
422 Invalid request Fix validation errors (store_slug, email, …)
429 Too many requests Back off and retry with jitter

Rate limits

Surface Limit
Authenticated Marketing API 120 requests / minute
Embed form subscribe 30 requests / minute

When you hit 429, slow down. Batch where you can, and use idempotency_key on events so retries are safe.

Validation error shape

{
  "message": "The store slug field is required.",
  "errors": {
    "store_slug": ["The store slug field is required."]
  }
}

errors is a map of field → list of messages. Surface those to your logs or admin UI.

Common mistakes

  • Calling /profiles upsert when you meant consent-aware /subscribe
  • Putting the Marketing API token in browser JavaScript (use embed forms instead)
  • Forgetting store_slug
  • Using a store slug from a different workspace than the token
  • Retrying /events without idempotency_key and double-counting behavior