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

List Keys

List custom field keys
v1.custom_fields.list_keys(CustomFieldListKeysParams**kwargs) -> datalistnext_pagestrCustomFieldListKeysResponse
post/v1/customFields/listKeys

List all active custom field keys, optionally filtered by entity type.

Parameters
next_pagestr
optional

Cursor that indicates where the next page of results should start.

entitieslist
optional
List[Literal["alert", "billable_metric", "charge", 15 more]]

Optional list of entity types to return keys for

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"
Returns
CustomFieldListKeysResponseclass
Hide ParametersShow Parameters
datalist
List[Data]
Hide ParametersShow 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
next_pagestr
from metronome import Metronome

client = Metronome(
    bearer_token="My Bearer Token",
)
response = client.v1.custom_fields.list_keys(
    entities=["customer"],
)
print(response.data)
200 Example
{
  "data": [
    {
      "enforce_uniqueness": true,
      "entity": "alert",
      "key": "key"
    }
  ],
  "next_page": "next_page"
}