Upload a recipient list
이 페이지는 아직 한국어 언어로 제공되지 않습니다. 기본 언어(English)로 표시합니다.
Upload a recipient list
https://api.cekat.ai/api/recipientsCreates a recipient list from a CSV or XLSX file, for use in campaigns.
File format
- The first row must be headers and include
phone_numberandname. Other columns are saved as extra recipient data. - Up to 5,000 contacts, 100 columns and 10 MB. Only the first worksheet is read.
- Phone numbers: non-digits are removed and a leading
0becomes62. Rows with fewer than 7 digits are skipped, and duplicate numbers are kept once.
Contacts are imported in the background. Poll GET /api/recipients until total_contacts for the list matches the total_contacts returned here before creating a campaign.
Authorization
Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.
Alternative to api_key: send the same key as Bearer YOUR_API_KEY.
Body multipart/form-datarequired
Name of the recipient list.
CSV or XLSX file (.csv or .xlsx).
Response
List created; contacts are being imported.
Show child attributes
Number of contacts imported into the list so far.
The API key is missing or invalid.
Show child attributes
Request ID. Include it when contacting Cekat support.
The file is larger than 10 MB.
Show child attributes
Request ID. Include it when contacting Cekat support.
The name or file is missing, or the file is invalid (wrong type, missing headers, no valid contacts, or too many rows or columns).
Show child attributes
Request ID. Include it when contacting Cekat support.
Rate limit exceeded. Wait and retry.
A dependency is temporarily unavailable. Retry later.
Show child attributes
Request ID. Include it when contacting Cekat support.
curl --request POST \
--url 'https://api.cekat.ai/api/recipients' \
--header 'api_key: YOUR_API_KEY' \
--form 'name=Jane Doe' \
--form 'file=@/path/to/file'
const form = new FormData();
form.append('name', "Jane Doe");
form.append('file', "<string>");
const response = await fetch('https://api.cekat.ai/api/recipients', {
method: 'POST',
headers: { 'api_key': 'YOUR_API_KEY' },
body: form
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.cekat.ai/api/recipients"
headers = {"api_key": "YOUR_API_KEY"}
data = {
"name": "Jane Doe"
}
response = requests.post(url, headers=headers, data=data, files={"file": open("recipients.csv", "rb")})
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cekat.ai/api/recipients',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY'],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Jane Doe",
"total_contacts": 1
}
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"message": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}