Create New Opportunity
Endpoint
POST /api/v6.1/opportunity
How to call API
curl --location 'https://linhpq.getflycrm.com/api/v6.1/opportunity' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'Cookie: v6_getflycrm_session=YOUR_SESSION_TOKEN' \
--data-raw '{
"campaign_code": "CD0008",
"account_code": "KH/2024/119270",
"account_name": "Customer Name",
"account_phone": "0123456789",
"account_email": "[email protected]",
"contact_name": "Contact Person Name",
"contact_email": "[email protected]",
"contact_phone": "0987654321",
"recipient_username": "assigned_user_name"
}'
Parameters in body
Field | Type | Required | Description |
---|---|---|---|
campaign_code | string | Yes | Related campaign code |
account_code | string | No | Customer code if available |
account_name | string | Yes | Customer name |
account_phone | string | Yes | Customer phone number |
account_email | string | No | Customer email |
contact_name | string | Yes | Contact person name |
contact_email | string | No | Contact email |
contact_phone | string | Yes | Contact phone number |
recipient_username | string | Yes | User assigned to handle |
Sample Response
{
"message": "Successfully added",
"data": {
"id": 2055057,
"updated_at": 1751013849,
"account_id": 11973,
"contact_id": 9753,
"opportunity_name": "Contact Person Name - Customer Name",
"recipient": 2,
"create_user": 0,
"campaign_id": 8,
"amount": 0,
"probability": 0,
"receipt_date": 1751013849,
"opportunity_status": 31,
"created_at": 1751013849,
"opportunity_code": "CH2055057"
}
}