Enquiries
Retrieve enquiry history and create enquiries
Returns a paginated list of enquiries submitted by the authenticated customer.
Endpoint
GET /enquiriesAuthentication
Requires a valid JWT access token.
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Number of enquiries to return (1 to 100) |
cursor | string | - | Enquiry ID to paginate from |
status | string | - | Filter by the organization's enquiry status value |
Common status values
Organizations can configure their enquiry workflow statuses. Common values include:
| Status | Description |
|---|---|
new | Enquiry has been submitted and not yet reviewed |
open | Enquiry is being looked at |
pending | Waiting for additional information or action |
resolved | Enquiry has been resolved |
closed | Enquiry is closed |
Example request
curl -X GET "https://edge.tiquo.app/api/client/v1/enquiries?status=open&limit=10" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."Response
{
"success": true,
"data": {
"enquiries": [
{
"id": "enq_123",
"enquiryNumber": "ENQ-001234",
"type": "general",
"subject": "Question about services",
"message": "I have a question about your consultation packages.",
"category": "Sales",
"status": "resolved",
"priority": "medium",
"source": "website",
"responseCount": 2,
"createdAt": "2025-01-30T12:00:00Z",
"updatedAt": "2025-01-30T14:00:00Z",
"customerRole": "primary"
}
],
"hasMore": false
}
}Enquiry object
| Field | Type | Description |
|---|---|---|
id | string | Enquiry document ID |
enquiryNumber | string | Human-readable enquiry number (e.g. ENQ-001234) |
type | string | Enquiry type ID (e.g. general, private_events), as copied with Copy enquiry type ID in Settings > Enquiries |
subject | string | Subject line |
message | string | The enquiry message content |
category | string | Enquiry category (e.g. Sales, Support) |
status | string | Enquiry status (see values above) |
priority | string | One of: low, medium, high, urgent |
source | string | Where the enquiry came from (e.g. website, email) |
responseCount | integer | Number of responses to this enquiry |
createdAt | string | ISO 8601 timestamp when the enquiry was created |
updatedAt | string | ISO 8601 timestamp of the last update |
firstResponseAt | string or omitted | ISO 8601 timestamp of the first response |
resolvedAt | string or omitted | ISO 8601 timestamp when the enquiry was resolved |
customerRole | string | The customer's role (e.g. primary) |
Pagination
When hasMore is true, pass the response's nextCursor as the cursor parameter to fetch the next page.
Create an enquiry
POST /enquiriesAuthenticated customers can create an enquiry with their bearer token. An unauthenticated website integration can instead send its public integration key in the publicKey field or X-Public-Key header. Unauthenticated requests must come from a browser with an Origin header that matches one of the integration's website domains.
The request body contains customer and enquiry objects. customer.email is required, and the enquiry must include at least one of message or subject. customer also accepts firstName, lastName, phone, and phoneCountry (a two-letter ISO country code for a national-format phone, so the right calling code is added). Names can't contain < or >.
To route the enquiry to a specific enquiry type, set enquiry.type to that type's ID. In Settings > Enquiries, open the ⋯ menu on the type and choose Copy enquiry type ID. Without type, the enquiry goes to the General type (general). The ID stays the same when the type is renamed.
curl -X POST "https://edge.tiquo.app/api/client/v1/enquiries" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..." \
-H "Content-Type: application/json" \
-d '{
"customer": {
"firstName": "John",
"lastName": "Smith",
"email": "john@example.com",
"phone": "+441234567890"
},
"enquiry": {
"type": "YOUR_ENQUIRY_TYPE_ID",
"subject": "Question about services",
"message": "Please send me more information.",
"priority": "medium",
"source": "website"
}
}'A successful request returns 201 Created. The canonical result is in data, and enquiry and customer are also repeated at the top level for SDK compatibility.
{
"success": true,
"data": {
"enquiry": {
"id": "enq_123",
"enquiryNumber": "ENQ-001234",
"status": "new",
"priority": "medium",
"source": "website"
},
"customer": {
"id": "cust_456",
"customerNumber": "CUST-000001",
"email": "john@example.com"
}
},
"enquiry": { "id": "enq_123", "enquiryNumber": "ENQ-001234" },
"customer": { "id": "cust_456", "customerNumber": "CUST-000001" }
}For unauthenticated submissions, the returned customer contains only stable identifiers and the contact values submitted in this request; it does not expose an existing matched customer's stored profile or financial data.
Spam screening and rate limits
Submissions from anyone other than a signed-in customer with a linked profile are screened for spam, the same way as Tiquo's published forms:
- Refused: a reserved test phone number (such as UK drama numbers or North American 555-01XX numbers), or HTML or script in a name, subject, message, or enquiry answer. The request fails with
400and the error "This enquiry could not be submitted." Nothing is saved. - Quarantined: a disposable or throwaway email address. The request still returns
201 Createdwith the new enquiry'sidandenquiryNumber, butcustomer.idandcustomer.customerNumberare empty strings. No customer is created or updated, and no notification, automation, orenquiry.createdwebhook runs. Staff can review it from the Spam button on the Enquiries page. The customer and notifications are only created if they mark it Not spam.
Treat an empty customer.id as a normal success in your interface. Don't tell the visitor their enquiry was flagged.
Submissions are rate limited over a rolling 10-minute window:
| Submission | Limit |
|---|---|
| Public-key submissions, per organisation | 60 |
| Public-key submissions, per email address | 5 |
| Public-key submissions, per phone number | 5 |
| Token submissions, per signed-in user | 10 |
Over the limit, the API returns 429 with the error "Too many requests. Please wait and try again."
Enquiry parameters
Use enquiry.enquiryParameterValues to submit the enquiry parameters configured
under Settings > Enquiries for the selected enquiry type:
{
"customer": { "email": "customer@example.com" },
"enquiry": {
"type": "YOUR_ENQUIRY_TYPE_ID",
"subject": "Private event",
"enquiryParameterValues": [
{ "enquiryParameterId": "ENQUIRY_TEXT_PARAMETER_ID", "value": "40 guests" },
{ "enquiryParameterId": "ENQUIRY_BOOLEAN_PARAMETER_ID", "value": false },
{ "enquiryParameterId": "ENQUIRY_MULTISELECT_PARAMETER_ID", "value": ["Art", "Music"] }
]
}
}Replace the placeholders with the enquiry type ID and its enquiry parameter
IDs. In Settings > Enquiries, edit the enquiry type, then choose Copy
enquiry parameter ID in each parameter's ⋯ menu. Values must match the parameter type and configured options.
Text, dropdown, dates (YYYY-MM-DD), and datetimes (ISO datetime) accept strings;
Yes/No fields accept booleans; multiselects accept string arrays (or a JSON array
string). A maximum of 100 distinct entries and 10,000 serialized characters per
value is allowed. Empty values are skipped rather than rejected, including an
empty string for a dropdown, date, or datetime and an empty multiselect array, so
optional parameters can be left blank. false is preserved.
The server resolves IDs only against enquiry parameter schemas in the same
organisation and selected type. Unknown, deleted, duplicate, foreign-type,
foreign-organisation, or customer parameter IDs produce 400 and the entire
submission is rolled back. Values are stored on the newly created enquiry.
Use enquiryParameterValues and enquiryParameterId; the earlier
parameterValues/parameterId request names are rejected.
Fill missing customer parameters
- Customer parameters can be initialized through
customer.customerParameterValuesonly when no stored value exists and the parameter is customer editable. - Existing rows are never overwritten, even when the stored value is empty, false, or a system default. This applies to guests and authenticated enquiry submissions.
customer.detailsremains supported as a legacy object keyed by customer parameter ID, name, or normalized key.- Explicit array entries are processed first; the first non-empty value for a missing schema wins.
- Null, empty text, and empty arrays are ignored. Invalid or non-editable parameters reject the whole submission.
Marketing/SMS Opt-In defaults count as existing values, so this route cannot change their seeded false values. Use an authenticated profile form or the server-side Admin API to change existing preferences. Customer parameter values are saved on the profile, not included in the enquiry.created event payload.
// POST /api/client/v1/enquiries uses this same payload.
await tiquo.createEnquiry({
customer: {
email: 'guest@example.com',
customerParameterValues: [
{ customerParameterId: 'YOUR_CUSTOMER_PARAMETER_ID', value: 'Example Ltd' },
],
// Legacy alternative: details: { YOUR_CUSTOMER_PARAMETER_ID: 'Example Ltd' }
},
enquiry: { type: 'YOUR_ENQUIRY_TYPE_ID', subject: 'Waitlist' },
});Use a customer parameter schema ID for customerParameterId, not an enquiry parameter ID. Values accept strings, finite numbers, booleans, null, or string arrays (for multiselects). At most 100 entries across both fields and 10,000 serialized characters per value are accepted. Enquiry answers remain separate under enquiry.enquiryParameterValues with enquiryParameterId.
Enquiry-created event
enquiry.created carries normalized submitted values at
enquiryParameters.<enquiryParameterId>. Boolean values are "true"/"false"
strings; multiselect values are JSON strings. Empty values are omitted. This is
a submission snapshot, not customer preferences, and no customerParameters
object is included. The creation response and enquiry-history response do not
currently include an enquiry-parameter collection.
Errors
| Status | Description |
|---|---|
400 | Missing or invalid fields, invalid enquiry or customer parameters, a name containing < or >, or a submission refused as spam |
401 | Invalid or expired access token |
403 | The Origin header is missing or invalid, or the origin is not allowed for an unauthenticated submission |
429 | Too many submissions; wait and try again |
500 | Internal server error |
Code examples
JavaScript
async function getEnquiries(accessToken, options = {}) {
const params = new URLSearchParams();
if (options.limit) params.set('limit', options.limit);
if (options.cursor) params.set('cursor', options.cursor);
if (options.status) params.set('status', options.status);
const response = await fetch(
`https://edge.tiquo.app/api/client/v1/enquiries?${params}`,
{
headers: { 'Authorization': `Bearer ${accessToken}` },
}
);
return response.json();
}
const result = await getEnquiries(token, { status: 'open' });
console.log(`You have ${result.data.enquiries.length} open enquiries`);