Skip to content

Create inquiries ​

A write-only API that connects your website's contact form directly to the Cherpa unified inbox. Authenticate by sending an API key in the Authorization: Bearer header; the space is determined from the key. Call it with a full (full access) or inquiry (submit inquiries) key.

It can only submit. There's no endpoint to list or read inquiries, so even if the key ends up in a browser bundle, nobody can read other customers' inquiries with it.

Authentication
bash
curl -X POST https://api.cherpa.me/v1/public/inquiries \
  -H "Authorization: Bearer chp_..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "Emma Collins", "email": "emma@example.com", "message": "I would like a quote" }'

Submit an inquiry ​

POST/v1/public/inquiries

Creates a new (new) inquiry on the website channel in the unified inbox. The message is also stored as the customer's first message, so it shows up right away in the timeline on the detail screen.

ParameterDescription
nameRequired. Name of the person inquiring
messageRequired. Inquiry message (up to 5,000 characters)
email phoneOne of the two is required. Phone numbers in any format are normalized to E.164 (+8210…)
companyCompany name. Linked to an existing company with the same name, or a new one is created
titleInquiry title. If empty, the first line of the message (60 characters) is used
source_typeInquiry type as your site categorizes it (e.g. quote, partnership). Free-form string
metadataMap of string values, such as utm_source — the unified inbox UTM filter reads utm_source

Automatic contact matching — If a contact with the same email or phone already exists, the inquiry is attached to that contact instead of creating a new one. Contact details that were empty are filled in with the new values; existing values are never overwritten.

Returns — The submitted inquiry's id, title, status and created_at, with status code 201.

StatusMeaning
400Neither email nor phone given, or a required value is missing
401API key missing or invalid
403Key with the content permission — it can't submit inquiries
429More than 10 requests in 10 minutes from the same IP

Calling from the browser

An API key in your bundle is effectively public. That's why this API only accepts submissions and rate-limits per calling IP. Issue browser keys with the inquiry permission — if one leaks, it can't do anything except submit inquiries. If you need tighter control, proxy the call through your server. Your site's origin also needs to be allow-listed for CORS by Cherpa.

Request
bash
curl -X POST https://api.cherpa.me/v1/public/inquiries \
  -H "Authorization: Bearer chp_..." \
  -H "Content-Type: application/json" \
  -H "Accept-Language: en" \
  -d '{
    "name": "Emma Collins",
    "company": "Luminous Studio",
    "email": "emma.collins@luminous.example",
    "phone": "+1 415 555 0132",
    "source_type": "quote",
    "message": "We'\''re moving offices and would like an interior quote.",
    "metadata": { "utm_source": "google", "utm_campaign": "office_fall", "page_url": "https://bridgeworks.example/contact" }
  }'
Response · 201
json
{
  "id": "0d6f3c2a-7b1e-4c8a-9f2d-1a2b3c4d5e6f",
  "title": "We're moving offices and would like an interior quote.",
  "status": "new",
  "created_at": "2026-10-05T04:27:24Z"
}
Response · 401
json
{ "code": 16, "message": "API key required (Authorization: Bearer chp_...)", "detail": "API key required (Authorization: Bearer chp_...)" }