Create a New Opportunity¶
POST https://api.copper.com/developer_api/v1/opportunities
Note that this endpoint is eligible to return computed custom field values, click here for more information.
The following fields are required for this request: name
, primary_contact_id
Request body¶
1 2 3 4 5 | { "name": "New Demo Opportunity", "primary_contact_id": 27140359, "customer_source_id":331242 } |
Example Requests¶
New Opportunity¶
1 2 3 4 5 6 7 8 9 10 | curl --location --request POST "https://api.copper.com/developer_api/v1/opportunities" \ --header "X-PW-AccessToken: YOUR_TOKEN_HERE" \ --header "X-PW-Application: developer_api" \ --header "X-PW-UserEmail: YOUR_EMAIL_HERE" \ --header "Content-Type: application/json" \ --data "{ \"name\": \"New Demo Opportunity\", \"primary_contact_id\": 27140359, \"customer_source_id\":331242 }" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | { "id": 4956209, "name": "New Demo Opportunity", "assignee_id": null, "close_date": null, "company_id": 13349319, "company_name": "Noemail", "customer_source_id": 331242, "details": null, "loss_reason_id": null, "pipeline_id": 213214, "pipeline_stage_id": 987790, "primary_contact_id": 27140359, "priority": "None", "status": "Open", "tags": [], "interaction_count": 0, "monetary_value": null, "win_probability": 5, "date_last_contacted": null, "leads_converted_from": [], "date_created": 1502158599, "date_modified": 1502158599, "custom_fields": [ { "custom_field_definition_id": 126240, "value": null }, { "custom_field_definition_id": 103481, "value": null }, { "custom_field_definition_id": 100764, "value": null } ] } |