instanceId to the /journey/state/delete endpoint. You can delete only finished journeys, which are journeys that completed or failed. The API rejects a request to delete a journey that’s still in progress.
Use this endpoint when you need to remove a journey session before your normal data-retention period ends. Deletion is permanent, and you can’t undo it.
Before you begin
Make sure you have:- Access token: Your organisation’s customer access token, obtained in Step 1: Authenticate. Use the same token as for your other v2 calls. An end-user session token doesn’t work.
- Delete access: Your API credentials need the
DELETE:journeypermission. If you get a403error, then ask your GBG account manager to enable it. - Instance ID: The
instanceIdreturned by/journey/startwhen the journey started.
Choose the base URL for your region
Call the API in the region where the journey ran. A request for a journey that belongs to another organisation, or that isn’t available in the region you call, returns404.
The examples on this page use the Europe base URL. If your journeys run in another region, then replace
eu with us or au.
Step 1: Check that the journey has finished
This step is optional. If you’re not sure whether the journey has finished, then fetch its state first.cURL
400 error. Wait for the journey to finish, then delete it.
Step 2: Delete the journey session
Send aPOST request to /journey/state/delete with the instanceId in a JSON body. The endpoint uses the POST method, not the HTTP DELETE method.
cURL
Request headers
Request body fields
Handle the response
A200 response means that GBG Go processed the deletion. In rare cases, some of the journey’s stored data can remain until the normal retention cleanup runs. Don’t treat a 200 as proof of erasure.
Success response
JSON
Error responses
Each error returns an HTTP status and a GBG error code.
Every error uses the standard GBG error body:
JSON
errors array contains at least one error object, with these fields:
What gets deleted
The delete request removes the journey’s stored state from the GBG Go journey service. The request deletes:- The journey’s workflow and execution state.
- The data collected and produced during the journey that the journey service holds. This includes submitted inputs and module results.
/journey/state/fetch or /journey/state/delete request for the same instanceId returns 404.
The request doesn’t delete:
- Journey session records, documents, and images in the Investigation portal.
- Journey events that GBG Go already delivered to your organisation, such as webhooks or exports.
- Any copy that you stored in your own systems.
FAQ
Does deleting a journey session delete all customer data?
Does deleting a journey session delete all customer data?
No. It deletes the journey’s data from the GBG Go API service only. To delete the journey session record, documents, and biometrics, use Delete journey session in the Investigation portal.
Can I delete a journey that's still running?
Can I delete a journey that's still running?
No. Wait for the journey to finish, then delete it. You can’t stop a running journey with
POST /journey/terminate, because it accepts only journeys that completed or failed.Can I undo a deletion?
Can I undo a deletion?
No. Deletion is permanent.
Is it safe to retry a delete request?
Is it safe to retry a delete request?
Yes, for
500 and 503 errors. If a retry returns 404, then the earlier request most likely succeeded.Can I delete several journeys in one request?
Can I delete several journeys in one request?
No. Send one request for each
instanceId.Why do I get a 404 error for a journey that I know exists?
Why do I get a 404 error for a journey that I know exists?
Check that you’re calling the region where the journey ran. Also check that you’re using your own organisation’s credentials.
Who do I contact for help?
Who do I contact for help?
Contact your GBG account manager or GBG support. Include the
instanceId, the region, and the time of the request in UTC.