Voiceflow bearer token
Create turn
curl --request POST \
--url https://realtime-api.voiceflow.com/v1/stable/test-turn \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"type": "user",
"testID": "<string>",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
}'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/test-turn?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"type": "user",
"testID": "<string>",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
}),
});
const data = await response.json();import requests
response = requests.post(
'https://realtime-api.voiceflow.com/v1/stable/test-turn?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
json={
"type": "user",
"testID": "<string>",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
},
)
data = response.json()vf test turn create --project-id <projectID> --environment-alias <environmentAlias> \
< body.json{
"turn": {
"id": "<string>",
"testID": "<string>",
"createdAt": "2026-09-10T00:00:00.000Z",
"updatedAt": "2026-09-10T00:00:00.000Z",
"type": "user",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
}
}Adds a test turn to its test, one side of a scripted conversation, either what the user says or the agent reply the checks assert on. The response carries the ID that later calls address it by.
POST
/v1/stable/test-turn
Create turn
curl --request POST \
--url https://realtime-api.voiceflow.com/v1/stable/test-turn \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"type": "user",
"testID": "<string>",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
}'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/test-turn?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"type": "user",
"testID": "<string>",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
}),
});
const data = await response.json();import requests
response = requests.post(
'https://realtime-api.voiceflow.com/v1/stable/test-turn?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
json={
"type": "user",
"testID": "<string>",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
},
)
data = response.json()vf test turn create --project-id <projectID> --environment-alias <environmentAlias> \
< body.json{
"turn": {
"id": "<string>",
"testID": "<string>",
"createdAt": "2026-09-10T00:00:00.000Z",
"updatedAt": "2026-09-10T00:00:00.000Z",
"type": "user",
"payload": {
"response": "<string>",
"variableStates": "<string>"
}
}
}Authorizations
Query Parameters
Body
Show child attributes
Option 1
Show child attributes
Option 2
Show child attributes
Option 3
Show child attributes
Show child attributes
Show child attributes
Option 1
string
Option 2
PersonaItem — see its attributes above
Response
201 - application/jsonCreates one turn on the test named in the body and returns it with its assigned id. Where the turn sits in the conversation is held by the test's turnOrder, not by the turn.
Show child attributes
Option 1
Show child attributes
Show child attributes
Show child attributes
Option 1
string
Option 2
PersonaItem — see its attributes above
Option 2
Show child attributes
Option 3
Show child attributes
Show child attributes
Show child attributes
Option 1
string
Option 2
PersonaItem — see its attributes above
Was this page helpful?
Thanks for your feedback.