Skip to main content
Use Collect when you already have a source’s phone number. Use instructions for what to ask, input for known context values, and output for the JSON Schema of the answers you need. Your application gets structured JSON after Thred collects the answers.

Information you can collect

Example: check inventory

Set your API key using the quickstart, then create a collection. Replace to with the number you want to call. The input object supplies the product and currency for these instructions:
Thred returns the collection’s ID immediately. Retrieve the collection to check its status. Once status is completed, data contains the answers in your requested shape. If the result is incomplete, check partial_data for the answers it collected.

Shape the answers

Output fields can be strings, numbers, integers, booleans, objects, or arrays. Fields can also allow null, as the price does above. Give fields clear descriptions and list the answers you need under required. The output is always an object, so omit its top-level type. Define properties, list required fields, and set additionalProperties to false. Nested objects still need type: "object", properties, and additionalProperties: false; arrays need an items schema. Thred supports a small JSON Schema subset. The API reference lists the supported fields.

Add context and routing

Start with the quickstart, then add these options as your workflow needs them.