Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.lofty.com/llms.txt

Use this file to discover all available pages before exploring further.

The Lofty API uses standard HTTP status codes combined with a code field in the response body for detailed error identification.

Response format

Error responses follow this structure:
{
  "code": 200100,
  "message": "Sorry, the vendor does not have permission for this API."
}

HTTP status codes

StatusMeaning
200Success
400Bad Request — invalid parameters or validation failure
401Unauthorized — missing or invalid credentials
403Forbidden — valid token but insufficient permissions
404Not Found — resource does not exist or caller has no access
429Too Many Requests — rate limit exceeded
500Internal Server Error

Authentication & permission errors

CodeHTTPDescription
200100403OAuth token lacks the required permission scope. Grant the scope in the Developer Portal and re-authorize.
BAD_CREDENTIALS401Invalid API key or access token.
VENDOR_HAS_NO_PERMISSION403Vendor application does not have access to this API.
PERMISSION_DENIED403Caller does not have the required role for this operation (e.g. accessing another agent’s tasks).
NO_ACCESS_WEBSITE403Caller has no access to the specified user’s listing data.
ACCESS_ALL_TEAM_LEADS403Team-wide communication search requires the ACCESS_ALL_TEAM_LEADS permission.

Validation errors (400)

CodeDescription
INVALID_PARAMETEROne or more request parameters are invalid or missing.
MISSING_PARAMETERA required parameter was not provided.
LIMIT_NOT_VALIDlimit parameter is out of the allowed range (typically 1–100).
LIMIT_PARAM_OVERSIZElimit exceeds the configured maximum for this endpoint.
PARAMETER_TOO_LONGA string parameter exceeds the maximum allowed length.
LISTING_LIMIT_NOT_VALIDListing search limit is out of range.

Resource not found (404)

CodeDescription
LEAD_NOT_EXISTThe specified lead was not found or the caller has no access.
LEAD_NOT_FOUNDLead not found (used by some V2 endpoints).
TASK_NOT_EXISTThe specified task or appointment was not found.
TRANSACTION_NOT_EXISTThe specified transaction was not found.
USER_NOT_EXISTThe specified user was not found.
RESOURCE_NOT_EXISTGeneric — the requested resource was not found.
ALERT_CONDITION_FEGIN_FAILListing alert condition lookup failed.

Lead errors (400)

CodeDescription
PARAM_FIRST_NAME_FILLfirstName is required when resolving assignees.
PARAM_EMAIL_MUST_FILLemail is required when resolving assignees.
INVALID_UPDATE_OPERATION_LEADIDInvalid lead ID in update operation.

Transaction errors (400)

CodeDescription
TRANSACTION_NAME_BLANKTransaction name cannot be empty.
TRANSACTION_NAME_HTMLTransaction name cannot contain HTML.

Task errors (400)

CodeDescription
TASK_IS_SMARTPLANCannot modify a task that belongs to a Smart Plan.

Team & custom field errors (400)

CodeDescription
ATTRIBUTE_NAME_EMPTYCustom field name is required.
ATTRIBUTE_TYPE_EMPTYCustom field type is required.

Routing errors (400)

CodeDescription
BUSINESS_TYPE_ERRORInvalid routing business type.
STRATEGY_TYPE_ERRORInvalid routing strategy type.
STRATEGY_TYPE_NOT_MATCHRouting strategy type does not match the rule.
INVAID_ROLE_IDInvalid role ID.
INVAID_IDInvalid routing rule ID.
INVAID_GROUP_IDInvalid group/office ID.
INVAID_ACTIVE_HOURSInvalid active hours configuration.
INVAID_ACTIVE_DAYInvalid active day configuration.
INVAID_MEMBER_WEIGHTInvalid member weight value.
INVAID_TOUCHMINUTESInvalid touch minutes value.

Webhook errors (400)

CodeDescription
WEBHOOK_CALLBACK_URL_INVALIDCallback URL is not a valid HTTPS URL.
WEBHOOK_EXCEED_LIMITMaximum number of webhook subscriptions reached.
WEBHOOK_DELETE_NOT_EXISTSubscription ID does not exist.
WEBHOOK_DELETE_NO_AUTHORITYCaller does not own this subscription.

Rate limit (429)

When rate limited, the response includes:
HTTP/1.1 429
X-RateLimit-Limit: 20
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 21000
{"message":"Too Many Requests"}
See Rate Limiting for details.

Handling errors

const response = await fetch('https://api.lofty.com/v1.0/leads', {
  headers: { 'Authorization': 'Bearer YOUR_TOKEN' }
});

if (!response.ok) {
  const error = await response.json();
  console.error(`HTTP ${response.status}: ${error.code}${error.message}`);
}
Always check both the HTTP status code and the code field in the response body. Some business errors return specific codes (like 200100) that provide more detail than the HTTP status alone.