Home › Phonebook & Contacts
Add New Contact — FarazSMS SMS web service
POST https://api.iranpayamak.com/ws/v1/phone_book_data
Purpose: Add a single contact to a phonebook.
Authentication
This endpoint requires the Api-Key header — get the key from the FarazSMS panel. The header name is case-sensitive and the key must never travel in a query string.
Request fields
phone_book_id(integer) — requiredphone_book_data_id(integer) — optionalprefix(string) — optionalmobile(string) — requiredname(string) — optionalattributes(array) — optional
Notes for this endpoint
- Adds a single new contact to a phonebook.
Example body
{
"phone_book_id": 33,
"phone_book_data_id": 1,
"prefix": "man",
"mobile": "09123456781",
"name": "test name",
"attributes": [
{
"attribute_id": 5,
"value": "1378/01/24"
},
{
"attribute_id": 8,
"value": "Tehran"
}
]
}
Responses
200— Success
Related endpoints in Phonebook & Contacts
GET /example/phone-book/{phone_book}/data.xlsx— Get Bulk Excel SamplePOST /ws/v1/phone_book— Create New PhonebookGET /ws/v1/phone_book— Get PhonebooksPUT /ws/v1/phone_book/{id}— Update PhonebookPOST /ws/v1/phone_book_attribute— Create New Phonebook AttributeGET /ws/v1/phone_book_attribute— Get Phonebook AttributesPOST /ws/v1/phone_book_data/bulk-upsert— Add Bulk ContactPOST /ws/v1/phone_book_data/excel-upsert— Add Excel Contact