Execute journeys
Step 6: Fetch journey state
Fetching the journey state allows you to track the progress of a journey instance. It helps you determine whether the journey is still in progress, has completed, or requires further input from the customer.
When to fetch the journey state
You should check the journey:
- After starting a journey – to confirm it was created successfully
- After submitting task data – to see if the journey progressed or completed
- To monitor progress – during multi-step journeys with multiple tasks
- Before triggering next steps – some workflows depend on the journey being completed
- For troubleshooting – to identify if the journey has stalled
What you need before fetching
Make sure you have:
- Access token – Refer to Authenticate
- Instance ID – Returned from Start a journey
API request to fetch state
Send a POST
request to the /journey/state/fetch
endpoint. Your request should follow this format:
Replace "your-instance-id"
with the actual journey instance ID returned when
the journey was started.
If your request is successful, you receive a response in this format:
Refer to the Fetch journey state API reference for details on the request and response definitions.
What happens next?
Depending on the state:
State | What it means |
---|---|
IN_PROGRESS | The journey is still active. Retrieve remaining tasks. |
COMPLETED | The journey is done. No further action is needed. |
FAILED | The journey encountered an error. Review previous steps or retry. |
Best practices
- Periodically check the state for long-running journeys.
- Always handle
FAILED
states gracefully and retry if appropriate. - Use the
COMPLETED
state to trigger downstream business logic.
Next steps
- If the journey is complete, your integration is done.
- If you encountered an error, refer to the Handle errors guide for troubleshooting tips.