Skip to main content

Responses & Error Codes

Response envelope​

The outbound, settings, and retrieval APIs respond with a common envelope.

{ "ok": true, "code": "0", "message": null }
FieldDescription
okWhether the request succeeded (boolean)
codeResult code string. "0" on success; see the table below on failure
messageHuman-readable description (may be null on success)
data(settings · retrieval) Kakao's original data
url / name / size(upload) Upload result

HTTP status & codes​

HTTPcodeMeaningAction
401—Token missing / invalidCheck the API Key
403FORBIDDENInsufficient permission (BrandWrite required)Raise the scope
403NO_BRAND_SCOPEKey not authorized for this brandCheck brandKey
404NO_BRANDBrand does not existCheck brandKey
400EMPTYRequired field missingCheck the request body
400BAD_RICHFailed to parse rich JSONValidate the rich string
400NOT_MULTIPARTUpload is not multipartCheck Content-Type
400NO_FILENo upload fileCheck the file part
400UNSUPPORTED_IMAGEThe upload/image file is not a jpg, png or gif image (including renamed or corrupted files)Save as jpg, png or gif and upload again
413IMAGE_TOO_LARGEThe image is over 5MB (5,242,880 bytes) — upload/image (rich); for Send attachments it is reported per itemReduce the size and upload again
400BAD_URLThe imageUrl of send/image is not an image uploaded to Kakao (external image URLs cannot be sent directly)Upload with upload/image (imageType=plain) first and use the returned url
503NO_PERSISTENCEInbound persistence disabled (retrieval fallback)Retry shortly
402QUOTA_EXHAUSTEDAll consultations for this subscription cycle are used — nothing was sentPay for the subscription, then send again. upgradeToPlan in the response (when present) is a reference to a higher plan

Send failure codes (Kakao results)​

When the request itself was processed but Kakao did not accept the message, the HTTP status is 200 and the body has ok: false. Looking at the HTTP status alone would read as success — always decide on ok and code.

{ "ok": false, "code": "-502", "message": "이미 종료된 상담이라 전송되지 않았어요. 고객이 다시 메시지를 보내면 새 상담으로 이어져요.", "serial": "bw-1790921339104-ef60" }
  • code — Kakao's result code, passed through unchanged (a negative number as a string). Use it as the branching key in your consultation system.
  • message — not Kakao's raw text but a sentence an agent can read as-is (currently in Korean). You can show it on screen. Wording may change, so branch on code.
  • A send that was not delivered (ok: false) does not count against your consultations. EXCEPTION, where delivery cannot be confirmed, may be counted.
codeMeaningWhat your system should doRetry
-502Consultation session expired or missing — replying to a closed chatMark the chat as closed. Once the customer sends a new message (inbound message · reference), you can send again✗
-511Customer is blockedUnblock (unblock), then send✗
-508The channel's chat feature is offTurn chat on in the channel admin center, then send✗
-501Channel cannot take consultations (channel inactive · consultation talk not enabled)Check the channel status✗
-512No valid consultation talk contractCheck channel settings✗
-506Message longer than 1,000 charactersSplit it and sendAfter fixing
-505File or image cannot be sent (format · size · aspect ratio)Check the file — images: jpg · png · gif up to 5MB, width:height between 3:4 and 2:1After fixing
-503Malformed customer key (userKey)Use the userKey received on the inbound webhook as-is✗
-509 · -510Malformed message (missing rich-envelope fields, wrong bubble type, etc.)Check the rich envelope schemaAfter fixing
-504 · -520Same request repeated in a short timeSend again shortly✓ (delayed)
-400 · -500 · -507Sender credential check failedRetry shortly; contact support if it persists✓ (delayed)
-600 · -601 · 500Temporary Kakao errorRetry shortly (with increasing intervals)✓
NO_CONFIGThe channel's sending setup is not completeCheck the channel connection status in TalkBridge Center✗
EXCEPTIONNetwork error or timeout — delivery is unknownIt may already have reached the customer — resending can make them see the same text twice, so retry once only (only successful sends produce an agent echo, so the echo cannot tell you)Once
Other codesKakao results not listed aboveFollow the guidance in message (it includes 사유 코드: …, the reason code)—
Knowing a session has ended in advance

To know before sending, watch the inbound webhook. When a session ends, a kind: "expired" (expired) or "ended" (ended) signal arrives. Sends to that chat come back as -502.

Attachment sends (/api/agent/send/attachments) return a result per item. The top-level ok is true if at least one item was sent, and each entry in results[] carries ok · code · message in the same format — resend only the items that failed.

Handling principles​

  • If ok is not true, branch on code before retrying. Authentication errors such as NO_BRAND_SCOPE and FORBIDDEN fail the same way on retry.
  • For session-related failures (such as -502 expiry), retry after a new inbound event has resumed the session.
  • Send failures arrive as HTTP 200 + ok: false — follow the Retry column of the send failure codes table. Codes marked ✗ fail the same way on retry.