Workspace
Save a contact from a business card
multipart/form-data (or JSON): data (JSON) — customer_id (existing company) or new_customer {name, website, phone, address, city} or contact_id (complete an existing contact — filled fields are not overwritten) + contact {name, title, department, phone, phone2, email} + confirm_new; image — the card photo (attached to the company as Kartvizit · Name). For a new company the same name returns 409 exists (customer), a similar name 409 similar (similar; send confirm_new: true to create anyway). The other phone goes into the contact's note.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: CustomersScope:
crm.writeBody application/json
datastringrequiredJSON (fields above).
imagefileoptionalCard photo (jpg, png, heic; max 15 MB).
Errors
| HTTP | error | Meaning |
|---|---|---|
400 | invalid | Missing or invalid field (`message` explains). |
403 | plan | plan |
404 | not_found | Record not found. |
409 | exists | A company with this name exists (returned in `customer`). |
409 | similar | Similar names exist (`similar`); send `confirm_new: true` to create anyway. |
Request
curl -X POST https://ornek.solk.app/api/v1/cards/save \
-H "Authorization: Bearer $SOLK_API_KEY"const res = await fetch("https://ornek.solk.app/api/v1/cards/save", {
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/cards/save",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
)
print(r.json())Response