Skip to content

Errors

An error is JSON with the HTTP status, a machine-readable code and a message. Make decisions in your code by code: it is stable, while messages may change.

Response format

401 · application/json
{
  "status": 401,
  "code": "API_KEY_EXPIRED",
  "message": "Срок действия ключа истёк. Создай новый ключ или подключи приложение заново.",
  "requestId": "0d2c6f3a-9b1e-4c7d-8a5f-3e2b1c0d9e8f"
}
  • status: the HTTP status.
  • code: the machine-readable code. For a code you don’t know, go by the status.
  • message: a Russian fallback text; localize by code.
  • requestId: the same as the X-Request-ID header; you can send it to support.
  • params: safe details of some codes: scope, limitBytes, quotaBytes and usedBytes, retryAfter, feature.
  • currentRevision: only with PASTE_REVISION_CONFLICT.

When to retry

  • 429 and 503 with Retry-After: wait that many seconds and retry.
  • 409 with Retry-After on upload: an earlier attempt is still running; retry with the same Idempotency-Key.
  • A network error on upload: retry with the same Idempotency-Key; there will be no duplicate.
  • 401 API_KEY_EXPIRED and API_KEY_REVOKED: retrying won’t help; you need a new key.

Common to all methods

Any method with a key may answer with an invalid or expired key (401), a missing permission (403 SCOPE_REQUIRED), invalid fields (400), too many requests (429) or an unavailable service (503). Method pages list only their own codes.

Codes

CodeStatusMessage
DEVICE_AUTH_INVALID400The connection code is invalid or has expired. Start connecting again in the app.
FOLDER_ARCHIVE_INVALID400The folder archive could not be read: send a plain ZIP without a password, with UTF-8 names and no paths like “../”.
FOLDER_EMPTY400No files are left to share: dependencies, build output, secrets and non-text files are not uploaded.
INVALID_JSON400The request contains invalid JSON.
ONE_TIME_NOT_PUBLIC400A one-time file cannot be published in the feed and profile. Choose link access or turn off the one-time link.
UPLOAD_FORMAT_UNSUPPORTED400Supported formats are still PNG, JPEG, WebP and AVIF images, plus MP4 and WebM video. Images can contain up to 40 megapixels.
VALIDATION_FAILED400Check the form fields.
ACCOUNT_ACCESS_CHANGED401Account access has changed. Sign in again.
ACCOUNT_BANNED401This account has been suspended by an administrator.
API_KEY_EXPIRED401The API key has expired. Create a new key or connect the app again.
API_KEY_INVALID401The API key is invalid.
API_KEY_REVOKED401The API key has been revoked. Create a new key or connect the app again.
BEARER_REQUIRED401A Bearer key is required.
DEVICE_KEY_REQUIRED403Only the key of an app connected through the browser can renew itself.
ORIGIN_FORBIDDEN403The request origin is not allowed.
PLAN_FEATURE_REQUIRED403This is available in Pro.
SCOPE_REQUIRED403The API key does not have the required permission.
ACCOUNT_UNAVAILABLE404The account is unavailable.
UPLOAD_STALLED408The file stopped arriving. Check your connection and upload it again.
DEVICE_RENEW_TOO_EARLY409The connection can be renewed within 30 days of its end.
PASTE_REVISION_CONFLICT409The note changed in another tab. Compare your draft with the server version.
FOLDER_TOO_LARGE413The folder has more than 20 MB of text. Choose a smaller folder or exclude files in .gitignore.
FOLDER_TOO_MANY_FILES413Up to 2,000 files can be shared. Choose a smaller folder or exclude files in .gitignore.
IMAGE_TOO_LARGE413The image exceeds the size limit. Compress it or reduce its resolution.
QUOTA_EXCEEDED413There is not enough storage in the account.
UPLOAD_TOO_LARGE413The file exceeds the size limit.
VIDEO_TOO_LARGE413The video exceeds the size limit. Make it smaller with Compress in your lacuna console or the Windows app.
VIDEO_NOT_SUITABLE415The video must be compressed before upload: lacuna keeps H.264 with AAC (MP4) or VP9/AV1 with Opus (WebM) up to 3840 × 2160. Compress it in the lacuna app for Windows or in Compress on the site.
FOLDER_INFECTED422The antivirus found a threat in the folder, so it was not uploaded.
RATE_LIMITED429Too many requests. Try again later.
UPLOAD_USER_BUSY429Your account already has uploads in progress. The next one starts when one of them finishes.
SERVICE_UNAVAILABLE503The service is temporarily unavailable. Try again later.
UPLOAD_SERVER_BUSY503The server is receiving many files right now. Try again in a few seconds.
Errors · lacuna API