Each task in a journey includes a schema that defines the structure of data you must submit. This schema specifies the expected fields, types, and validation rules for completing the task. To understand the schema for passing customer data, check the User data schema reference Use the Retrieve task schema (Documentation Index
Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
Use this file to discover all available pages before exploring further.
/journey/task/schema) endpoint to retrieve the schema for any task assigned to a journey instance.
When to retrieve a task schema
You should fetch a taskβs schema when:- Preparing to submit data for a task
- Dynamically generating input fields in your UI
- Confirming the required fields and their formats
- Validating data before submitting it
Prerequisites
Before sending the request, make sure you have:- Access token β Get this from the Authenticate step
- Task ID β Returned when you Retrieve tasks
- (Optional) Instance ID β Needed in some journey configurations
Retrieve task schema (API request)
Send aPOST request to the /journey/task/schema endpoint. Your request should be in this format:
cURL
instanceId in the request body as well:
JSON
JSON
How to use the schema
The schema defines:- The field names, for example, document.type
- The data types, for example, string, array, or object
- Which fields are required
- Any format restrictions, for example, base64 for file uploads
Best practices
- Always retrieve the latest schema before submitting data.
- If the schema changes, update your integration to match the new structure.
- Validate your input locally using the schema before calling the API.