Upload a recipient list

이 페이지는 아직 한국어 언어로 제공되지 않습니다. 기본 언어(English)로 표시합니다.

Upload a recipient list

POSThttps://api.cekat.ai/api/recipients

Creates a recipient list from a CSV or XLSX file, for use in campaigns.

File format

  • The first row must be headers and include phone_number and name. 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 0 becomes 62. 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

api_keystringheaderrequired

Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.

Authorizationstringheader

Alternative to api_key: send the same key as Bearer YOUR_API_KEY.

Body multipart/form-datarequired

namestringrequired

Name of the recipient list.

filestring<binary>required

CSV or XLSX file (.csv or .xlsx).

Response

201
401
413
422
429
503

List created; contacts are being imported.

successboolean
dataRecipientList
Show child attributes
idstring<uuid>
namestring
total_contactsinteger

Number of contacts imported into the list so far.

The API key is missing or invalid.

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

Request ID. Include it when contacting Cekat support.

The file is larger than 10 MB.

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

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).

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

Request ID. Include it when contacting Cekat support.

Rate limit exceeded. Wait and retry.

messagestring

A dependency is temporarily unavailable. Retry later.

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

Request ID. Include it when contacting Cekat support.

POST/api/recipients
cURL
JavaScript
Python
PHP
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;
Response
201
401
413
422
429
503
{
  "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>"
}