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

Add Key

Create a custom field key
v1.custom_fields.add_key(CustomFieldAddKeyParams**kwargs)
post/v1/customFields/addKey

Add a key to the allow list for a given entity. There is a 100 character limit on custom field keys.

Parameters
enforce_uniquenessbool
entityliteral
Literal["alert", "billable_metric", "charge", 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"
keystr
from metronome import Metronome

client = Metronome(
    bearer_token="My Bearer Token",
)
client.v1.custom_fields.add_key(
    enforce_uniqueness=True,
    entity="customer",
    key="x_account_id",
)