Get started
Errors
Errors use HTTP status codes and a JSON body with a stable, machine-readable code. Every error links to its own page here.
The error format
{
"error": {
"code": "validation_failed",
"message": "Some fields need attention.",
"request_id": "req_4f2a9c1e0b7d3a55",
"docs_url": "https://developers.kweko.uz/errors/validation_failed",
"fields": {
"stage_id": "This stage belongs to another pipeline."
}
}
}| Field | Meaning |
|---|---|
code | What went wrong, in snake_case. Stable: branch on it. |
message | A sentence for people, in the language of Accept-Language (English, Russian or Uzbek). It can change: do not parse it. |
request_id | The id of this request, also in the X-Request-Id header. Quote it to support. |
docs_url | This site's page for the code. |
fields | Only for field problems: request field name to a message about it. |
Some codes add more keys next to these, for example permission on forbidden, reason and limit on rate_limited, or key, limit, used, plan and upgrade_to on limit_reached. Each code's page lists them.
OAuth's token endpoint (POST /oauth/token) is the one exception: it answers in the OAuth format, {"error": "invalid_grant", "error_description": "…"}, see OAuth for apps.
Status codes
| Status | Meaning | Retry? |
|---|---|---|
| 400 | The request is malformed: bad JSON, an unknown field, a bad cursor | No, fix the request |
| 401 | No valid credentials | No, fix the key or refresh the token |
| 402 | The workspace is read-only until its subscription is paid, or out of AI credits | Later |
| 403 | Authenticated, but not allowed: a missing scope, a plan limit, a restriction | No |
| 404 | Not found, or not visible to this key | No |
| 409 | Conflicts with the current state, for example an already finished import | After changing the state |
| 410 | The record was deleted | No |
| 413 | The body is too large | No, send less |
| 422 | Valid JSON that cannot be accepted: validation_failed and friends | No, fix the values |
| 429 | Rate limited | Yes, after Retry-After |
| 500 | Kweko failed | Yes, with backoff |
| 502, 503, 504 | A service Kweko depends on failed or is slow | Yes, with backoff |
Handle codes you do not know by their status: new codes can appear in v1.
Handling errors
const res = await fetch("https://api.kweko.uz/v1/leads", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.KWEKO_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ name: "Website order #1042" }),
})
if (!res.ok) {
const { error } = await res.json()
if (error.code === "validation_failed") showFieldErrors(error.fields)
else if (res.status === 429 || res.status >= 500) retryLater(Number(res.headers.get("Retry-After") || 1))
else throw new Error(`${error.code}: ${error.message} (${error.request_id})`)
}All error codes
Generated from the API's source code on every build, so it lists every code the API can return. Codes marked as Kweko Admin come from the staff back office and never reach API clients.
The API has 218 error codes today. Each has its own page.
- 409access_not_activeKweko Admin: This access has already ended.
- 409agent_not_testedTest the AI operator in the sandbox chat before turning it on.
- 429ai_automation_budgetThis automation used its daily AI budget. It resets at midnight.
- 403 409 422ai_consent_requiredKweko AI is off. An admin can turn it on in Settings → AI.
- 429ai_conversation_capThis conversation reached its AI limit. A person will take over.
- 402ai_credits_exhaustedNot enough AI credits for this. Upgrade your plan or add credits.
- 429ai_daily_capYou reached your daily AI limit. It resets at midnight.
- 403ai_feature_disabledThis AI feature is turned off in Settings → AI.
- 402ai_monthly_capYour workspace reached its monthly AI limit. An owner can raise it in Settings → Kweko AI.
- 502ai_unavailableKweko AI is not responding right now. Try again. No credits were used.
- 409already_in_reviewThis app is already in review.
- 409already_scheduledThe workspace is already scheduled for deletion.
- 409already_signed_inKweko Admin: You are already signed in.
- 409already_startedThis import has already run.
- 502app_errorThe app returned an error.
- 403app_not_availableThis app is not available for installation.
- 504app_slowThe app is slow to respond.
- 403app_suspendedThis app has been disabled by Kweko.
- 403app_token_requiredCall this with the app installation's access token.
- 502app_unreachableThe app URL is invalid.
- 502app_url_blockedThe app's URL is not allowed.
- 403assistant_members_onlyKweko Assistant is available to workspace members only.
- 409authenticator_setKweko Admin: An authenticator is already set up. Ask an owner to reset it to use a new one.
- 409automation_pausedTurn the automation on first.
- 502bad_graph_responseFacebook sent an unexpected lead.
- 400bad_jsonA field has the wrong type.
- 400bad_payloadThe callback payload was not understood.
- 400bad_requestMissing authorization code.
- 400bad_stateThe sign-in link expired. Start again from Kweko.
- 400bad_uploadUpload a CSV or XLSX file.
- 413body_too_largeTelemetry batches are limited to 64 KB.
- 409booking_expiredThis page has expired. Reload it and try again.
- 404booking_link_invalidThis link is not valid or has expired.
- 409booking_lockedThis booking can no longer be changed online. Please call the business.
- 429booking_quota_reachedOnline booking is closed for this month. Please contact the business another way.
- 404booking_unavailableOnline booking is not available right now.
- 409broadcast_not_draftOnly drafts can be deleted.
- 409broadcast_statusThis broadcast cannot change to that state now.
- 422call_too_longCalls longer than 60 minutes are not transcribed.
- 409cannot_resumeThis move can't continue. Connect again to run it once more; records already moved are updated, not duplicated.
- 503card_payments_unavailableCard payments are not connected yet. Pay by bank transfer: choose it at checkout or contact support.
- 401challenge_expiredThis sign-in has expired. Sign in again.
- 422channel_connect_failedThe request cannot be processed as sent.
- 409channel_in_useA Telegram Business channel uses this bot. Delete that channel first.
- 410checkout_expiredThis checkout expired. Start again.
- 409checkout_finishedThis checkout is already finished.
- 429code_daily_limitToo many codes today. Try again tomorrow or contact support.
- 429code_too_soonPlease wait a minute before requesting another code.
- 429concurrency_limitedToo many requests in flight for this API key.
- 409confirm_requiredSome imported records were changed after the import. Confirm to delete them too.
- 409confirmation_requiredConfirm enrolling more than 100 leads.
- 409conflictThe records changed since the merge; it can't be undone.
- 422connect_failedCould not connect. Check the credentials and try again.
- 409consent_outdatedThe consent text has changed. Reload and read it again.
- 409count_changedThe audience changed since the preview. Check the new number and confirm again.
- 400credentials_in_urlSend API keys in the Authorization header, never in the URL.
- 403cross_originThis request must come from the Kweko app itself.
- 403csrfKweko Admin: Reload the page and try again.
- 403csrf_failedSecurity check failed. Reload the page and try again.
- 429deployer_busyKweko Admin: The deployer has not picked up the last requests yet. Wait a minute.
- 403disconnectedThis 1C connection is disconnected in Kweko.
- 422document_not_shareableThis document was created before online pages. Create it again to share it as a page.
- 503documents_unavailableDocuments are not available.
- 403edit_window_closedNotes can be edited for 24 hours. Add a new note instead.
- 409email_no_recipientThis conversation has no email address to reply to.
- 409email_takenAn account with this email already exists. Sign in instead.
- 503email_unavailableWe couldn't send the email right now. Try again in a moment.
- 409enrol_firstKweko Admin: Start setting up the authenticator first.
- 403enrolment_link_invalidKweko Admin: This set-up link is not valid, was already used or has expired. Ask a Kweko owner for a new one.
- 413file_too_largeFiles can be up to 100 MB.
- 422file_type_blockedThis kind of file can't be uploaded (programs and scripts are blocked for safety). Put it in a ZIP archive if you need to share it.
- 409finishedThis move has already finished.
- 403forbiddenOnly an owner can change another owner.
- 409form_expiredThis form has expired. Reload the page and try again.
- 429form_quota_reachedThis form can't take more requests this month. Please contact the business another way.
- 404form_unavailableThis form is not accepting requests.
- 410goneThe uploaded file has expired. Upload it again.
- 422import_errorsSome rows can't be read. Fix them or remove them from the file.
- 500internalSomething went wrong on our side.
- 502invalid_blocksThe app returned a response Kweko can't show.
- 400invalid_clientThis app is not available.
- 401invalid_codeKweko Admin: That code is wrong or expired.
- 401invalid_credentialsEmail or password is incorrect.
- 400invalid_cursorThe cursor is not valid.
- 422invalid_fileThis file has more rows than your plan allows in one import.
- 400invalid_id_typeExpected a delivery id (dlv_…).
- 422invalid_queryA regex must have 1 to 200 characters.
- 400invalid_requestThis authorization request is invalid.
- 401invalid_tokenThe access token is invalid, expired or revoked.
- 403invite_email_mismatchThis invite was sent to …. Sign in with that email to accept it.
- 404invite_invalidThis invite link is invalid or expired. Ask for a new one.
- 409invoice_settledThis invoice is already ….
- 403ip_not_allowedRequests from this IP address are not allowed for this API key.
- 401key_expiredThis API key has expired.
- 409key_inactiveRevoked or expired keys can't be changed. Create a new key instead.
- 401key_revokedThis API key has been revoked.
- 409last_ownerA workspace needs at least one owner. Make someone else an owner first.
- 403 409 422limit_reachedA lead can have at most 200 line items.
- 404link_expiredThis download link has expired or is not valid.
- 409loop_guardThis run was stopped by the loop guard and cannot be replayed.
- 413manifest_too_largeThe manifest is larger than 64 KB.
- 422masked_filterYour role sees masked phone numbers and emails, so they can only be matched by their exact full value.
- 422masked_sortYour role sees masked phone numbers and emails, so you can't sort by them.
- 404 502media_unavailableThis file can't be downloaded from the messenger.
- 403member_requiredOnly a teammate can approve AI drafts.
- 403members_onlyOnly workspace members can manage apps.
- 409migration_runningA move is already in progress. Wait for it to finish or cancel it.
- 403missing_scopeThis API key needs the users:read scope.
- 422no_conversationThere is no conversation with this client yet.
- 422no_didoxConnect Didox in Settings → Integrations first.
- 422no_extensionAsk an admin to link your extension in Settings → Telephony.
- 403no_framesThis app has no Frames, so it cannot call the Kweko API from the browser.
- 409no_leadsLeads are not available in this workspace.
- 409no_memberChoose who gets the records of people without a match.
- 409 422no_pipelineCreate a pipeline first.
- 409no_productsProducts are not available in this workspace.
- 422no_recipientsNobody in this audience can get the message.
- 404 422no_recordingThis call has no recording to transcribe.
- 422no_sms_accountConnect an SMS provider in Settings → SMS first.
- 409not_activeOnly an active paid subscription can be cancelled or resumed.
- 503not_configuredGoogle Calendar is not configured on this server yet.
- 422not_connectedConnect Google Calendar first.
- 409not_emailOnly email channels can check for new mail.
- 409not_failedOnly failed messages can be retried.
- 409not_finishedThis import hasn't finished yet.
- 404not_foundNot found.
- 409not_in_reviewSubmit the app for review first.
- 409not_manualOnly automations with the manual trigger can be run by hand.
- 403not_memberThis account isn't part of this workspace.
- 409not_readyThis move can't be changed now.
- 409 422not_simulatorOnly simulator channels accept simulated messages.
- 422not_supportedHang up on your phone. This provider does not support hanging up from Kweko.
- 409not_trialingKweko Admin: This workspace is not on a trial.
- 409not_whatsappTemplates exist on WhatsApp channels only.
- 409nothing_dueThere is nothing to pay right now.
- 503ops_not_configuredKweko Admin: Server monitoring is not set up on this installation.
- 502ops_unavailableKweko Admin: The server monitor is not answering. Try again in a minute.
- 409opted_outThe client opted out on this channel.
- 403origin_not_allowedThis form can't be used on this website.
- 409own_accountKweko Admin: You cannot demote or disable yourself. Ask another owner.
- 403owner_onlyOnly an owner can change support access.
- 422pausedResume the sync first.
- 413payload_too_largeForm values are too large.
- 402payment_declinedThe payment was declined. Try another card.
- 403permission_deniedAPI keys can be managed only by workspace owners and admins in Kweko.
- 409pipeline_has_leadsChoose a pipeline to move this pipeline's leads to.
- 409pipeline_requiredA workspace keeps at least one pipeline.
- 403plan_requiredThis feature isn't included in your plan.
- 409proposal_decidedThis proposal was already applied or dismissed.
- 409proposal_existsThis document is already shared. Refresh the page.
- 409proposal_inactiveThis link is expired or turned off. Extend it or share the document again.
- 422proposal_page_unavailableOnline pages open for clients once your workspace is active (see Settings, Usage and limits). Until then, send the PDF.
- 409proposal_revokedThis link was turned off. Share the document again for a new link.
- 422query_too_slowThis filter takes too long. Narrow it down and try again.
- 422range_too_largeThe period is too long. Pick at most 5 years.
- 429rate_limited200 invites are waiting to be accepted. Revoke old ones before sending more.
- 402read_onlyYour workspace is read-only until the subscription is paid. You can still view and export.
- 502recording_unavailableThe provider did not return the recording.
- 400request_expiredThis authorization request has expired. Start again from the app.
- 403restrictedThis feature is paused for your workspace. See Settings, Usage & limits.
- 409run_finishedThis run has already finished.
- 409sample_existsSample data is already added.
- 422saved_reply_limitThe request cannot be processed as sent.
- 413settings_too_largeSettings are larger than 32 KB.
- 401sign_in_againKweko Admin: Too many wrong codes. Sign in again.
- 409slot_takenThis time was just taken. Please pick another time.
- 409sole_ownerYou are the only owner of a workspace. Make someone else an owner or delete the workspace first.
- 422 502source_errorWe couldn't reach the other system. Try again in a minute.
- 401sso_invalidThis sign-in link expired. Open the workspace from the hub again.
- 409stage_has_leadsChoose a stage to move this stage's leads to.
- 409stage_requiredIncoming, won and lost stages and the last open stage can't be deleted.
- 422stage_requirementsFill in the required fields to move the lead to this stage.
- 409starter_readonlyBuilt-in templates can't be changed. Make a copy and edit it.
- 409status_incident_closedKweko Admin: This notice is already resolved.
- 404stir_not_foundNo company with this STIR was found.
- 502 503stir_unavailableCompany lookup by STIR is not available yet. Enter the details manually.
- 503storage_unavailableFile storage is not available.
- 409support_access_offKweko Admin: The owner has turned off support access for this workspace.
- 404support_link_invalidThis support link has expired or was already used.
- 403support_read_onlySupport access is read-only.
- 409sync_runningThis mailbox is being checked right now. Try again in a minute.
- 409tag_existsA tag with this name already exists. Merge the two tags instead.
- 409tag_limitThe request conflicts with the current state.
- 403tags_admins_onlyOnly admins can create new tags in this workspace.
- 409task_not_openOnly open tasks can be snoozed.
- 409telegram_unavailableTelegram notifications are not set up on this server.
- 422templates_unavailableThe request cannot be processed as sent.
- 409terms_changedThese Terms are no longer in force. Reload the page.
- 422test_not_possibleThis contact cannot get the message: ….
- 422too_deepGroups can be nested at most 2 levels deep.
- 429too_many_attemptsKweko Admin: Too many sign-in attempts for this account. Try again in an hour.
- 429too_many_bookingsThis phone number already has several bookings. Please call the business to book more.
- 422too_many_conditionsA filter can have at most … conditions.
- 422too_many_filesA record can have up to 500 files. Delete some first.
- 429too_many_jobs2 imports are already running. Start this one when one of them finishes.
- 422too_many_pointsToo many days to group by day. Group by week or month.
- 422too_many_recipientsA broadcast reaches at most … people. Narrow the audience.
- 422too_many_recordsA bulk operation can change at most 10,000 records.
- 422too_many_regexA filter can have at most … regex conditions.
- 422too_many_sort_keysSort by at most 5 fields.
- 422too_many_templatesA workspace can have up to 200 templates.
- 403transcript_forbiddenYou cannot read transcripts of this call.
- 422transcription_offCall transcription is off. An admin can turn it on in Settings → Calls.
- 422transcription_unavailableCall transcription is not available on this server yet.
- 409transfer_requiredPick who takes over this person's leads, contacts, tasks and chats.
- 401unauthenticatedAPI keys are accepted only on /v1 endpoints.
- 401unauthorizedPlease sign in.
- 409undo_expiredBulk changes can be undone within 24 hours.
- 400unknown_fieldThe request has a field this endpoint does not accept.
- 422unknown_metricThis metric can't rank the team.
- 409unpaid_invoicePay the outstanding invoice first. A new bank transfer invoice can be issued once it is paid.
- 409use_agent_settingsTurn the AI operator on or off in its settings.
- 409use_authenticatorKweko Admin: Use the code from your authenticator app.
- 422validation_failedSome fields need attention.
- 409vendor_existsYou already have a vendor account.
- 403vendor_requiredCreate a vendor account first.
- 409webhook_disabledEnable the webhook before replaying deliveries.
- 403workspace_deletingThis workspace is scheduled for deletion. Only its owners can open it.