---
agentTools:
  projectIndex: https://rampwin-api.readme.io/llms.txt
---

# Create Contact

Creates a new contact under a specific WhatsApp channel (integration).

## Endpoint

`POST /api/contacts`

**Base URL**

```bash URL
https://api.rampwin.com
```

***

## Description

Creates a contact with user details and custom attributes.\
This contact can later be used for sending messages, templates, and campaigns.

***

## Authentication

This API supports:

* API Key

***

## Headers

| Header       | Type   | Required | Description                       |
| ------------ | ------ | -------- | --------------------------------- |
| accept       | string | Yes      | application/json, text/plain, */* |
| content-type | string | Yes      | application/json;charset=UTF-8    |
| x-api-key    | string | Yes      | Your API key                      |

***

## Query Parameters

| Parameter       | Type   | Required | Description                          |
| --------------- | ------ | -------- | ------------------------------------ |
| integration\_id | string | Yes      | Channel ID (WhatsApp integration ID) |

***

## Request Body

### Core Fields

| Field           | Type   | Required | Description          |
| --------------- | ------ | -------- | -------------------- |
| phone\_number   | number | Yes      | Contact phone number |
| full\_name      | string | Yes      | Full name of contact |
| first\_name     | string | No       | First name           |
| last\_name      | string | No       | Last name            |
| email           | string | No       | Email address        |
| company         | string | No       | Company name         |
| city            | string | No       | City                 |
| state           | string | No       | State                |
| zipcode         | string | No       | Zip code             |
| address         | string | No       | Address              |
| remarks         | string | No       | Additional notes     |
| integration\_id | string | Yes      | Channel ID           |

***

### Custom Attributes

You can pass additional dynamic fields such as:

* plan\_status
* refund\_status
* service\_request\_id
* recharge\_amount
* installationdate
* referral\_status
* tags (array)
* timezone

…and many more depending on your use case.

***

## Example Request

```curl cURL
curl --location 'https://api.rampwin.com/api/contacts?integration_id=YOUR_CHANNEL_ID' \
--header 'accept: application/json, text/plain, */*' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'content-type: application/json;charset=UTF-8' \
--data-raw '{
  "phone_number": 919876543210,
  "full_name": "John Doe",
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@example.com",
  "city": "Mumbai",
  "state": "Maharashtra",
  "zipcode": "400001",
  "integration_id": "YOUR_CHANNEL_ID",
  "plan_status": "ACTIVE",
  "recharge_amount": 500,
  "timezone": "Asia/Kolkata",
  "tags": ["premium", "whatsapp_user"]
}'
```

***

## Response

### Success (200)

```json JSON
{
  "success": true,
  "message": "Contact created successfully",
  "data": {
    "_id": "contact_id",
    "phone_number": 919876543210,
    "full_name": "John Doe",
    "integration_id": "channel_id"
  }
}
```

***

### Error (400)

```json JSON
{
  "success": false,
  "message": "Validation error or duplicate contact"
}
```

***

## Notes

* `integration_id` must match a valid WhatsApp channel
* Phone number should include country code (e.g., 91 for India)
* Single **Bearer Token / x-api-key are required** for authentication
* You can store unlimited custom attributes for personalization
* This contact can be directly used in template messaging APIs