Suggested Prompts API¶
Manage tenant-specific suggested prompts for partner integrations.
Base URL and auth¶
- Base URL:
https://integrations.app.traveln.ai - Authentication:
Authorization: Api-Key <sso_hmac_secret> - Usage model: server-to-server only
Supported languages¶
enar
Endpoints¶
List prompts¶
GET /api/v1/suggested-prompts/
Optional query params:
| Parameter | Type | Required | Description |
|---|---|---|---|
language | string | No | Filter by en or ar |
Create prompt¶
POST /api/v1/suggested-prompts/
Update prompt¶
PATCH /api/v1/suggested-prompts/<uuid>/
Delete prompt¶
DELETE /api/v1/suggested-prompts/<uuid>/
Request body fields¶
POST and PATCH accept these fields:
| Field | Type | Required | Description |
|---|---|---|---|
language | string | Yes on create | en or ar |
text | string | Yes on create | Prompt text |
sort_order | integer | No | Lower numbers appear first |
is_active | boolean | No | Enables or disables the prompt |
Example requests¶
curl "https://integrations.app.traveln.ai/api/v1/suggested-prompts/" \
-X POST \
-H "Authorization: Api-Key <sso_hmac_secret>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"language": "en",
"text": "Plan a wellness retreat in Cairo",
"sort_order": 1,
"is_active": true
}'
const res = await fetch("https://integrations.app.traveln.ai/api/v1/suggested-prompts/", {
method: "POST",
headers: {
Authorization: "Api-Key <sso_hmac_secret>",
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
language: "en",
text: "Plan a wellness retreat in Cairo",
sort_order: 1,
is_active: true,
}),
})
const payload = await res.json()
console.log(payload)
import requests
res = requests.post(
"https://integrations.app.traveln.ai/api/v1/suggested-prompts/",
headers={
"Authorization": "Api-Key <sso_hmac_secret>",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"language": "en",
"text": "Plan a wellness retreat in Cairo",
"sort_order": 1,
"is_active": True,
},
timeout=30,
)
payload = res.json()
print(payload)
Example response¶
{
"success": true,
"message": "Suggested prompt created.",
"data": {
"prompt": {
"id": "7a2df6b8-ef98-4f6c-8e35-63aa7ec9f0f4",
"language": "en",
"text": "Plan a wellness retreat in Cairo",
"name": "Plan a wellness retreat in Cairo",
"sort_order": 1,
"is_active": true,
"created_at": "2026-04-02T11:30:00+00:00",
"updated_at": "2026-04-02T11:30:00+00:00",
"source": "tenant"
}
},
"error": null
}
Runtime behavior¶
- If the tenant has active prompts for the requested language, the widget and partner chatbot use them.
- If the tenant has no active prompts for the requested language, Traveln falls back to the default prompt set for that same language.
- Arabic does not fall back to English tenant prompts, and English does not fall back to Arabic tenant prompts.