API reference
Every API route, built straight from the OpenAPI specification.
The base address is https://ottoai.sk. Every request sends Authorization: Bearer <key>. The machine-readable version is openapi.json.
Account
/api/v1/mePermission readWho am I: company, plan, features and event list
Response 200
tenantobjectidstring (uuid)namestring
planstringfeaturesobjectapibooleanwebhooksbooleanwhiteLabelbooleaninAppChatboolean
limitsobjectconversationsPerMonthinteger | null
eventsstring[]
Errors: 401 403 429
/api/v1/statsPermission readCounts and conversation outcomes over time
Without parameters: the last 30 days by day in Europe/Bratislava. The range is at most 400 days. resolvedByOtto + unanswered are the conversations Otto handled alone, which the panel shows as solved by Otto.
Parameters
sincequery · string (date-time) optional Created at or after this time.untilquery · string (date-time) optional Created before this time.intervalquery · day | week | month optional Weeks start on Monday.timezonequery · string optional IANA time zone for the series boundaries.
Response 200
conversationsTotalintegerconversationsMonthintegerproductsintegerrangeobjectsincestring (date-time)untilstring (date-time)intervalday | week | monthtimezonestringtotalsobjectconversationsintegerresolvedByOttointegerunansweredintegerhandedOffintegermissedintegerratingUpintegerratingDownintegerleadsintegerreturnsinteger
seriesobject[]datestring (date) First day of the interval in the given time zone.conversationsintegerresolvedByOttointegerunansweredintegerhandedOffintegermissedintegerratingUpintegerratingDowninteger
Errors: 400 401 403 429
/api/v1/usagePermission readAnswers used this month
limit and remaining are null on an unlimited plan.
Response 200
monthstringconversationsintegerlimitinteger | nullremaininginteger | null
Errors: 401 403 429
Conversations
/api/v1/conversationsPermission readList conversations
Newest activity first. Returns no message text, use GET /api/v1/conversations/{id} for that.
Parameters
statusquery · bot | human | resolved optionaloutcomequery · resolved_by_otto | unanswered | handed_off | missed optionallangquery · string optional Two-letter language code, for example sk, cs or en.sincequery · string (date-time) optional Created at or after this time.untilquery · string (date-time) optional Created before this time.updatedSincequery · string (date-time) optional Changed at or after this time.beforequery · string optional nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer optional
Response 200
conversationsConversation[]idstring (uuid)statusbot | human | resolvedoutcomeresolved_by_otto | unanswered | handed_off | missedlangstring | nulltagsstring[]rating1 | -1 | nullcreatedAtstring (date-time)lastAtstring | null (date-time)updatedAtstring (date-time)
nextBeforestring | null
Errors: 400 401 403 429
/api/v1/conversations/{id}Permission readOne conversation with its messages
The only endpoint that returns message text. At most 500 messages, oldest first.
Parameters
idpath · string (uuid)
Response 200
conversationConversationDetailidstring (uuid)statusbot | human | resolvedoutcomeresolved_by_otto | unanswered | handed_off | missedlangstring | nulltagsstring[]rating1 | -1 | nullcreatedAtstring (date-time)lastAtstring | null (date-time)
messagesMessage[]roleuser | bot | operatorkindstring | nulltextstringatstring (date-time)
Errors: 401 403 404 429
/api/v1/conversations/{id}/messagesPermission writeReply to the customer
Sends a message as a colleague, exactly like replying in the panel. The conversation switches to human and Otto stays quiet in it. A customer who is not on the site gets the reply by email.
Parameters
idpath · string (uuid)
Request body
textstringoperatorIdstring (uuid) optional Team member from GET /api/v1/operators. Without it the author is shown as API.
Response 200
oktruemessageobjectrole"operator"kind"text"textstringauthorstringatstring (date-time)
conversationobjectidstring (uuid)status"human"
Errors: 400 401 403 404 429
/api/v1/conversations/{id}/notesPermission writeAdd an internal note
The customer never sees notes.
Parameters
idpath · string (uuid)
Request body
textstringoperatorIdstring (uuid) optional Team member from GET /api/v1/operators. Without it the author is shown as API.
Response 200
oktruenoteobjectidstringauthorstringtextstringatstring (date-time)
Errors: 400 401 403 404 429
/api/v1/conversations/{id}/takeoverPermission writeTake over a conversation
Otto stops answering. Without operatorId the current assignee stays. Sends the conversation.operator_joined event.
Parameters
idpath · string (uuid)
Request body
operatorIdstring (uuid) optional Team member from GET /api/v1/operators. Without it the author is shown as API.
Response 200
oktrueconversationobjectidstring (uuid)status"human"assigneestring | null (uuid)
Errors: 400 401 403 404 409 429
/api/v1/conversations/{id}/releasePermission writeHand the conversation back to Otto
Otto answers on its own again and nobody is assigned.
Parameters
idpath · string (uuid)
Response 200
oktrueconversationobjectidstring (uuid)status"bot"assigneenull
Errors: 401 403 404 409 429
/api/v1/conversations/{id}/resolvePermission writeResolve a conversation
Like Resolve in the panel. Sends the conversation.resolved event.
Parameters
idpath · string (uuid)
Response 200
oktrueconversationobjectidstring (uuid)status"resolved"
Errors: 401 403 404 429
/api/v1/conversations/{id}/reopenPermission writeReopen a resolved conversation
The conversation returns to human.
Parameters
idpath · string (uuid)
Response 200
oktrueconversationobjectidstring (uuid)status"human"
Errors: 401 403 404 429
Leads
/api/v1/leadsPermission readContacts customers left
Parameters
sincequery · string (date-time) optional Created at or after this time.untilquery · string (date-time) optional Created before this time.beforequery · string optional nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer optional
Response 200
leadsLead[]idstring (uuid)conversationIdstring | null (uuid)namestringemailstringphonestringnotestringhandledbooleancreatedAtstring (date-time)
nextBeforestring | null
Errors: 400 401 403 429
/api/v1/leads/{id}Permission writeMark a contact as handled
Sends the lead.updated event when the value changes.
Parameters
idpath · string (uuid)
Request body
handledboolean
Response 200
oktrueleadobjectidstring (uuid)handledboolean
Errors: 400 401 403 404 429
Returns
/api/v1/returnsPermission readComplaints and returns
Parameters
statusquery · new | approved | rejected | resolved optionalkindquery · claim | withdrawal optionalsincequery · string (date-time) optional Created at or after this time.untilquery · string (date-time) optional Created before this time.updatedSincequery · string (date-time) optional Changed at or after this time.beforequery · string optional nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer optional
Response 200
returnsReturn[]idstringkindclaim | withdrawalstatusnew | approved | rejected | resolvedorderIdstringissuestringwantstringnamestringemailstringconversationIdstring | null (uuid)createdAtstring (date-time)decidedAtstring | null (date-time)
nextBeforestring | null
Errors: 400 401 403 429
/api/v1/returns/{id}Permission writeDecide on a complaint or return
Like the decision in the panel. notify: true emails the customer the decision and your note. Sends the return.updated event.
Parameters
idpath · string
Request body
statusnew | approved | rejected | resolvednotestring optionalnotifyboolean optional
Response 200
oktruereturnobjectidstringstatusstring
Errors: 400 401 403 404 429
Unanswered
/api/v1/unansweredPermission readQuestions without a confident answer
Parameters
sincequery · string (date-time) optional Created at or after this time.untilquery · string (date-time) optional Created before this time.beforequery · string optional nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer optional
Response 200
unansweredUnanswered[]idstringconversationIdstring | null (uuid)questionstringatstring (date-time)
nextBeforestring | null
Errors: 400 401 403 429
/api/v1/unanswered/{id}/dismissPermission writeHide a question from the list
Parameters
idpath · string
Response 200
oktrue
Errors: 401 403 404 429
Catalogue
/api/v1/productsPermission readProducts Otto knows
Parameters
beforequery · string optional nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer optional
Response 200
productsProduct[]idstringexternalIdstring | nulltitlestringurlstring | nullmetaobjectupdatedAtstring (date-time)
nextBeforestring | null
Errors: 401 403 429
/api/v1/productsPermission catalogueAdd or update products
Only what you send, nothing is deleted. At most 500 at once. Meant for price and stock changes.
Request body
productsProductInput[]idstring Your product id. externalId works too.titlestring name works too.descriptionstring optionalurlstring optionalimagestring optional imageUrl works too.pricenumber optionalcurrencystring optionalavailabilitystring optionalcategorystring optionalmanufacturerstring optionalparamsobject optional
Response 200
oktrueproductsinteger
Errors: 400 401 403 429
/api/v1/products/snapshotPermission catalogueReplace the whole catalogue
Products missing from the snapshot are deleted. At most 5000 at once and 12 times per hour. If you send far fewer products than we hold, we delete nothing and add warning with errcode prune_skipped.
Request body
productsProductInput[]idstring Your product id. externalId works too.titlestring name works too.descriptionstring optionalurlstring optionalimagestring optional imageUrl works too.pricenumber optionalcurrencystring optionalavailabilitystring optionalcategorystring optionalmanufacturerstring optionalparamsobject optional
Response 200
oktrueproductsintegerremovedintegercurrencystring | null optionalwarningstring optionalerrcode"prune_skipped" optional
Errors: 400 401 403 429
/api/v1/products/{id}Permission catalogueDelete one product
Parameters
idpath · string
Response 200
oktrue
Errors: 401 403 404 429
Knowledge
/api/v1/knowledgePermission readKnowledge besides products
source faq was added by you, page was read from your website. Only faq records can be deleted.
Parameters
beforequery · string optional nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer optional
Response 200
knowledgeKnowledge[]idstringsourcefaq | pagetitlestringcontentstringurlstring | nullupdatedAtstring (date-time)deletableboolean
nextBeforestring | null
Errors: 401 403 429
/api/v1/knowledgePermission writeAdd knowledge
Otto uses it right away.
Request body
titlestringcontentstring
Response 200
oktrueidstring
Errors: 400 401 403 429
/api/v1/knowledge/{id}Permission writeDelete knowledge you added
Parameters
idpath · string
Response 200
oktrue
Errors: 401 403 404 429
Team
/api/v1/operatorsPermission readYour team
Use id as operatorId in conversation actions.
Response 200
operatorsOperator[]idstring (uuid)namestringemailstringroleowner | operator
Errors: 401 403 429
Webhooks
/api/v1/webhooks/deliveriesPermission webhooksWebhook deliveries
Parameters
statusquery · pending | delivered | failed | cancelled optionaleventquery · string optionalbeforequery · string optional nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer optional
Response 200
deliveriesDelivery[]idstring (uuid)eventstringstatuspending | delivered | failed | cancelledhttpStatusinteger | nullattemptsintegererrorstring | nullunconfirmedbooleantestbooleancreatedAtstring (date-time)lastAttemptAtstring | null (date-time)nextAttemptAtstring | null (date-time)canResendboolean
nextBeforestring | null
Errors: 400 401 403 429
/api/v1/webhooks/deliveries/{id}/resendPermission webhooksSend an event again
The body is kept 7 days after the last attempt; after that 410.
Parameters
idpath · string (uuid)
Response 202
oktrueidstring (uuid)
Errors: 401 403 404 409 410 429
/api/v1/webhooks/testPermission webhooksSend a test event
Delivers right away and tells you how your URL answered.
Response 200
idstring (uuid)statuspending | delivered | failed | cancelledhttpStatusinteger | nullunconfirmedbooleanerrorstring | null
Errors: 400 401 403 409 429

