Chief Tools Logo
API

Metadata

Metadata stores your own key-value pairs on Domain Chief resources. Use it for identifiers, labels, or links that belong to your system but do not have a standard API field.

The API accepts metadata on:

  • Domains during registration or update
  • Contacts during creation or update
  • DNS records during creation or update

Set metadata

Pass a metadata object when you create or update a supported resource. Keys and values are strings.

JSONCode
{ "metadata": { "customer_id": "customer_4821", "environment": "staging", "service": "mail" } }

The API returns metadata on the resource:

JSONCode
{ "id": "7f942c3e-791f-4b24-9a84-2f7db248cf60", "domain": "mailbox-lab.example", "metadata": { "customer_id": "customer_4821", "environment": "staging", "service": "mail" } }

Resources without metadata return an empty object in the metadata field.

Update metadata

An update merges the supplied keys with the existing metadata. It does not replace the full object.

Send a new value to add a key or change its value:

JSONCode
{ "metadata": { "environment": "production" } }

Send an empty string to remove one key:

JSONCode
{ "metadata": { "environment": "" } }

Send an empty object to remove all user-defined metadata:

JSONCode
{ "metadata": {} }

Validation rules

PartRule
KeyMust be a non-empty string
Key lengthAt most 40 characters
Key charactersCannot contain [ or ]
ValueMust be a string
Value lengthAt most 500 characters
Keys per resourceAt most 50

For example, customer[id] is invalid because metadata keys cannot contain square brackets. A numeric value such as 123 is also invalid. Send it as the string "123".

Display in Domain Chief

Domain Chief displays all metadata in the web interface. Some values have extra behavior.

HTTPS URLs

A value that starts with https:// appears as a link.

JSONCode
{ "metadata": { "runbook": "https://ops.example.net/runbooks/mail" } }

Tags

The tag key appears as a label on domains, contacts, and DNS records. On a domain, selecting the tag filters the domain list to domains with the same value.

JSONCode
{ "metadata": { "tag": "production" } }

The external_url key adds a link button to domains, contacts, and DNS records. Its value must be a valid https:// URL.

JSONCode
{ "metadata": { "external_url": "https://portal.example.net/resources/4821" } }

Keep metadata safe

Metadata is plain text and appears in API responses. Do not store passwords, access tokens, API keys, or other secrets in it. Use one naming style for keys so integrations can read them consistently.