Skip to main content
When a request fails, Membership.io returns an errors array.
{
  "errors": [
    {
      "status": "404",
      "code": "hub_not_found",
      "title": "Not Found",
      "detail": "Hub not found.",
      "meta": {
        "request_id": "01J..."
      }
    }
  ]
}

Request id

Every handled error includes a request id in meta.request_id and usually in the X-Request-ID response header. Include this id when reporting a bug or support issue.

Validation errors

Validation errors use status 422. When available, source.pointer points to the invalid request body field.
{
  "errors": [
    {
      "status": "422",
      "title": "Validation Error",
      "detail": "Field required",
      "source": {
        "pointer": "/data/attributes/email"
      }
    }
  ]
}

Common statuses

StatusMeaning
400The request is malformed or missing required context.
401The token is missing, expired, invalid, or revoked.
403The credential is valid but not allowed to access the resource.
404The resource does not exist or is hidden for authorization reasons.
409The request conflicts with current state, such as a duplicate or already-revoked resource.
415The content type is unsupported. Prefer application/vnd.api+json.
422The request body, path, or query parameters failed validation.
429The route-specific rate limit was exceeded. Check Retry-After.

Rate limit errors

When a per-endpoint rate limit is exceeded the response carries code rate_limited and a Retry-After header with the number of seconds until the window resets.
{
  "errors": [
    {
      "status": "429",
      "code": "rate_limited",
      "title": "Too Many Requests",
      "detail": "Rate limit exceeded. Retry after 42 seconds.",
      "meta": { "request_id": "01J..." }
    }
  ]
}
See Rate limits for the full list of limited endpoints and their thresholds.