Resolve queue items
curl --request POST \
--url https://api.moderationapi.com/v1/queue/{id}/items/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"itemIds": [
"clx8k2v0e000108l4a9bz3f7q",
"clx8k2v0e000208l4h2mc6d1r"
]
}
'import requests
url = "https://api.moderationapi.com/v1/queue/{id}/items/resolve"
payload = { "itemIds": ["clx8k2v0e000108l4a9bz3f7q", "clx8k2v0e000208l4h2mc6d1r"] }
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({itemIds: ['clx8k2v0e000108l4a9bz3f7q', 'clx8k2v0e000208l4h2mc6d1r']})
};
fetch('https://api.moderationapi.com/v1/queue/{id}/items/resolve', 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://api.moderationapi.com/v1/queue/{id}/items/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'itemIds' => [
'clx8k2v0e000108l4a9bz3f7q',
'clx8k2v0e000208l4h2mc6d1r'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.moderationapi.com/v1/queue/{id}/items/resolve"
payload := strings.NewReader("{\n \"itemIds\": [\n \"clx8k2v0e000108l4a9bz3f7q\",\n \"clx8k2v0e000208l4h2mc6d1r\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.moderationapi.com/v1/queue/{id}/items/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"itemIds\": [\n \"clx8k2v0e000108l4a9bz3f7q\",\n \"clx8k2v0e000208l4h2mc6d1r\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moderationapi.com/v1/queue/{id}/items/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemIds\": [\n \"clx8k2v0e000108l4a9bz3f7q\",\n \"clx8k2v0e000208l4h2mc6d1r\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"resolved": 123,
"notFoundIds": [
"<string>"
]
}{
"type": "invalid_request_error",
"code": "invalid_request",
"message": "Invalid input data",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "authentication_error",
"code": "unauthorized",
"message": "Authorization not provided",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "permission_error",
"code": "permission_denied",
"message": "Insufficient access",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "api_error",
"code": "internal_error",
"message": "Internal server error",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Resolve queue items
Mark up to 100 items of a queue as resolved in one request. Each item is resolved the same as with POST /queue/{id}/items/{itemId}/resolve. IDs that do not exist in the project are skipped and returned in notFoundIds.
Resolve queue items
curl --request POST \
--url https://api.moderationapi.com/v1/queue/{id}/items/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"itemIds": [
"clx8k2v0e000108l4a9bz3f7q",
"clx8k2v0e000208l4h2mc6d1r"
]
}
'import requests
url = "https://api.moderationapi.com/v1/queue/{id}/items/resolve"
payload = { "itemIds": ["clx8k2v0e000108l4a9bz3f7q", "clx8k2v0e000208l4h2mc6d1r"] }
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({itemIds: ['clx8k2v0e000108l4a9bz3f7q', 'clx8k2v0e000208l4h2mc6d1r']})
};
fetch('https://api.moderationapi.com/v1/queue/{id}/items/resolve', 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://api.moderationapi.com/v1/queue/{id}/items/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'itemIds' => [
'clx8k2v0e000108l4a9bz3f7q',
'clx8k2v0e000208l4h2mc6d1r'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.moderationapi.com/v1/queue/{id}/items/resolve"
payload := strings.NewReader("{\n \"itemIds\": [\n \"clx8k2v0e000108l4a9bz3f7q\",\n \"clx8k2v0e000208l4h2mc6d1r\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.moderationapi.com/v1/queue/{id}/items/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"itemIds\": [\n \"clx8k2v0e000108l4a9bz3f7q\",\n \"clx8k2v0e000208l4h2mc6d1r\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moderationapi.com/v1/queue/{id}/items/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemIds\": [\n \"clx8k2v0e000108l4a9bz3f7q\",\n \"clx8k2v0e000208l4h2mc6d1r\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"resolved": 123,
"notFoundIds": [
"<string>"
]
}{
"type": "invalid_request_error",
"code": "invalid_request",
"message": "Invalid input data",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "authentication_error",
"code": "unauthorized",
"message": "Authorization not provided",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "permission_error",
"code": "permission_denied",
"message": "Insufficient access",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"type": "api_error",
"code": "internal_error",
"message": "Internal server error",
"request_id": "h8fkz6kkzoa446ffve37atys",
"doc_url": "<string>",
"issues": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
Path Parameters
The queue ID.
Body
application/json
The item IDs to resolve. Up to 100.
Required array length:
1 - 100 elementsWas this page helpful?