When an API request fails, Connextify returns a standard JSON error envelope alongside an appropriate HTTP status code (4xx for client issues, 5xx for server issues).

Standard error envelope

Error responses use top-level code and a human-readable string in error (and/or message), alongside an appropriate HTTP status code:
{
  "success": false,
  "error": "Human-readable explanation of what went wrong.",
  "code": "ERROR_CODE",
  "status": 400,
  "detail": "Human-readable explanation of what went wrong.",
  "suggestion": "Actionable remediation guidance.",
  "details": []
}
Some gateway-level 401 auth rejections return { "message": "Authentication required" } or { "message": "Invalid API key" }. Always check both response.ok / HTTP status and payload.code || payload.error || payload.message.

HTTP status codes

StatusMeaningTypical cause
200 OKSuccessRequest succeeded.
201 CreatedCreatedNew link, QR code, or campaign created.
400 Bad RequestBad Request / ValidationInvalid JSON body, failed field validation (VALIDATION_ERROR), invalid URL (INVALID_URL), or missing parameters.
401 UnauthorizedAuth FailedMissing, invalid, or expired API key / Bearer token (AUTHENTICATION_REQUIRED, INVALID_API_KEY).
403 ForbiddenAccess DeniedPlan restriction (FEATURE_DISABLED, PLAN_LIMIT_EXCEEDED), or Team Workspace RBAC (CAPABILITY_DENIED, ACTION_PERMISSION_DENIED, SCOPE_ACCESS_DENIED).
404 Not FoundNot FoundTarget short URL, QR code ID, or campaign does not exist in your workspace.
409 ConflictConflictCustom alias (ALIAS_EXISTS) or domain/subdomain is already taken.
422 UnprocessableSecurity / Policy BlockPayload rejected by anti-phishing, malware security screening, or reserved/brand protection policy (SECURITY_RISK, BRAND_PROTECTION_BLOCKED, RESERVED_WORD_BLOCKED).
429 Too Many RequestsRate LimitedExceeded hourly or daily quota for your plan tier (RATE_LIMIT_EXCEEDED).
500 Server ErrorInternal ErrorUnexpected exception on our end (INTERNAL_ERROR). Check status.connextify.com.

Error code reference

1. Authentication & permission errors

AUTHENTICATION_REQUIRED
401
Cause: The Authorization / x-mcp-key header is missing, malformed, or lacks valid credentials (some endpoints also return AUTH_REQUIRED or { "message": "Authentication required" }).Fix: Ensure your request includes Authorization: Bearer <your_api_key>.
INVALID_API_KEY
401
Cause: The API key does not exist, expired, or was revoked from your dashboard.Fix: Check for typos in your environment variable, or generate a fresh key in API Key Settings.
ACCESS_DENIED / FEATURE_DISABLED / PLAN_LIMIT_EXCEEDED
403
Cause: Your current plan tier does not include the requested feature (e.g., Webhooks require Business or Enterprise), you hit a plan quota limit, or access to the resource is restricted.Fix: Upgrade your plan or verify active workspace entitlements in Dashboard settings.
CAPABILITY_DENIED
403
Cause: Acting inside a Team Workspace without a required capability flag such as api_access, mcp_access, analytics_access, can_manage_team, can_manage_groups, or can_manage_subscription.Fix: Ask the workspace administrator to grant the missing capability on your group or member permissions.
ACTION_PERMISSION_DENIED
403
Cause: Your workspace role does not permit the requested CRUD action (view, create, edit, or delete) for the target tool (url, qr, bio, landing_page, form, pixel, utm, conversion, domain, campaign, or webhook).Fix: Check the tool and action fields in the response and update role permissions in Team Management.
SCOPE_ACCESS_DENIED
403
Cause: Your workspace role uses asset visibility scope: "own", and you attempted to view, edit, delete, or query analytics/tests/webhooks for an asset created by another team member.Fix: Only target resources you created, or request scope: "all" visibility from a workspace admin.
WORKSPACE_SCOPE_MISMATCH
403
Cause: You sent an X-Workspace-Id header referencing a different workspace than the one bound to your API key or OAuth token.Fix: Remove the mismatched X-Workspace-Id header or use a credential issued for the target workspace.
WORKSPACE_ACCESS_REVOKED
403
Cause: A workspace-bound API key or OAuth connection was used after team membership was removed or the workspace owner’s team plan expired.Fix: Re-join the workspace and generate a fresh key or reconnect OAuth in your target workspace.
WORKSPACE_MEMBERSHIP_REVOKED
403
Cause: Returned during OAuth authorization if you select a Team Workspace where you are no longer an active member.
WORKSPACE_PLAN_INELIGIBLE
403
Cause: Returned during OAuth authorization if the target workspace owner’s plan no longer includes Team Workspace collaboration.

