Home › Phonebook & Contacts
Add Bulk Contact — FarazSMS SMS web service
POST https://api.iranpayamak.com/ws/v1/phone_book_data/bulk-upsert
Purpose: Bulk add/update contacts in a single call (up to 500 contacts).
It used to import contacts to a phonebook with an {Object}. Max contacts can add by Object is 500 in each reques.
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) — requireditems(array) — required
Notes for this endpoint
- Bulk add/update contacts via an object.
- Has a per-request cap; chunk large imports across calls.
Example body
{
"phone_book_id": 86292,
"items": [
{
"prefix": "man",
"mobile": "09123456781",
"name": "test name",
"attributes": [
{
"attribute_id": 2,
"value": "2061207342"
},
{
"attribute_id": 3,
"value": "test"
}
]
}
]
}
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— Add New ContactGET /ws/v1/phone_book_data— Get Phonebook Contacts