Create Task
curl --request POST \
--url https://api.contactship.ai/v1/tasks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"details": "<string>",
"brief": "<string>",
"type": "<string>",
"created_by": "<string>",
"assigned_to": [
"<string>"
],
"status": "<string>",
"priority": "<string>",
"additional_data": {}
}
'import requests
url = "https://api.contactship.ai/v1/tasks"
payload = {
"details": "<string>",
"brief": "<string>",
"type": "<string>",
"created_by": "<string>",
"assigned_to": ["<string>"],
"status": "<string>",
"priority": "<string>",
"additional_data": {}
}
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({
details: '<string>',
brief: '<string>',
type: '<string>',
created_by: '<string>',
assigned_to: ['<string>'],
status: '<string>',
priority: '<string>',
additional_data: {}
})
};
fetch('https://api.contactship.ai/v1/tasks', 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/tasks",
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([
'details' => '<string>',
'brief' => '<string>',
'type' => '<string>',
'created_by' => '<string>',
'assigned_to' => [
'<string>'
],
'status' => '<string>',
'priority' => '<string>',
'additional_data' => [
]
]),
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/tasks"
payload := strings.NewReader("{\n \"details\": \"<string>\",\n \"brief\": \"<string>\",\n \"type\": \"<string>\",\n \"created_by\": \"<string>\",\n \"assigned_to\": [\n \"<string>\"\n ],\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"additional_data\": {}\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/tasks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"details\": \"<string>\",\n \"brief\": \"<string>\",\n \"type\": \"<string>\",\n \"created_by\": \"<string>\",\n \"assigned_to\": [\n \"<string>\"\n ],\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"additional_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/tasks")
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 \"details\": \"<string>\",\n \"brief\": \"<string>\",\n \"type\": \"<string>\",\n \"created_by\": \"<string>\",\n \"assigned_to\": [\n \"<string>\"\n ],\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"additional_data\": {}\n}"
response = http.request(request)
puts response.read_bodyTareas
Create Task
Create an organization task with a description, creator, status, and optional assignees.
POST
/
v1
/
tasks
Create Task
curl --request POST \
--url https://api.contactship.ai/v1/tasks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"details": "<string>",
"brief": "<string>",
"type": "<string>",
"created_by": "<string>",
"assigned_to": [
"<string>"
],
"status": "<string>",
"priority": "<string>",
"additional_data": {}
}
'import requests
url = "https://api.contactship.ai/v1/tasks"
payload = {
"details": "<string>",
"brief": "<string>",
"type": "<string>",
"created_by": "<string>",
"assigned_to": ["<string>"],
"status": "<string>",
"priority": "<string>",
"additional_data": {}
}
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({
details: '<string>',
brief: '<string>',
type: '<string>',
created_by: '<string>',
assigned_to: ['<string>'],
status: '<string>',
priority: '<string>',
additional_data: {}
})
};
fetch('https://api.contactship.ai/v1/tasks', 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/tasks",
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([
'details' => '<string>',
'brief' => '<string>',
'type' => '<string>',
'created_by' => '<string>',
'assigned_to' => [
'<string>'
],
'status' => '<string>',
'priority' => '<string>',
'additional_data' => [
]
]),
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/tasks"
payload := strings.NewReader("{\n \"details\": \"<string>\",\n \"brief\": \"<string>\",\n \"type\": \"<string>\",\n \"created_by\": \"<string>\",\n \"assigned_to\": [\n \"<string>\"\n ],\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"additional_data\": {}\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/tasks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"details\": \"<string>\",\n \"brief\": \"<string>\",\n \"type\": \"<string>\",\n \"created_by\": \"<string>\",\n \"assigned_to\": [\n \"<string>\"\n ],\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"additional_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/tasks")
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 \"details\": \"<string>\",\n \"brief\": \"<string>\",\n \"type\": \"<string>\",\n \"created_by\": \"<string>\",\n \"assigned_to\": [\n \"<string>\"\n ],\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"additional_data\": {}\n}"
response = http.request(request)
puts response.read_bodyCreate an organization task with a description, creator, status, and optional assignees.
Organization is derived from the key; do not send
Authentication
string
requerido
Organization API key. Keep it on your server or in a credential store.
Body
string
requerido
Detailed text, at least four characters.
string
requerido
Short description. Include it even though some generated API metadata labels it optional.
string
requerido
custom, AI, system, or automatization. Use custom for a user-created task.string
requerido
Creator email. For custom tasks, the creator must be a member of the organization.
string[]
Member emails. They are resolved to user IDs.
string
backlog, todo, in_progress, done, blocked, or canceled. Default: todo.string
low, medium, or high. Default: high.object
Optional additional values.
organization_id. Contact linkage is not supported by this creation flow: although a contact field appears in some schema metadata, it is not persisted by task creation.
Example
Replace the creator with an actual organization member before executing. This creates a real task.curl -X POST 'https://api.contactship.ai/v1/tasks' -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"brief":"Review customer inquiry","details":"Review the inquiry and decide the next action.","type":"custom","created_by":"member@example.com","status":"todo","priority":"medium"}'
Response
A successful creation returns HTTP 201 withstatusCode and a data task object. See Get task for its fields. Creating a task records work to do; it does not itself execute a call or send a message. If a request times out, check existing tasks before repeating it.