inquiry.create
Send the business an inquiry on behalf of a person, once they confirm it by e-mail.
Prepares an inquiry for the business and sends the person a confirmation e-mail. The business receives the inquiry only after the person confirms it from that mailbox, which proves the e-mail is theirs. You get an action back; tell the person to confirm in their e-mail, and follow the action with action.get.
When to use it
When the person wants a quote, a callback or an answer from the business that the site's information does not give. Ask for their e-mail first; it is required.
Available to agents with an API key. It does not act for a particular person. A person always confirms it before it runs.
Request
Send the capability name and its input to the site's invoke endpoint.
curl https://api.kivex.chat/v1/sites/$SITE/invoke \
-H "Authorization: Bearer $KIVEX_KEY" \
-H "Content-Type: application/json" \
-d '{"capability":"inquiry.create","input":{"contact":{"email":"[email protected]","name":"Jana Nováková"},"message":"Chtěla bych nacenit schodiště do rodinného domu.","language":"cs"}}'Prop
Type
Response
The answer is an envelope: data in the shape below, and evidence with the source and time of every value that has an evidenceRef.
Prop
Type
Good to know
- You cannot confirm for the person. Opening the link does nothing by itself; they confirm with the button on the page.
- The person has 24 hours to confirm; then the action is
expiredand nothing is sent. - Send an
idempotencyKey: retrying the same request then never sends a second e-mail. - Only verified agents may call it. A person can be sent at most a few confirmation e-mails a day, whoever asks.
Errors
This capability can answer with BAD_REQUEST, NOT_SUPPORTED, NOT_ALLOWED, RATE_LIMITED, SOURCE_UNAVAILABLE, NEEDS_CONFIRMATION.
Example: a quote request
{
"contact": {
"email": "[email protected]",
"name": "Jana Nováková"
},
"message": "Chtěla bych nacenit schodiště do rodinného domu.",
"language": "cs"
}