Creates a new contact under a specific WhatsApp channel (integration).
Endpoint
POST /api/contacts
Base 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 |
| 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 --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": "[email protected]",
"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)
{
"success": true,
"message": "Contact created successfully",
"data": {
"_id": "contact_id",
"phone_number": 919876543210,
"full_name": "John Doe",
"integration_id": "channel_id"
}
}
Error (400)
{
"success": false,
"message": "Validation error or duplicate contact"
}
Notes
integration_idmust 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
