Phone system & SMS
Send SMS
One SMS. kind: info informational (order, delivery, appointment, payment — no campaign wording) · tacir commercial message to a business's corporate line · bireysel commercial message to an individual with İYS consent. Commercial messages get the workspace's identity and opt-out line appended; numbers on the opt-out list get no commercial messages. If an informational text contains campaign wording (discount, campaign, %…) or the number is on the opt-out list, 409 confirm + need_confirm: true — resend with confirm: 1 if the user agrees. Placeholders: {ad} {kişi} {firma} {sorumlu} {sorumlu_tel} {gönderen} {tarih}. A note is added to the company.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: CustomersScope:
crm.writeBody application/json
textstringrequiredText (max 6 SMS parts).
kindstringoptionaldefault: infoMessage kind.
Values
infotacirbireyselcontact_idintegeroptionalContact (number taken from it).
customer_idintegeroptionalCompany (its phone if no contact).
tostringoptionalNumber (instead of the record's).
confirmintegeroptionalConfirm the warning.
Values
1Errors
| HTTP | error | Meaning |
|---|---|---|
400 | sms | v67: the SMS could not be sent (`message`: no connection, on the opt-out list, no commercial line, provider error). |
409 | confirm | v67: confirmation needed (`need_confirm: true`) — campaign wording in an informational text or a number on the opt-out list; resend with `confirm: 1`. |
403 | plan | plan |
403 | module | The module is off in the licence or for the user. |
Request
curl -X POST https://ornek.solk.app/api/v1/sms/send \
-H "Authorization: Bearer $SOLK_API_KEY"const res = await fetch("https://ornek.solk.app/api/v1/sms/send", {
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/sms/send",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
)
print(r.json())Response