Runtime
Submit a goal to a team
501 in this build. Three dependencies are absent and each alone would make the response dishonest: the durable dispatcher, manifest-digest storage, and an idempotency store that can honour idempotency_key (the current one is an in-process Map with no body fingerprint and no 2xx filter).
POST
/
v1
/
teams
/
{team}
/
tenants
/
{tenantUserId}
/
submit
Submit a goal to a team
curl --request POST \
--url https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "<string>",
"tasks": [
{
"title": "<string>",
"body": "<string>",
"assignee": "<string>",
"required_checks": [
"<string>"
]
}
],
"parent": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit"
payload = {
"goal": "<string>",
"tasks": [
{
"title": "<string>",
"body": "<string>",
"assignee": "<string>",
"required_checks": ["<string>"]
}
],
"parent": "<string>",
"idempotency_key": "<string>"
}
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({
goal: '<string>',
tasks: [
{
title: '<string>',
body: JSON.stringify('<string>'),
assignee: '<string>',
required_checks: ['<string>']
}
],
parent: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit', 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.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit",
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([
'goal' => '<string>',
'tasks' => [
[
'title' => '<string>',
'body' => '<string>',
'assignee' => '<string>',
'required_checks' => [
'<string>'
]
]
],
'parent' => '<string>',
'idempotency_key' => '<string>'
]),
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.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit"
payload := strings.NewReader("{\n \"goal\": \"<string>\",\n \"tasks\": [\n {\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"assignee\": \"<string>\",\n \"required_checks\": [\n \"<string>\"\n ]\n }\n ],\n \"parent\": \"<string>\",\n \"idempotency_key\": \"<string>\"\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.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"goal\": \"<string>\",\n \"tasks\": [\n {\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"assignee\": \"<string>\",\n \"required_checks\": [\n \"<string>\"\n ]\n }\n ],\n \"parent\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit")
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 \"goal\": \"<string>\",\n \"tasks\": [\n {\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"assignee\": \"<string>\",\n \"required_checks\": [\n \"<string>\"\n ]\n }\n ],\n \"parent\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "not_configured",
"message": "<string>",
"details": {
"missing": [
"<string>"
]
}
}
}Authorizations
Workspace API key. Create one via the dashboard or POST /v1/auth/keys.
Path Parameters
Team slug. Lowercase letters, digits and hyphens, 1..63 characters.
The tenant_user this team is bound to. default and me resolve to the caller's own subject.
Body
application/json
Response
Missing or invalid credentials.
Show child attributes
Show child attributes
⌘I
Submit a goal to a team
curl --request POST \
--url https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "<string>",
"tasks": [
{
"title": "<string>",
"body": "<string>",
"assignee": "<string>",
"required_checks": [
"<string>"
]
}
],
"parent": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit"
payload = {
"goal": "<string>",
"tasks": [
{
"title": "<string>",
"body": "<string>",
"assignee": "<string>",
"required_checks": ["<string>"]
}
],
"parent": "<string>",
"idempotency_key": "<string>"
}
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({
goal: '<string>',
tasks: [
{
title: '<string>',
body: JSON.stringify('<string>'),
assignee: '<string>',
required_checks: ['<string>']
}
],
parent: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit', 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.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit",
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([
'goal' => '<string>',
'tasks' => [
[
'title' => '<string>',
'body' => '<string>',
'assignee' => '<string>',
'required_checks' => [
'<string>'
]
]
],
'parent' => '<string>',
'idempotency_key' => '<string>'
]),
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.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit"
payload := strings.NewReader("{\n \"goal\": \"<string>\",\n \"tasks\": [\n {\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"assignee\": \"<string>\",\n \"required_checks\": [\n \"<string>\"\n ]\n }\n ],\n \"parent\": \"<string>\",\n \"idempotency_key\": \"<string>\"\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.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"goal\": \"<string>\",\n \"tasks\": [\n {\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"assignee\": \"<string>\",\n \"required_checks\": [\n \"<string>\"\n ]\n }\n ],\n \"parent\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenaive.ai/v1/teams/{team}/tenants/{tenantUserId}/submit")
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 \"goal\": \"<string>\",\n \"tasks\": [\n {\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"assignee\": \"<string>\",\n \"required_checks\": [\n \"<string>\"\n ]\n }\n ],\n \"parent\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "not_configured",
"message": "<string>",
"details": {
"missing": [
"<string>"
]
}
}
}