Create publication field <Badge intent="info" minimal outlined>OAuth Scope: publication_fields:write</Badge>
This feature is currently in beta and the API is subject to change.
Define a new publication field for the workspace. The field is created active, and every publication in the workspace can immediately set a value for it.
A json field must set value_source to fetched, an endpoint_url, and the response_keys it declares. Every other kind must be static and carry no endpoint_url. All kinds except json and rss_feed_url require a default_value.
Requires an API key with access to every publication in the workspace.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
The merge tag key for the field, unique within the workspace. Derived from display when omitted. Normalized to start with a letter and contain only lowercase letters, numbers and underscores, so Support Email is stored as support_email. A date or number field also claims its format variants, so launch_date_mdy is rejected with NAME_CLASHES while a date field named launch_date exists, and the other way around.
Where the value for each publication comes from. Defaults to static.
The value used for publications that have not set one of their own. Required for every kind except json and rss_feed_url.
The URL the value is retrieved from. Required when value_source is fetched and rejected otherwise. May contain merge tags that resolve per publication.
The keys declared within the fetched JSON response body. Required when kind is json and rejected otherwise. A number or date key also claims its format variants, so a key temp_round2 is rejected with RESPONSE_KEYS_CLASHES beside a number key named temp.