Assign Team Member

Assigns a team member (agent) to a specific contact within a WhatsApp channel.

Endpoint

POST /api/contacts/assign

Base URL

https://api.rampwin.com

Description

This API assigns a team member to a contact using the contact’s phone number under a specific integration (channel).
It helps in routing conversations to the appropriate agent.


When to Use

Use this API when you want to:

  • Assign chats to support agents
  • Route leads to sales representatives
  • Manage conversation ownership

Authentication

  • API Key

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour Rampwin API key
Content-TypestringYesapplication/json

Request Body

{
  "integration_id": "CHANNEL_ID",
  "team_member_email": "[email protected]",
  "phone_number": "919999999999"
}

Request Parameters

FieldTypeRequiredDescription
integration_idstringYesWhatsApp channel ID
team_member_emailstringYesEmail of the team member (agent)
phone_numberstringYesContact’s phone number (with country code)

Example Request

curl --location 'https://api.rampwin.com/api/contacts/assign' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "integration_id": "YOUR_CHANNEL_ID",
  "team_member_email": "[email protected]",
  "phone_number": "YOUR_PHONE_NUMBER"
}'

Response

Success (200)

{
  "success": true,
  "message": "Team member assigned successfully"
}

Error (400)

{
  "success": false,
  "message": "Invalid team member or contact not found"
}

Common Errors

ErrorDescription
Invalid team memberEmail not found in system
Contact not foundPhone number does not exist
Missing parametersRequired fields not provided
UnauthorizedInvalid API key