Update an issue's state
curl --request PATCH \
--url https://restapi.deepdub.ai/api/v1/issues/{id}/state \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"state": "resolved"
}
'import requests
url = "https://restapi.deepdub.ai/api/v1/issues/{id}/state"
payload = { "state": "resolved" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({state: 'resolved'})
};
fetch('https://restapi.deepdub.ai/api/v1/issues/{id}/state', 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://restapi.deepdub.ai/api/v1/issues/{id}/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'state' => 'resolved'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://restapi.deepdub.ai/api/v1/issues/{id}/state"
payload := strings.NewReader("{\n \"state\": \"resolved\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://restapi.deepdub.ai/api/v1/issues/{id}/state")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"state\": \"resolved\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://restapi.deepdub.ai/api/v1/issues/{id}/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"state\": \"resolved\"\n}"
response = http.request(request)
puts response.read_body{
"id": "iss_12345abcde",
"state": "open",
"rejectionReason": "duplicate report",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"generationId": "<string>",
"generatedText": "<string>",
"problemWord": "<string>",
"voicePromptId": "<string>",
"type": "hallucinations",
"locale": "en-US",
"additionalComments": "<string>",
"problemSeconds": 123,
"phoneticHeard": "<string>",
"phoneticExpected": "<string>"
}{
"message": "rejectionReason is required when state is rejected"
}{
"message": "Unauthorized"
}{
"message": "Issue not found"
}{
"message": "Failed to update issue state"
}Issues
Update an issue's state
Move an issue through the review workflow. You can only change the state of issues your own API key created.
PATCH
/
issues
/
{id}
/
state
Update an issue's state
curl --request PATCH \
--url https://restapi.deepdub.ai/api/v1/issues/{id}/state \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"state": "resolved"
}
'import requests
url = "https://restapi.deepdub.ai/api/v1/issues/{id}/state"
payload = { "state": "resolved" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({state: 'resolved'})
};
fetch('https://restapi.deepdub.ai/api/v1/issues/{id}/state', 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://restapi.deepdub.ai/api/v1/issues/{id}/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'state' => 'resolved'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://restapi.deepdub.ai/api/v1/issues/{id}/state"
payload := strings.NewReader("{\n \"state\": \"resolved\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://restapi.deepdub.ai/api/v1/issues/{id}/state")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"state\": \"resolved\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://restapi.deepdub.ai/api/v1/issues/{id}/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"state\": \"resolved\"\n}"
response = http.request(request)
puts response.read_body{
"id": "iss_12345abcde",
"state": "open",
"rejectionReason": "duplicate report",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"generationId": "<string>",
"generatedText": "<string>",
"problemWord": "<string>",
"voicePromptId": "<string>",
"type": "hallucinations",
"locale": "en-US",
"additionalComments": "<string>",
"problemSeconds": 123,
"phoneticHeard": "<string>",
"phoneticExpected": "<string>"
}{
"message": "rejectionReason is required when state is rejected"
}{
"message": "Unauthorized"
}{
"message": "Issue not found"
}{
"message": "Failed to update issue state"
}Moves an issue through the review workflow. This is separate from
Setting
PUT /issues/{id}, which edits the contents of a report — this endpoint only changes its state.
You can only change the state of issues created by your own API key; anything else returns 404.
States
| State | Meaning |
|---|---|
open | Received and waiting for review. |
uploaded_for_correction | Accepted and queued for a correction. |
in_progress | Actively being worked on. |
resolved | Fixed. |
rejected | Not actionable. Requires rejectionReason. |
state to rejected without a rejectionReason returns 400, as does any value outside the table above.
{
"state": "rejected",
"rejectionReason": "not reproducible"
}
Authorizations
API key for authentication. Must start with dd- prefix.
Headers
API Key
Path Parameters
Issue ID
Body
application/json
Payload for moving an issue to a new workflow state
Response
Updated issue
Issue details
Example:
"iss_12345abcde"
Current state of the issue.
Available options:
open, uploaded_for_correction, in_progress, resolved, rejected Example:
"open"
Why the issue was rejected. Present only when state is rejected.
Example:
"duplicate report"
Category of problem being reported.
Available options:
hallucinations, glossary Locale of the reported generation, when known.
Example:
"en-US"
Phonetic transcription of how the word actually sounded
Phonetic transcription of how the word should sound
