REST API
Build anything on top of Janore.
Slack bot. Mobile app. Custom CRM. Voice IVR. Discord bot. n8n flow. If it can speak HTTP, it can speak Janore.
1. Generate an API key
Open Dashboard โ Channels โ REST API and click Generate new API key. You'll see the full key once โ copy it now and store it in your secret manager. It looks like:
sk_live_a1b2c3d4e5f6...
Treat it as a password. Server-side only โ never expose it in client code.
2. Send your first message
curl -X POST https://janore.com/api/v1/chat \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"session_id": "user-123",
"message": "Bonjour, comment รงa marche ?",
"language": "fr"
}'session_id is any stable string per user (a uuid, a phone number, an internal user id). Janore groups messages with the same session into one conversation. language is optional โ if omitted, Janore auto-detects.
3. Response shape
{
"reply": "Bonjour ! โฆ",
"suggestedActions": [
{ "label": "Voir les tarifs", "type": "link", "payload": "/pricing" }
],
"conversationId": "uuid",
"messageId": "uuid"
}suggestedActions are optional CTAs Janore recommends โ render them as buttons in your UI if you want. conversationId stays stable across the session; use it to fetch history later.
SDK examples
Node.js
const res = await fetch('https://janore.com/api/v1/chat', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.JANORE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
session_id: 'user-123',
message: 'Hello',
language: 'en',
}),
});
const data = await res.json();
console.log(data.reply);Python
import os, requests
r = requests.post(
"https://janore.com/api/v1/chat",
headers={"Authorization": f"Bearer {os.environ['JANORE_API_KEY']}"},
json={"session_id": "user-123", "message": "Hello", "language": "en"},
)
print(r.json()["reply"])PHP
<?php
$ch = curl_init('https://janore.com/api/v1/chat');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('JANORE_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'session_id' => 'user-123',
'message' => 'Hello',
'language' => 'en',
]),
]);
$res = json_decode(curl_exec($ch), true);
echo $res['reply'];Ruby
require 'net/http'
require 'json'
uri = URI('https://janore.com/api/v1/chat')
req = Net::HTTP::Post.new(uri, {
'Authorization' => "Bearer #{ENV['JANORE_API_KEY']}",
'Content-Type' => 'application/json',
})
req.body = { session_id: 'user-123', message: 'Hello', language: 'en' }.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts JSON.parse(res.body)['reply']Go
body, _ := json.Marshal(map[string]string{
"session_id": "user-123",
"message": "Hello",
"language": "en",
})
req, _ := http.NewRequest("POST", "https://janore.com/api/v1/chat", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("JANORE_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()Rate limits
60 requests/minute per API key by default. Need more? See pricing โ higher tiers raise the limit. We add X-RateLimit-Remaining headers so you can back off gracefully.
Errors
401 Unauthorizedโ missing or invalid API key. Check theAuthorizationheader.429 Too Many Requestsโ you've hit the rate limit. Wait forRetry-Afterseconds.500 Internal Server Errorโ something broke on our side. Retries are safe; we de-duplicate onsession_id + message.