API
Log in
Documentation › Contacts › Create contact
POST

Create contact

POSThttps://app.sendapp.ai/api/contacts
Create (or upsert) a single contact. It must have at least a phone OR an email. Existing contacts with the same phone/email are merged (tags combined, metadata merged).
Responses: 201 Created with the created contact — 403 if the plan's contact limit is reached — 422 if both phone and email are missing.
Parameters
apikey required
La tua API Key (anche header X-API-Key).
name optional
Full name, up to 255 characters.
phone required
International format (e.g. +393391234567). Required if email is missing.
email required
Valid email. Required if phone is missing.
tags optional
Array of strings or comma-separated string (e.g. "vip,newsletter").
metadata optional
JSON object with custom fields.
Request
curl -X POST 'https://app.sendapp.ai/api/contacts' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Mario Rossi",
    "phone": "+393391234567",
    "email": "mario@example.com",
    "tags": ["newsletter", "vip"],
    "metadata": { "source": "landing_page_a" }
  }'
<?php
$ch = curl_init('https://app.sendapp.ai/api/contacts');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['X-API-Key: YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'name'     => 'Mario Rossi',
        'phone'    => '+393391234567',
        'email'    => 'mario@example.com',
        'tags'     => ['newsletter', 'vip'],
        'metadata' => ['source' => 'landing_page_a'],
    ]),
]);
echo curl_exec($ch);
curl_close($ch);
const res = await fetch('https://app.sendapp.ai/api/contacts', {
  method: 'POST',
  headers: { 'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'Mario Rossi',
    phone: '+393391234567',
    email: 'mario@example.com',
    tags: ['newsletter', 'vip'],
    metadata: { source: 'landing_page_a' }
  })
});
console.log(await res.json());
Response (200 OK)
{
  "status": "success",
  "contact": {
    "id": 4022,
    "name": "Giulia Bianchi",
    "phone": "393334455667",
    "email": "giulia.bianchi@example.com",
    "tags": [
      "lead"
    ],
    "metadata": [],
    "created_at": "2026-07-13 10:00:00",
    "updated_at": "2026-07-13 10:00:00"
  }
}
Error
{
  "status": "error",
  "message": "Contact limit reached. Please upgrade your plan."
}