Skip to content

Update a subscription

PUT https://api.copper.com/developer_api/v1/webhooks/{{subscription_id}}

Parameters

Note that all 4 parameters listed below can be optionally provided.

Field Type Details
target string The URL of your webhook endpoint. Must be a valid URL.
secret object Custom key/value pairs that are sent with every notification. Using this secret, your notification endpoint can authenticate the request to make sure it is coming from a trusted source.
headers object Custom HTTP headers that are sent with every notification.
custom_field_computed_values boolean If provided and set to true, dropdown custom fields (standard and multi-select) will have their option_ids converted to the option names.

See the Webhook properties section for more details.

This example shows updating an existing subscription.

Request body

{
  "target": "https://your.endpoint.here",
  "secret": {
    "secret": "hook_source",
    "key": "copper_notifications"
  },
  "headers": {
    "Authentication": "Bearer token"
  },
  "custom_field_computed_values": true
}

Example Requests

Update a subscription

curl --location --request PUT "https://api.copper.com/developer_api/v1/webhooks/{subscription_id}" \
  --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 "{
  \"target\": \"https://your.endpoint.here\",
  \"secret\": {
    \"secret\": \"hook_source\",
    \"key\": \"copper_notifications\"
  },
  \"headers\": {
    \"Authentication\": \"Bearer token\"
  },
  \"custom_field_computed_values\": true,
}"
{
  "id": 17065,
  "target": "https://your.endpoint.here",
  "type": "lead",
  "event": "update",
  "secret": {
    "secret": "hook_source",
    "key": "copper_notifications"
  },
  "headers": {
    "Authentication": "Bearer token"
  },
  "custom_field_computed_values": true,
  "created_at": 1489173015
}
{
    "success": false,
    "status": 422,
    "message": "Invalid input: Invalid URI For External Request"
}