Request body
For POST, PUT, and PATCH tools, define a JSON body schema so the model knows which fields to send. Chatevo validates the payload against the schema when strict params are enabled.
When you need a body
Section titled “When you need a body”| Method | Body |
|---|---|
| GET, DELETE | Not used |
| POST | Usually required — creates or submits data |
| PUT, PATCH | Required or partial — updates existing resources |
Set Content-Type: application/json in headers unless your API specifies otherwise.
Schema structure
Section titled “Schema structure”Define properties with JSON Schema-style types:
| Field | Types | Notes |
|---|---|---|
| Property name | — | Match your API field names exactly |
| type | string, number, integer, boolean, object, array | |
| description | — | Helps the model fill correct values |
| required | array of names | Top-level required fields |
| enum | allowed values | For fixed choices (e.g. room type) |
Example — create booking
Section titled “Example — create booking”{ "type": "object", "required": ["offer_id", "guest_email"], "properties": { "offer_id": { "type": "string", "description": "Offer ID from search results" }, "guest_email": { "type": "string", "description": "Guest email for confirmation" }, "special_requests": { "type": "string", "description": "Optional notes for the hotel" } }}Nested objects and arrays
Section titled “Nested objects and arrays”Support nested structures when your API expects them — document shape in property descriptions. Keep schemas as small as possible; only expose fields the assistant should control.
Body vs query
Section titled “Body vs query”| Put in body | Put in query |
|---|---|
| PII, payloads, create/update objects | Filters on GET, simple flags |
| Large or structured data | Cache-friendly read params |
Testing
Section titled “Testing”Use Test a tool with sample JSON to confirm your API accepts the generated body before attaching the tool to a live assistant.