Delete conversation state
curl --request DELETE \
--url https://general-runtime.voiceflow.com/state/user/{userID} \
--header 'authorization: <api-key>' \
--header 'projectID: <projectid>'import requests
url = "https://general-runtime.voiceflow.com/state/user/{userID}"
headers = {
"projectID": "<projectid>",
"authorization": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {projectID: '<projectid>', authorization: '<api-key>'}
};
fetch('https://general-runtime.voiceflow.com/state/user/{userID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://general-runtime.voiceflow.com/state/user/{userID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: <api-key>",
"projectID: <projectid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://general-runtime.voiceflow.com/state/user/{userID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("projectID", "<projectid>")
req.Header.Add("authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://general-runtime.voiceflow.com/state/user/{userID}")
.header("projectID", "<projectid>")
.header("authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://general-runtime.voiceflow.com/state/user/{userID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["projectID"] = '<projectid>'
request["authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyDelete conversation state
Deletes all state and session data from user’s conversation.
DELETE
/
state
/
user
/
{userID}
Delete conversation state
curl --request DELETE \
--url https://general-runtime.voiceflow.com/state/user/{userID} \
--header 'authorization: <api-key>' \
--header 'projectID: <projectid>'import requests
url = "https://general-runtime.voiceflow.com/state/user/{userID}"
headers = {
"projectID": "<projectid>",
"authorization": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {projectID: '<projectid>', authorization: '<api-key>'}
};
fetch('https://general-runtime.voiceflow.com/state/user/{userID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://general-runtime.voiceflow.com/state/user/{userID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: <api-key>",
"projectID: <projectid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://general-runtime.voiceflow.com/state/user/{userID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("projectID", "<projectid>")
req.Header.Add("authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://general-runtime.voiceflow.com/state/user/{userID}")
.header("projectID", "<projectid>")
.header("authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://general-runtime.voiceflow.com/state/user/{userID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["projectID"] = '<projectid>'
request["authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAuthorizations
Voiceflow API key
Headers
ID of the target Voiceflow project.
ID or alias of the target environment.
Path Parameters
An ID which uniquely identifies the user having the conversation.
Maximum string length:
128Response
200 - undefined
Was this page helpful?
⌘I