Tasks
Add a note to a task
Add an internal note to a conversation task, the same as typing a note on the task in the dashboard. Only your team sees it. Answering Agent does not contact the customer. The note’s author is the key’s creator. Form tasks take no notes. Each request adds a note, so sending the same request twice adds two. Requests from this playground go to production. Customer API.
POST
/
tasks
/
{task_id}
/
notes
Add a note to a task
curl --request POST \
--url https://answeringagent.com/api/v1/tasks/{task_id}/notes \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"content": "Called Dana back. Membership cancelled in the POS before the charge on the 12th."
}
'import requests
url = "https://answeringagent.com/api/v1/tasks/{task_id}/notes"
payload = { "content": "Called Dana back. Membership cancelled in the POS before the charge on the 12th." }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Called Dana back. Membership cancelled in the POS before the charge on the 12th.'
})
};
fetch('https://answeringagent.com/api/v1/tasks/{task_id}/notes', 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://answeringagent.com/api/v1/tasks/{task_id}/notes",
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([
'content' => 'Called Dana back. Membership cancelled in the POS before the charge on the 12th.'
]),
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://answeringagent.com/api/v1/tasks/{task_id}/notes"
payload := strings.NewReader("{\n \"content\": \"Called Dana back. Membership cancelled in the POS before the charge on the 12th.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://answeringagent.com/api/v1/tasks/{task_id}/notes")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"Called Dana back. Membership cancelled in the POS before the charge on the 12th.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/tasks/{task_id}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"Called Dana back. Membership cancelled in the POS before the charge on the 12th.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 552190,
"content": "Called Dana back. Membership cancelled in the POS before the charge on the 12th.",
"author": {
"id": 9034,
"name": "Priya Shah"
},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "This conversation was merged into conversation-184519. Use that task.",
"code": "not_found"
}{
"error": "This endpoint accepts GET.",
"code": "method_not_allowed"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}Authorizations
Path Parameters
A conversation task ID, such as conversation-184532. A form task ID returns 400.
Pattern:
^conversation-\d+$Example:
"conversation-184532"
Body
application/json
The note text, 1 to 5,000 characters after leading and trailing spaces are removed. An @mention stays plain text and notifies nobody.
Required string length:
1 - 5000⌘I
Add a note to a task
curl --request POST \
--url https://answeringagent.com/api/v1/tasks/{task_id}/notes \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"content": "Called Dana back. Membership cancelled in the POS before the charge on the 12th."
}
'import requests
url = "https://answeringagent.com/api/v1/tasks/{task_id}/notes"
payload = { "content": "Called Dana back. Membership cancelled in the POS before the charge on the 12th." }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Called Dana back. Membership cancelled in the POS before the charge on the 12th.'
})
};
fetch('https://answeringagent.com/api/v1/tasks/{task_id}/notes', 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://answeringagent.com/api/v1/tasks/{task_id}/notes",
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([
'content' => 'Called Dana back. Membership cancelled in the POS before the charge on the 12th.'
]),
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://answeringagent.com/api/v1/tasks/{task_id}/notes"
payload := strings.NewReader("{\n \"content\": \"Called Dana back. Membership cancelled in the POS before the charge on the 12th.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://answeringagent.com/api/v1/tasks/{task_id}/notes")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"Called Dana back. Membership cancelled in the POS before the charge on the 12th.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/tasks/{task_id}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"Called Dana back. Membership cancelled in the POS before the charge on the 12th.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 552190,
"content": "Called Dana back. Membership cancelled in the POS before the charge on the 12th.",
"author": {
"id": 9034,
"name": "Priya Shah"
},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "This conversation was merged into conversation-184519. Use that task.",
"code": "not_found"
}{
"error": "This endpoint accepts GET.",
"code": "method_not_allowed"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}