curl --request POST \
--url https://api.adapter.com/v1/knowledge/ask/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What are our top blockers for Q1?",
"timezone": "America/New_York",
"metadata": {
"env": "staging"
}
}
'import requests
url = "https://api.adapter.com/v1/knowledge/ask/jobs"
payload = {
"query": "What are our top blockers for Q1?",
"timezone": "America/New_York",
"metadata": { "env": "staging" }
}
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({
query: 'What are our top blockers for Q1?',
timezone: 'America/New_York',
metadata: {env: 'staging'}
})
};
fetch('https://api.adapter.com/v1/knowledge/ask/jobs', 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.adapter.com/v1/knowledge/ask/jobs",
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([
'query' => 'What are our top blockers for Q1?',
'timezone' => 'America/New_York',
'metadata' => [
'env' => 'staging'
]
]),
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.adapter.com/v1/knowledge/ask/jobs"
payload := strings.NewReader("{\n \"query\": \"What are our top blockers for Q1?\",\n \"timezone\": \"America/New_York\",\n \"metadata\": {\n \"env\": \"staging\"\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.adapter.com/v1/knowledge/ask/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What are our top blockers for Q1?\",\n \"timezone\": \"America/New_York\",\n \"metadata\": {\n \"env\": \"staging\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adapter.com/v1/knowledge/ask/jobs")
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 \"query\": \"What are our top blockers for Q1?\",\n \"timezone\": \"America/New_York\",\n \"metadata\": {\n \"env\": \"staging\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"error_code": "authentication_error",
"message": "Invalid or missing credentials.",
"details": {}
}{
"error_code": "permission_denied",
"message": "You do not have permission to perform this action.",
"details": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"type": "<string>",
"detail": "<string>",
"endpoint": "<string>",
"tier": "<string>",
"limit": 123,
"remaining": 123,
"window_seconds": 123,
"retry_after": 123,
"title": "Too Many Requests",
"status": 429,
"error_code": "rate_limit_exceeded",
"instance": "<string>"
}{
"error_code": "internal_server_error",
"message": "An unexpected error occurred.",
"details": {}
}{
"error_code": "service_unavailable",
"message": "The service is currently experiencing issues. Please try again later.",
"details": {}
}Create Ask Job
Ask a question asynchronously: returns a job id immediately; poll
GET /knowledge/ask/jobs/ until status leaves “running”. Same
grounding and citations as /knowledge/ask, without the long-poll timeout —
use for deep or broad questions that may exceed the sync window.
curl --request POST \
--url https://api.adapter.com/v1/knowledge/ask/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What are our top blockers for Q1?",
"timezone": "America/New_York",
"metadata": {
"env": "staging"
}
}
'import requests
url = "https://api.adapter.com/v1/knowledge/ask/jobs"
payload = {
"query": "What are our top blockers for Q1?",
"timezone": "America/New_York",
"metadata": { "env": "staging" }
}
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({
query: 'What are our top blockers for Q1?',
timezone: 'America/New_York',
metadata: {env: 'staging'}
})
};
fetch('https://api.adapter.com/v1/knowledge/ask/jobs', 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.adapter.com/v1/knowledge/ask/jobs",
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([
'query' => 'What are our top blockers for Q1?',
'timezone' => 'America/New_York',
'metadata' => [
'env' => 'staging'
]
]),
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.adapter.com/v1/knowledge/ask/jobs"
payload := strings.NewReader("{\n \"query\": \"What are our top blockers for Q1?\",\n \"timezone\": \"America/New_York\",\n \"metadata\": {\n \"env\": \"staging\"\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.adapter.com/v1/knowledge/ask/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What are our top blockers for Q1?\",\n \"timezone\": \"America/New_York\",\n \"metadata\": {\n \"env\": \"staging\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adapter.com/v1/knowledge/ask/jobs")
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 \"query\": \"What are our top blockers for Q1?\",\n \"timezone\": \"America/New_York\",\n \"metadata\": {\n \"env\": \"staging\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"error_code": "authentication_error",
"message": "Invalid or missing credentials.",
"details": {}
}{
"error_code": "permission_denied",
"message": "You do not have permission to perform this action.",
"details": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"type": "<string>",
"detail": "<string>",
"endpoint": "<string>",
"tier": "<string>",
"limit": 123,
"remaining": 123,
"window_seconds": 123,
"retry_after": 123,
"title": "Too Many Requests",
"status": 429,
"error_code": "rate_limit_exceeded",
"instance": "<string>"
}{
"error_code": "internal_server_error",
"message": "An unexpected error occurred.",
"details": {}
}{
"error_code": "service_unavailable",
"message": "The service is currently experiencing issues. Please try again later.",
"details": {}
}Authorizations
Pass your pk_live_... API key as a Bearer token.
Body
1 - 2000"What are our top blockers for Q1?"
IANA timezone identifier (e.g. "America/New_York") for resolving relative time references like "today" or "last week". Defaults to UTC.
"America/New_York"
Restrict the evidence the model can ground its answer in to rows whose metadata contains ALL the given key/value pairs (AND-of-exact-match). Max 20 keys; string values only.
Show child attributes
Show child attributes
{ "env": "staging" }
Response
Successful Response
The response is of type Response Create Ask Job · object.
Was this page helpful?