Move a workflow to a stage
curl --request POST \
--url https://api.vegaminds.com/v1/workflows/{workflow_id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_stage_id": "5d1c402b-8766-48dc-a2b7-b73fedb57758",
"stage_id": "9c6f7d62-f7ce-46ce-9d4a-62ab3764d05e"
}
'import requests
url = "https://api.vegaminds.com/v1/workflows/{workflow_id}/move"
payload = {
"from_stage_id": "5d1c402b-8766-48dc-a2b7-b73fedb57758",
"stage_id": "9c6f7d62-f7ce-46ce-9d4a-62ab3764d05e"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from_stage_id: '5d1c402b-8766-48dc-a2b7-b73fedb57758',
stage_id: '9c6f7d62-f7ce-46ce-9d4a-62ab3764d05e'
})
};
fetch('https://api.vegaminds.com/v1/workflows/{workflow_id}/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"message": "The request body is invalid.",
"fields": {
"email_addresses[0].address": "Must be an email address."
}
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "invalid_token",
"message": "The access token is invalid, expired or revoked."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "insufficient_scope",
"message": "This request needs the contacts:write scope, which the user did not grant. Connect the user again, asking for it."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "not_found",
"message": "Contact not found."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {}
},
"request_id": "<string>"
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Wait the number of seconds in the Retry-After header, then try again."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Try again later, and contact Vega support with the request id if it keeps happening."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}Workflows
Move a workflow to a stage
Moves an active run to stage_id from its frozen stages. Requires from_stage_id from the last read. A stale stage or concurrent move returns 409 conflict: read the run again before deciding whether to retry. Destination tasks are created when that stage has no remaining tasks, including when its previous tasks were all deleted. Open tasks in the stage left remain open. The move does not automatically skip completed stages. Scheduled, completed and cancelled runs cannot move. To advance normally, complete tasks via PATCH /tasks/ with tasks:write; closing the last open task advances the run, or completes its final stage.
POST
/
workflows
/
{workflow_id}
/
move
Move a workflow to a stage
curl --request POST \
--url https://api.vegaminds.com/v1/workflows/{workflow_id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_stage_id": "5d1c402b-8766-48dc-a2b7-b73fedb57758",
"stage_id": "9c6f7d62-f7ce-46ce-9d4a-62ab3764d05e"
}
'import requests
url = "https://api.vegaminds.com/v1/workflows/{workflow_id}/move"
payload = {
"from_stage_id": "5d1c402b-8766-48dc-a2b7-b73fedb57758",
"stage_id": "9c6f7d62-f7ce-46ce-9d4a-62ab3764d05e"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from_stage_id: '5d1c402b-8766-48dc-a2b7-b73fedb57758',
stage_id: '9c6f7d62-f7ce-46ce-9d4a-62ab3764d05e'
})
};
fetch('https://api.vegaminds.com/v1/workflows/{workflow_id}/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"message": "The request body is invalid.",
"fields": {
"email_addresses[0].address": "Must be an email address."
}
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "invalid_token",
"message": "The access token is invalid, expired or revoked."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "insufficient_scope",
"message": "This request needs the contacts:write scope, which the user did not grant. Connect the user again, asking for it."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "not_found",
"message": "Contact not found."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {}
},
"request_id": "<string>"
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Wait the number of seconds in the Retry-After header, then try again."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Try again later, and contact Vega support with the request id if it keeps happening."
},
"request_id": "3f6c1e9a-2b7d-4c58-9e41-8a0d5b7f2c16"
}Authorizations
Scopes
Body
application/json

