Relate an existing record to an Entity¶
POST https://api.copper.com/developer_api/v1/{{entity}}/{{entity_id}}/related
Please note that when relating records this way, both records have to exist in the system already.
Request body¶
{
"resource": {
"id": 2827700,
"type": "opportunity"
}
}
Example Requests¶
Relate Opportunity to Person¶
curl --location --request POST "https://api.copper.com/developer_api/v1/people/{{example_person_id}}/related" \
--header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
--header "X-PW-Application: developer_api" \
--header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
--header "Content-Type: application/json" \
--data "{
\"resource\": {
\"id\": 2827700,
\"type\": \"opportunity\"
}
}"
{
"added": true,
"resource": {
"id": 2827700,
"type": "opportunity"
}
}