curl --request POST \
--url https://production-api.joinrings.com/v1/tasks/{task_id}/associations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"entity_type": "<string>",
"entity_uuid": "<string>"
}
'import requests
url = "https://production-api.joinrings.com/v1/tasks/{task_id}/associations"
payload = {
"entity_type": "<string>",
"entity_uuid": "<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({entity_type: '<string>', entity_uuid: '<string>'})
};
fetch('https://production-api.joinrings.com/v1/tasks/{task_id}/associations', 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://production-api.joinrings.com/v1/tasks/{task_id}/associations",
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([
'entity_type' => '<string>',
'entity_uuid' => '<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://production-api.joinrings.com/v1/tasks/{task_id}/associations"
payload := strings.NewReader("{\n \"entity_type\": \"<string>\",\n \"entity_uuid\": \"<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://production-api.joinrings.com/v1/tasks/{task_id}/associations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entity_type\": \"<string>\",\n \"entity_uuid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.joinrings.com/v1/tasks/{task_id}/associations")
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 \"entity_type\": \"<string>\",\n \"entity_uuid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"entity_type": "<string>",
"entity_uuid": "<string>",
"uuid": "<string>"
}Add task association
Links a person, company, note, file, activity, or opportunity to the task. TASK-to-TASK links are not allowed. Returns 201 with the association record; if an identical association already exists the existing record is returned (idempotent). Returns 404 if the task is not visible to the caller, or if the target entity doesn’t exist for this tenant.
entity_type must be one of: PERSON, COMPANY, NOTE, FILE, ACTIVITY,
OPPORTUNITY. For ACTIVITY, entity_uuid is the activity’s object_id
(what GET /v1/activities/{activity_object_id}/body takes), not a uuid.
curl --request POST \
--url https://production-api.joinrings.com/v1/tasks/{task_id}/associations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"entity_type": "<string>",
"entity_uuid": "<string>"
}
'import requests
url = "https://production-api.joinrings.com/v1/tasks/{task_id}/associations"
payload = {
"entity_type": "<string>",
"entity_uuid": "<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({entity_type: '<string>', entity_uuid: '<string>'})
};
fetch('https://production-api.joinrings.com/v1/tasks/{task_id}/associations', 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://production-api.joinrings.com/v1/tasks/{task_id}/associations",
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([
'entity_type' => '<string>',
'entity_uuid' => '<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://production-api.joinrings.com/v1/tasks/{task_id}/associations"
payload := strings.NewReader("{\n \"entity_type\": \"<string>\",\n \"entity_uuid\": \"<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://production-api.joinrings.com/v1/tasks/{task_id}/associations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entity_type\": \"<string>\",\n \"entity_uuid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.joinrings.com/v1/tasks/{task_id}/associations")
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 \"entity_type\": \"<string>\",\n \"entity_uuid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"entity_type": "<string>",
"entity_uuid": "<string>",
"uuid": "<string>"
}Authorizations
Path Parameters
Body
Entity type discriminator. Must be one of (uppercase): PERSON, COMPANY, NOTE, FILE, ACTIVITY, OPPORTUNITY. TASK-to-TASK links are rejected outright. For ACTIVITY, entity_uuid is the activity's object_id (what GET /v1/activities/{activity_object_id}/body takes), not a uuid.