Create Contact Comment
curl --request POST \
--url https://api.contactship.ai/v1/comments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "<string>",
"contact_id": "<string>",
"created_by_type": "<string>",
"created_by": "<string>"
}
'import requests
url = "https://api.contactship.ai/v1/comments"
payload = {
"content": "<string>",
"contact_id": "<string>",
"created_by_type": "<string>",
"created_by": "<string>"
}
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: '<string>',
contact_id: '<string>',
created_by_type: '<string>',
created_by: '<string>'
})
};
fetch('https://api.contactship.ai/v1/comments', 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.contactship.ai/v1/comments",
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' => '<string>',
'contact_id' => '<string>',
'created_by_type' => '<string>',
'created_by' => '<string>'
]),
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://api.contactship.ai/v1/comments"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"created_by_type\": \"<string>\",\n \"created_by\": \"<string>\"\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://api.contactship.ai/v1/comments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"created_by_type\": \"<string>\",\n \"created_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/comments")
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\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"created_by_type\": \"<string>\",\n \"created_by\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 123,
"data.id": "<string>",
"data.content": "<string>",
"data.created_by": {},
"data.created_at": "<string>"
}Contactos
Create Contact Comment
Add a comment to an existing contact in the API key’s organization.
POST
/
v1
/
comments
Create Contact Comment
curl --request POST \
--url https://api.contactship.ai/v1/comments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "<string>",
"contact_id": "<string>",
"created_by_type": "<string>",
"created_by": "<string>"
}
'import requests
url = "https://api.contactship.ai/v1/comments"
payload = {
"content": "<string>",
"contact_id": "<string>",
"created_by_type": "<string>",
"created_by": "<string>"
}
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: '<string>',
contact_id: '<string>',
created_by_type: '<string>',
created_by: '<string>'
})
};
fetch('https://api.contactship.ai/v1/comments', 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.contactship.ai/v1/comments",
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' => '<string>',
'contact_id' => '<string>',
'created_by_type' => '<string>',
'created_by' => '<string>'
]),
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://api.contactship.ai/v1/comments"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"created_by_type\": \"<string>\",\n \"created_by\": \"<string>\"\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://api.contactship.ai/v1/comments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"created_by_type\": \"<string>\",\n \"created_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/comments")
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\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"created_by_type\": \"<string>\",\n \"created_by\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 123,
"data.id": "<string>",
"data.content": "<string>",
"data.created_by": {},
"data.created_at": "<string>"
}Add a comment to an existing contact in the API key’s organization.
Use Get contact comments to inspect existing comments before retrying an uncertain creation. The creation route is
Authentication
string
requerido
Organization API key. Keep it on your server or in a credential store.
Body
string
requerido
Nonempty comment text.
string
requerido
Contact UUID belonging to this organization.
string
requerido
USER, SYSTEM, AI, or AUTOMATIZATION. Values are case-sensitive.string
Required member email for
USER. Omit it for every other source type; supplying it then is rejected.Example
This creates a real contact comment. Replace CONTACT_ID with a contact from your organization.curl -X POST 'https://api.contactship.ai/v1/comments' -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"content":"Inquiry received through the website.","contact_id":"CONTACT_ID","created_by_type":"AUTOMATIZATION"}'
Response
number
201 for successful creation.
string
Comment identifier.
string
Saved text.
object | string
User information for a user comment, or the source-type string for a system/AI/automation comment.
string
Creation timestamp.
/v1/comments, not /v1/contacts/{id}/comments.