2. Validation, security & input errors

VALIDATION_ERROR
400
Cause: One or more fields in the JSON body failed schema validation.
{
  "success": false,
  "error": "Validation failed",
  "code": "VALIDATION_ERROR",
  "status": 400,
  "detail": "Validation failed",
  "suggestion": "Check the input format and required fields",
  "details": [
    {
      "field": "url",
      "message": "A valid HTTP or HTTPS destination URL is required"
    },
    {
      "field": "custom_alias",
      "message": "Alias must be between 3 and 50 alphanumeric characters or hyphens"
    }
  ],
  "errors": [
    {
      "field": "url",
      "message": "A valid HTTP or HTTPS destination URL is required"
    },
    {
      "field": "custom_alias",
      "message": "Alias must be between 3 and 50 alphanumeric characters or hyphens"
    }
  ]
}
INVALID_URL
400
Cause: The destination target is not a reachable URL, or uses an unsupported protocol (e.g. javascript:, data:).Fix: Ensure destination URLs start with http:// or https://.
SECURITY_RISK / BRAND_PROTECTION_BLOCKED / RESERVED_WORD_BLOCKED
422
Cause: Destination URL or requested alias/subdomain triggered malware/phishing security checks, brand protection, or system reserved words.

3. Resource conflicts

ALIAS_EXISTS
409
Cause: The requested custom alias is already active on the chosen domain context. Note that aliases are unique per domain: cnfy.link/promo and link.yourbrand.com/promo can coexist, but two links cannot share cnfy.link/promo.Fix: Call GET /short-urls/check-alias to verify availability beforehand, or choose another alias.
NOT_FOUND
404
Cause: The requested short link code, campaign UUID, or QR code does not exist or belongs to another workspace.

4. Quotas & rate limits

RATE_LIMIT_EXCEEDED
429
Cause: You sent more requests than allowed in your current tier window.
{
  "success": false,
  "error": "Rate limit exceeded",
  "code": "RATE_LIMIT_EXCEEDED",
  "status": 429,
  "detail": "Daily short URL limit exceeded",
  "details": {
    "limit": 1000,
    "remaining": 0,
    "reset_at": "2026-10-19T00:00:00Z"
  }
}
Fix: Inspect details.reset_at or read the X-RateLimit-Reset header and sleep your worker until the window resets.

Code example: handling errors cleanly

async function callConnextify(endpoint, options = {}) {
  const response = await fetch(`https://connextify.com/api/v1${endpoint}`, {
    ...options,
    headers: {
      'Authorization': `Bearer ${process.env.CONNEXTIFY_API_KEY}`,
      'Content-Type': 'application/json',
      ...options.headers
    }
  });

  const payload = await response.json();

  if (!response.ok || payload.success === false) {
    const code = payload.code || `HTTP_${response.status}`;
    const message =
      (typeof payload.error === 'string' ? payload.error : null) ||
      payload.message ||
      payload.detail ||
      response.statusText;

    switch (code) {
      case 'AUTHENTICATION_REQUIRED':
      case 'AUTH_REQUIRED':
      case 'INVALID_API_KEY':
        throw new Error(`Authentication error: ${message}`);

      case 'VALIDATION_ERROR': {
        const errorList = Array.isArray(payload.errors)
          ? payload.errors
          : Array.isArray(payload.details)
            ? payload.details
            : [];
        const fieldErrors = errorList.map(e => `${e.field}: ${e.message}`).join(', ');
        throw new Error(`Validation failed: ${fieldErrors || message}`);
      }

      case 'ALIAS_EXISTS':
        throw new Error('This custom slug is already taken. Try checking availability first.');

      case 'RATE_LIMIT_EXCEEDED':
        throw new Error(`Rate limit hit. Resets at: ${payload.details?.reset_at}`);

      default:
        throw new Error(`Connextify API Error [${code}]: ${message}`);
    }
  }

  return payload.data;
}