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¶
{
"name": "New Demo Opportunity",
"primary_contact_id": 27140359,
"customer_source_id":331242
}
Example Requests¶
New Opportunity¶
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
}"
{
"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_is_revenue": false,
"pipeline_stage_id": 987790,
"pipeline_type": "opportunity",
"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
}
]
}