Skip to main content

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

FieldTypeRequiredDescription
campaign_codestringYesRelated campaign code
account_codestringNoCustomer code if available
account_namestringYesCustomer name
account_phonestringYesCustomer phone number
account_emailstringNoCustomer email
contact_namestringYesContact person name
contact_emailstringNoContact email
contact_phonestringYesContact phone number
recipient_usernamestringYesUser 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"
}
}