Custom objects
Add / remove a link
Links the record to another record through a relation type (act: add) or removes the link (act: remove). On a single (N:1) relation the new target replaces the old one. The response is the updated record.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: CustomersScope:
crm.writePath parameters
keystringrequiredObject key.
idintegerrequiredRecord id.
Body application/json
relationstringrequiredRelation key (
/objects → relations[].key).target_idintegerrequiredTarget record id.
actstringoptionaldefault: addOperation.
Values
addremoveErrors
| HTTP | error | Meaning |
|---|---|---|
400 | invalid | Missing or invalid field (`message` explains). |
403 | forbidden | You may not see / edit this record. |
404 | not_found | Record not found. |
Request
curl -X POST https://ornek.solk.app/api/v1/objects/{key}/records/{id}/links \
-H "Authorization: Bearer $SOLK_API_KEY"const res = await fetch("https://ornek.solk.app/api/v1/objects/{key}/records/{id}/links", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_API_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/v1/objects/{key}/records/{id}/links",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
)
print(r.json())Response