Skip to main content

Update Opportunity

Endpoint

PUT /api/v6.1/opportunity

Request Example

curl --location --request PUT 'https://demo.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 XYZ",
"account_phone": "0123456789",
"account_email": "[email protected]",
"contact_name": "Contact Person A",
"contact_email": "[email protected]",
"contact_phone": "0987654321",
"recipient_username": "user_example",
"current_opportunity_code": "CH2055057",
"description": "Opportunity update note"
}'

Request Parameters

FieldTypeRequiredDescription
campaign_codestringCampaign code containing the opportunity
account_codestringCustomer code
account_namestringCustomer name
account_phonestringCustomer phone number
account_emailstringCustomer email
contact_namestringContact person name
contact_emailstringContact email
contact_phonestringContact phone
recipient_usernamestringNew assigned user's username
current_opportunity_codestringCurrent opportunity code to update
descriptionstringOpportunity description note

Sample Response

{
"message": "Update successful",
"data": {
"id": 2055057,
"description": "Update note",
"account_id": 11973,
"contact_id": 9753,
"recipient": 1,
"receipt_date": 1751013960,
"updated_at": 1751013960,
"opportunity_code": "CH2055057",
"opportunity_name": "Contact Person A - Customer XYZ",
"opportunity_status": 31,
"create_user": null,
"amount": 0,
"actual_amount": 0,
"campaign_id": 8,
"probability": 0,
"status": 0,
"copy_source_opportunity": null,
"copy_source_campaign": null,
"est_finish_date": null,
"finished_date": null,
"type_source": "",
"source_content": "",
"created_at": 1751013849
}
}

Notes

  • The current_opportunity_code field is required to identify the record to update.