For accepted agents and affiliates, free of charge up to a daily limit.
The AI Consulate answers questions about visa refusals and what to send with an application. It answers only from official sources it has checked, it says “I do not know.” when they do not cover a question, and it asks for details first when it needs them.
You can show it to your clients and visitors on your own website or in your own app. Its “Check my application” link carries your code, so a check bought through it counts as yours.
Sign in to your partner dashboard and open AI Consulate. There are two kinds of key:
apv_pk_. It is safe to put in a web page, because it works only on the website addresses you list for it.apv_sk_. Keep it on your own server. Never put it in a web page or inside an app, where anyone can read it. Your app asks your server, and your server asks us.The whole key is shown only once, when you create it. If a key is exposed, turn it off in the dashboard and create a new one.
Paste this just before </body> on each page that should show the chat:
<script src="https://approvable.app/embed/consulate.js"
data-key="apv_pk_..." data-accent="#075E5B" async></script>A button appears in the corner of the page and opens the chat. The optional settings are data-accent (your colour), data-position="left" and data-label (the button's words). The chat opens only on the addresses listed for the key.
Send the conversation so far, with the newest question last. The AI Consulate keeps nothing, so you send the earlier turns each time (the last 16 are read).
POST https://approvable.app/api/v1/consulate/messages
Authorization: Bearer apv_sk_...
Content-Type: application/json
{
"messages": [
{ "role": "user", "text": "My UK visit visa was refused. Why?" },
{ "role": "consulate", "text": "Which country's passport do you hold?", "kind": "clarify" },
{ "role": "user", "text": "Nigerian. They said I did not show enough money." }
]
}The response looks like this:
{
"reply": {
"kind": "answer", // "answer", "clarify" (it asks questions back) or "unknown"
"message": "...",
"questions": [], // filled when kind is "clarify"
"citations": [ { "label": "...", "url": "https://...", "publisher": "..." } ],
"grounds": [ { "id": "...", "title": "...", "jurisdiction": "uk" } ],
"unavailable": false
},
"poweredBy": "AI Consulate by Approvable",
"notAdvice": "This is general help, not legal advice. For advice about your own case, talk to a lawyer or a licensed immigration adviser.",
"checkUrl": "https://approvable.app/r/AFF-...",
"remainingToday": 271
}Errors come back as {"error": "..."} with these codes:
400: the request could not be read, the question was too long, or it held a passport, card or reference number or an email.401: the key is missing, unknown or turned off.403: a secret key was used from a browser, or an embed key from a website not listed for it.429: too many questions were sent in a minute, or the daily limit has been reached. Wait and try again.503: the AI Consulate cannot be reached at the moment. Try again shortly.Display the reply's message, any questions and the notAdvice line, together with “AI Consulate by Approvable”.
These rules are part of the partner terms. Please send any questions to desk@approvable.app.