{"openapi":"3.1.0","info":{"title":"Prodantix API","version":"0.1.0"},"servers":[{"url":"https://api.prodantix.com","description":"Flags and messaging"},{"url":"https://eu.api.prodantix.com","description":"Event ingestion (EU)"},{"url":"https://eu.replay.prodantix.com","description":"Session replay (EU)"}],"paths":{"/v1/plans":{"get":{"summary":"List the plan catalogue","tags":["billing"],"description":"Every prodantix plan with its entitlements and prices: the ladder the pricing page and the plan picker render. Public, and cacheable for five minutes.","responses":{"200":{"description":"The plan catalogue","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/PublicPlan"}}},"required":["plans"]}}}},"503":{"description":"The plan catalogue is unavailable"}}}},"/v1/ai/models":{"get":{"summary":"List the AI models and their prices","tags":["billing"],"description":"Every model a workspace can pick for the AI add-on, with its price per million tokens of each kind in micro-dollars: the model's price plus the markup. Public, and cacheable for an hour.","responses":{"200":{"description":"The offered models and their prices","content":{"application/json":{"schema":{"type":"object","properties":{"markupPercent":{"type":"integer","format":"uint32","minimum":0},"models":{"type":"array","items":{"$ref":"#/components/schemas/PublicAiModel"}}},"required":["markupPercent","models"]}}}},"503":{"description":"The model list has not loaded yet"}}}},"/v1/projects/{projectId}/annotations":{"get":{"summary":"List annotations","tags":["analytics"],"description":"The project's annotations whose days overlap from to to, both YYYY-MM-DD and inclusive. Name a report to add that report's own annotations to the project's.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the annotations belong to","schema":{"type":"string"}},{"name":"reportId","in":"query","required":false,"description":"A report whose own annotations are wanted too","schema":{"type":"string"}},{"name":"from","in":"query","required":true,"description":"The first day, YYYY-MM-DD","schema":{"type":"string"}},{"name":"to","in":"query","required":true,"description":"The last day, YYYY-MM-DD","schema":{"type":"string"}}],"responses":{"200":{"description":"The annotations, earliest first","content":{"application/json":{"schema":{"type":"object","properties":{"annotations":{"type":"array","items":{"$ref":"#/components/schemas/AnnotationBody"}}},"required":["annotations"]}}}},"400":{"description":"The request does not describe an annotation"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report or annotation is not there"}}},"post":{"summary":"Add an annotation","tags":["analytics"],"description":"Marks a day, or a range when endsOn is given, with a note of up to 200 characters and one to ten tags. With reportId it shows on that report only; without, on every chart in the project whose dates cover it.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the annotations belong to","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reportId":{"type":["string","null"]},"startsOn":{"type":"string"},"endsOn":{"type":["string","null"]},"text":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["startsOn","text","tags"]}}}},"responses":{"201":{"description":"The annotation as stored","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":["string","null"]},"startsOn":{"type":"string"},"endsOn":{"type":"string"},"text":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"canChange":{"type":"boolean"}},"required":["id","startsOn","endsOn","text","tags","createdAt","updatedAt","canChange"]}}}},"400":{"description":"The request does not describe an annotation"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report or annotation is not there"}}}},"/v1/projects/{projectId}/annotations/{annotationId}":{"patch":{"summary":"Change an annotation","tags":["analytics"],"description":"Replaces an annotation's days, text, tags and where it shows. Open to its author and to holders of prodantix.annotations.write.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the annotations belong to","schema":{"type":"string"}},{"name":"annotationId","in":"path","required":true,"description":"The annotation","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reportId":{"type":["string","null"]},"startsOn":{"type":"string"},"endsOn":{"type":["string","null"]},"text":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["startsOn","text","tags"]}}}},"responses":{"200":{"description":"The annotation as stored","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":["string","null"]},"startsOn":{"type":"string"},"endsOn":{"type":"string"},"text":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"canChange":{"type":"boolean"}},"required":["id","startsOn","endsOn","text","tags","createdAt","updatedAt","canChange"]}}}},"400":{"description":"The request does not describe an annotation"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report or annotation is not there"}}},"delete":{"summary":"Delete an annotation","tags":["analytics"],"description":"Removes an annotation from every chart it shows on. Open to its author and to holders of prodantix.annotations.write.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the annotations belong to","schema":{"type":"string"}},{"name":"annotationId","in":"path","required":true,"description":"The annotation","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"400":{"description":"The request does not describe an annotation"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report or annotation is not there"}}}},"/v1/projects/{projectId}/reports/{reportId}/public-link":{"get":{"summary":"Read a report's public link","tags":["analytics"],"description":"The report's public link while it is on: its address, the day it stops and when its report last ran. Answers 404 when no link is on.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"description":"The saved report","schema":{"type":"string"}}],"responses":{"200":{"description":"The public link","content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string"},"token":{"type":"string"},"url":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"expiresOn":{"type":"string"},"ranAt":{"type":["string","null"]}},"required":["reportId","token","url","createdAt","expiresAt","expiresOn"]}}}},"400":{"description":"The request does not describe a share"},"403":{"description":"The caller may not do this"},"404":{"description":"The project or report is not there"}}},"put":{"summary":"Turn a report's public link on","tags":["analytics"],"description":"Turns the link on until expiresOn, a YYYY-MM-DD day after today and at most 90 days ahead, or moves the stop day of the link that is on; the link stops as that day begins, in UTC. Anyone with the address can then read the report's last run, without its cohort. Every run of the report refreshes what the link shows.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"description":"The saved report","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expiresOn":{"type":"string"}},"required":["expiresOn"]}}}},"responses":{"200":{"description":"The public link","content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string"},"token":{"type":"string"},"url":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"expiresOn":{"type":"string"},"ranAt":{"type":["string","null"]}},"required":["reportId","token","url","createdAt","expiresAt","expiresOn"]}}}},"400":{"description":"The request does not describe a share"},"403":{"description":"The caller may not do this"},"404":{"description":"The project or report is not there"}}},"delete":{"summary":"Turn a report's public link off","tags":["analytics"],"description":"Ends the link at once; its address answers 404 from then on.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"description":"The saved report","schema":{"type":"string"}}],"responses":{"204":{"description":"Turned off"},"400":{"description":"The request does not describe a share"},"403":{"description":"The caller may not do this"},"404":{"description":"The project or report is not there"}}}},"/v1/projects/{projectId}/reports/{reportId}/shares":{"post":{"summary":"Send a report to teammates","tags":["analytics"],"description":"Sends the report to between 1 and 20 members of the company, with an optional note of up to 1000 characters, by email and push. link is the console address the message opens, and must open this report; language is the sender's console language, which the email and push are written in.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"description":"The saved report","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"recipients":{"type":"array","items":{"type":"string"}},"note":{"type":["string","null"]},"link":{"type":"string"},"language":{"type":"string"}},"required":["recipients","link","language"]}}}},"responses":{"201":{"description":"How many teammates it was sent to","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"integer","format":"uint64","minimum":0}},"required":["sent"]}}}},"400":{"description":"The request does not describe a share"},"403":{"description":"The caller may not do this"},"404":{"description":"The project or report is not there"}}}},"/v1/shared-reports/{token}":{"get":{"summary":"Read a shared report","tags":["analytics"],"description":"The report behind a public link, as it was last run. Needs no credential. Answers 404 alike for a link that was turned off, has stopped or never existed, and 429 past 60 reads a minute of one link or 30 from one address.","parameters":[{"name":"token","in":"path","required":true,"description":"The link's token, from its address","schema":{"type":"string"}}],"responses":{"200":{"description":"The report as last run","content":{"application/json":{"schema":{"type":"object","properties":{"report":true},"required":["report"]}}}},"404":{"description":"The link no longer works"},"429":{"description":"Too many reads of this link or from this address"}}}},"/v1/projects/{projectId}/reports/{reportId}/comment-threads":{"get":{"summary":"List a report's comment threads","tags":["analytics"],"description":"Every thread on the report, earliest first, each with its comments in order. A deleted comment keeps its place with no words, mentions or reactions.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"description":"The saved report","schema":{"type":"string"}}],"responses":{"200":{"description":"The threads","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"$ref":"#/components/schemas/ThreadBody"}}},"required":["threads"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}},"post":{"summary":"Start a comment thread","tags":["analytics"],"description":"Starts a thread on the whole report, or on one point of it when anchor names the point. The body is 1 to 10,000 characters; mentions name up to 20 members of the company.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"description":"The saved report","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"body":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorRequest"},{"type":"null"}]},"mentions":{"type":["array","null"],"items":{"type":"string"}}},"required":["body"]}}}},"responses":{"201":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}}},"/v1/projects/{projectId}/comment-threads/{threadId}/comments":{"post":{"summary":"Reply to a comment thread","tags":["analytics"],"description":"Adds a comment to the thread. A thread whose first comment was deleted takes no replies.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"description":"The comment thread","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"body":{"type":"string"},"mentions":{"type":["array","null"],"items":{"type":"string"}}},"required":["body"]}}}},"responses":{"201":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}}},"/v1/projects/{projectId}/comments/{commentId}":{"patch":{"summary":"Change a comment","tags":["analytics"],"description":"Replaces the comment's words and mentions. Open to its author only.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"description":"The comment","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"body":{"type":"string"},"mentions":{"type":["array","null"],"items":{"type":"string"}}},"required":["body"]}}}},"responses":{"200":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}},"delete":{"summary":"Delete a comment","tags":["analytics"],"description":"Takes the comment's words back; the thread keeps its place for it. Open to its author only.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"description":"The comment","schema":{"type":"string"}}],"responses":{"200":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}}},"/v1/projects/{projectId}/comment-threads/{threadId}/resolution":{"put":{"summary":"Resolve a comment thread","tags":["analytics"],"description":"Marks the thread resolved by the caller. Resolving a resolved thread changes nothing.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"description":"The comment thread","schema":{"type":"string"}}],"responses":{"200":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}},"delete":{"summary":"Reopen a comment thread","tags":["analytics"],"description":"Opens a resolved thread again.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"description":"The comment thread","schema":{"type":"string"}}],"responses":{"200":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}}},"/v1/projects/{projectId}/comments/{commentId}/reactions/{emoji}":{"put":{"summary":"React to a comment","tags":["analytics"],"description":"Adds the caller's reaction. Each person reacts with each emoji once.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"description":"The comment","schema":{"type":"string"}},{"name":"emoji","in":"path","required":true,"description":"One of the six reactions, percent-encoded: 👍 ❤️ 🎯 🎉 🤔 👀","schema":{"type":"string"}}],"responses":{"200":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}},"delete":{"summary":"Take back a reaction","tags":["analytics"],"description":"Removes the caller's reaction.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project the report belongs to","schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"description":"The comment","schema":{"type":"string"}},{"name":"emoji","in":"path","required":true,"description":"One of the six reactions, percent-encoded: 👍 ❤️ 🎯 🎉 🤔 👀","schema":{"type":"string"}}],"responses":{"200":{"description":"The thread as it now stands","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]}}}},"400":{"description":"The request does not describe a comment"},"403":{"description":"The caller may not do this"},"404":{"description":"The project, report, thread or comment is not there"}}}},"/v1/projects/{projectId}/messenger/help-centre":{"get":{"summary":"Read the help centre","tags":["messenger"],"description":"The company's Clepit help site as the messenger reads it (its address, how many articles and in which languages, when they were last read and why the last read failed) and whether this project's visitors can search its articles.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project whose messenger this is","schema":{"type":"string"}}],"responses":{"200":{"description":"The help centre and the project's article search","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"anyOf":[{"$ref":"#/components/schemas/HelpCentreSiteBody"},{"type":"null"}]},"search":{"$ref":"#/components/schemas/ArticleSearchBody"}},"required":["search"]}}}},"403":{"description":"The caller may not do this"},"404":{"description":"The project is not there"}}}},"/v1/projects/{projectId}/messenger/help-centre/refresh":{"post":{"summary":"Look the help site up again","tags":["messenger"],"description":"Asks Clepit which site belongs to the company and stores, moves or clears it, then answers as the read does. Use it after setting the help site up in Clepit.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project whose messenger this is","schema":{"type":"string"}}],"responses":{"200":{"description":"The help centre after the lookup","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"anyOf":[{"$ref":"#/components/schemas/HelpCentreSiteBody"},{"type":"null"}]},"search":{"$ref":"#/components/schemas/ArticleSearchBody"}},"required":["search"]}}}},"403":{"description":"The caller may not do this"},"404":{"description":"The project is not there"}}}},"/v1/projects/{projectId}/messenger/article-search":{"put":{"summary":"Set article search","tags":["messenger"],"description":"Lets visitors search the help centre's articles in the messenger, and where they find them: tab, first_view or while_typing. Turning it on needs a plan with article search, and answers 402 otherwise.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project whose messenger this is","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"on":{"type":"boolean"},"placement":{"$ref":"#/components/schemas/PlacementBody"}},"required":["on","placement"]}}}},"responses":{"200":{"description":"The article search as stored","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"on":{"type":"boolean"},"placement":{"$ref":"#/components/schemas/PlacementBody"}},"required":["on","placement"]}}}},"403":{"description":"The caller may not do this"},"404":{"description":"The project is not there"}}}},"/v1/projects/{projectId}/messenger/translations":{"post":{"summary":"Translate messenger texts","tags":["messenger"],"description":"Translates the messenger's texts from one language (from, a BCP 47 tag) into another (to) with AI, one translation per text in order. A text may hold the inline markup a starter prompt carries, which comes back as it went. Up to 4000 bytes a text and 20,000 in all. Nothing is stored: write the result with the messenger's settings. Answers 402 with AI_DISABLED or AI_LIMIT_REACHED when the AI add-on is off or at a limit.","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"The project whose messenger this is","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"},"texts":{"type":"array","items":{"type":"string"}}},"required":["from","to","texts"]}}}},"responses":{"200":{"description":"One translation per text, in order","content":{"application/json":{"schema":{"type":"object","properties":{"texts":{"type":"array","items":{"type":"string"}}},"required":["texts"]}}}},"400":{"description":"The texts cannot be translated as sent"},"402":{"description":"The AI add-on is off or at a limit"},"403":{"description":"The caller may not do this"},"404":{"description":"The project is not there"},"502":{"description":"The AI provider failed or its reply could not be used"}}}}},"components":{"schemas":{"PublicPlan":{"type":"object","properties":{"tier":{"type":"string"},"cycle":{"type":"string"},"trialDays":{"type":"integer","format":"int32"},"priced":{"type":"boolean"},"entitlements":true},"required":["tier","cycle","trialDays","priced","entitlements"]},"PublicAiModel":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"perMillion":{"$ref":"#/components/schemas/PublicAiPrices"}},"required":["id","displayName","perMillion"]},"PublicAiPrices":{"type":"object","properties":{"input":{"type":"integer","format":"int64"},"output":{"type":"integer","format":"int64"},"cacheWrite5m":{"type":"integer","format":"int64"},"cacheWrite1h":{"type":"integer","format":"int64"},"cacheRead":{"type":"integer","format":"int64"}},"required":["input","output","cacheWrite5m","cacheWrite1h","cacheRead"]},"AnnotationBody":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":["string","null"]},"startsOn":{"type":"string"},"endsOn":{"type":"string"},"text":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"canChange":{"type":"boolean"}},"required":["id","startsOn","endsOn","text","tags","createdAt","updatedAt","canChange"]},"ThreadBody":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/AnchorBody"},{"type":"null"}]},"resolved":{"type":"boolean"},"resolvedAt":{"type":["string","null"]},"resolvedBySub":{"type":["string","null"]},"createdBySub":{"type":"string"},"createdAt":{"type":"string"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/CommentBody"}}},"required":["id","reportId","resolved","createdBySub","createdAt","comments"]},"AnchorBody":{"type":"object","properties":{"metric":{"type":["string","null"]},"bucket":{"type":["string","null"]},"breakdown":{"type":["array","null"],"items":{"type":"string"}},"step":{"type":["integer","null"],"format":"uint32","minimum":0},"event":{"type":["string","null"]},"cohortBucket":{"type":["string","null"]},"period":{"type":["integer","null"],"format":"uint32","minimum":0},"daysActive":{"type":["integer","null"],"format":"uint32","minimum":0},"state":{"type":["string","null"]}}},"CommentBody":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"body":{"type":["string","null"]},"mentions":{"type":"array","items":{"type":"string"}},"authorSub":{"type":"string"},"authorName":{"type":["string","null"]},"createdAt":{"type":"string"},"editedAt":{"type":["string","null"]},"deleted":{"type":"boolean"},"canChange":{"type":"boolean"},"reactions":{"type":"array","items":{"$ref":"#/components/schemas/ReactionBody"}}},"required":["id","threadId","mentions","authorSub","createdAt","deleted","canChange","reactions"]},"ReactionBody":{"type":"object","properties":{"emoji":{"type":"string"},"count":{"type":"integer","format":"int64"},"reactedByMe":{"type":"boolean"}},"required":["emoji","count","reactedByMe"]},"AnchorRequest":{"type":"object","additionalProperties":false,"properties":{"metric":{"type":["string","null"]},"bucket":{"type":["string","null"]},"breakdown":{"type":["array","null"],"items":{"type":"string"}},"step":{"type":["integer","null"],"format":"uint32","minimum":0},"event":{"type":["string","null"]},"cohortBucket":{"type":["string","null"]},"period":{"type":["integer","null"],"format":"uint32","minimum":0},"daysActive":{"type":["integer","null"],"format":"uint32","minimum":0},"state":{"type":["string","null"]}}},"HelpCentreSiteBody":{"type":"object","properties":{"url":{"type":"string"},"articles":{"type":"integer","format":"int64"},"languages":{"type":"array","items":{"type":"string"}},"lastReadAt":{"type":["string","null"]},"readError":{"type":["string","null"]},"capped":{"type":"boolean"}},"required":["url","articles","languages","capped"]},"ArticleSearchBody":{"type":"object","additionalProperties":false,"properties":{"on":{"type":"boolean"},"placement":{"$ref":"#/components/schemas/PlacementBody"}},"required":["on","placement"]},"PlacementBody":{"type":"string","enum":["tab","first_view","while_typing"]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"An end-user access token."}}}}