Sets a manual visitor-language override for one conversation. Send `null` to return to the widget/browser language fallback. Automatic detection never overwrites a manual override.
/api/conversations/{id}/languageOrganization API key supplied as Authorization: Bearer convor_sk_....
In: header
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
{
"language": "string",
"confidence": 0,
"source": "manual"
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}curl --request PATCH \
'https://api.convor.io/api/conversations/00000000-0000-4000-8000-000000000000/language' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer convor_sk_...' \
--header 'Content-Type: application/json' \
--data '{
"language": "example"
}'const response = await fetch("https://api.convor.io/api/conversations/00000000-0000-4000-8000-000000000000/language", {
method: "PATCH",
headers: {
"Accept": "application/json",
"Authorization": "Bearer convor_sk_...",
"Content-Type": "application/json"
},
body: JSON.stringify({
"language": "example"
}),
});
const contentType = response.headers.get("content-type") ?? "";
const data = response.status === 204
? null
: contentType.includes("json")
? await response.json()
: contentType.startsWith("text/")
? await response.text()
: await response.blob();
if (!response.ok) {
const message = typeof data === "object" && data !== null
&& "error" in data && typeof data.error === "object"
&& data.error !== null && "message" in data.error
? String(data.error.message)
: "Convor API request failed (" + response.status + ")";
throw new Error(message);
}
console.log(data);Was this page helpful?
Merge two conversations
Merges two conversations from the same visitor into a single thread. Messages from the newer secondary conversation are moved into the older primary conversation, and the secondary conversation is closed. Use this when duplicate conversations were created for the same visitor. Both conversation IDs must belong to the current organization and cannot point to the same conversation.
Poll the status of an async conversation PDF export (#68)
Checks the state of a PDF export job that was created by `GET /api/conversations/{id}/export?format=pdf`. While the job is still running, the endpoint returns `202` with the current state. When the job completes, it returns the generated PDF file. If the job fails, it returns a `500` response with the error message. Unknown job IDs return not found.