Contacts

Create or update a contact

POST/contactsScope contacts:write

Creates the contact, or updates it when one with this phone number already exists. Phone is the key, so you can call this every time something changes on your side without checking first.

Body

  • phonestringrequired

    Phone number with country code.

  • countryCodestring

    Country calling code, if you keep it separately from phone.

  • namestring

    Full name. When left out on create, built from firstName and lastName.

  • firstNamestring

    First name.

  • lastNamestring

    Last name.

  • companystring

    Company.

  • languagestring

    Language code, for example en or hi.

  • emailstring

    Email address.

  • tagsstring[]

    Up to 30 tags. Replaces the existing tags.

  • consentStatusstring

    Marketing consent.

    One of: unverified, opted_in, opted_out

  • customFieldsobject

    Your custom contact attributes by key, as set up under Settings, Contact attributes.

Good to know

  • created is true with status 201 for a new contact, and false with status 200 for an update.

Errors

StatusCodeWhen
403CAPACITY_LIMIT_REACHEDCreating it would go over your plan's contact limit. Updates still work.

Plus the errors any endpoint can return, such as a missing key or scope. See Errors.

# macOS, Linux or Git Bash, with WAMAFY_API_KEY set. The quoting does not work in Windows cmd or PowerShell.
curl -X POST "https://api.wamafy.com/api/v1/public/contacts" \
  -H "Authorization: Bearer $WAMAFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "+919876543210",
  "firstName": "Priya",
  "lastName": "Sharma",
  "tags": [
    "vip"
  ],
  "customFields": {
    "city": "Mumbai"
  }
}'
Response 201
{
  "success": true,
  "data": {
    "id": "9d3f6b2a-4e1c-4a8b-9f0d-2c7e5a1b3d64",
    "phone": "919876543210",
    "name": "Priya Sharma",
    "firstName": "Priya",
    "lastName": "Sharma",
    "company": "Acme Retail",
    "language": "en",
    "email": "priya@example.com",
    "tags": [
      "vip"
    ],
    "status": "active",
    "consentStatus": "opted_in",
    "source": "api",
    "customFields": {
      "city": "Mumbai"
    },
    "createdAt": "2026-09-02T08:15:00.000Z",
    "updatedAt": "2026-10-07T10:00:00.000Z",
    "created": true
  }
}

Base URL https://api.wamafy.com/api/v1/public

    Create or update a contact - Wamafy API