Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Set Values

Set custom field values
post/v1/customFields/setValues

Sets one or more custom fields on an instance of a Metronome entity. If a key/value pair passed in this request matches one already set on the entity, its value will be overwritten. Any key/value pairs that exist on the entity that do not match those passed in this request will remain untouched. This endpoint is transactional and will update all key/value pairs or no key/value pairs. Partial updates are not supported. There is a 200 character limit on custom field values.

Body Parameters
custom_fieldsmap
entityenum
"alert" OR "billable_metric" OR "charge" OR 15 more
Hide ParametersShow Parameters
"alert"
"billable_metric"
"charge"
"commit"
"contract_credit"
"contract_product"
"contract"
"credit_grant"
"customer_plan"
"customer"
"discount"
"invoice"
"plan"
"professional_service"
"product"
"rate_card"
"scheduled_charge"
"subscription"
entity_idstring
formatuuid
curl https://api.metronome.com/v1/customFields/setValues \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \
    -d '{
          "custom_fields": {
            "x_account_id": "KyVnHhSBWl7eY2bl"
          },
          "entity": "customer",
          "entity_id": "99594816-e8a5-4bca-be21-8d1de0f45120"
        }'