Skip to content

Validations

Field validations are applied to the request body when creating or updating a namespace, team, user, zone or RRset. The following rules are enforced:

Namespace Validations

  • name: Must be a non-empty string, unique within the tenant, and cannot exceed 255 characters.
  • name: Leading and trailing whitespace is removed before the name is checked and stored, so a name made only of whitespace is rejected.
  • name: Must be unique within the tenant among those that are not deleted, ignoring letter case: Production and production count as the same name.
  • name: Can not be default or any case variants.
  • description: Optional string, cannot exceed 255 characters.
  • name and description: Can not contain control characters, such as NUL, tab, or line breaks.

Team Validations

  • name: Must be a non-empty string and cannot exceed 255 characters.
  • name: Leading and trailing whitespace is removed before the name is checked and stored, so a name made only of whitespace is rejected.
  • name: Must be unique within the tenant among those that are not deleted, ignoring letter case: Platform and platform count as the same name.
  • name: Can not be default or any case variants.
  • name: Can not contain control characters, such as NUL, tab, or line breaks.
  • email: Optional. When set, it must be a single email address such as team@example.com, without a display name, and cannot exceed 255 characters. Leading and trailing whitespace is removed. An empty string clears it.

User Validations

  • first_name and last_name: Must be non-empty strings and cannot exceed 255 characters. Leading and trailing whitespace is removed before they are checked and stored.
  • first_name and last_name: Can not contain control characters, such as NUL, tab, or line breaks.
  • email: Required. Must be a single email address such as user@example.com, without a display name, and cannot exceed 255 characters. Leading and trailing whitespace is removed.
  • email: Must be unique within the tenant among users that are not deleted, ignoring letter case: Ada@example.com and ada@example.com count as the same address.
  • avatar_url: Optional. When set, it must be an http or https URL and cannot exceed 255 characters. An empty string clears it.
  • team_id: Optional on create; the user joins the Default team when it is omitted. When set, it must be a team of your tenant.
  • role: Optional on create; the user is a member when it is omitted. When set, it must be owner or member.

Zone Validations

  • namespace_id: Required on create. Must be a namespace of your tenant. A zone stays in its namespace.
  • name: Required on create and cannot be changed. A domain name such as example.internal, of at most 253 characters, with labels of 1 to 63 letters, digits and hyphens that do not start or end with a hyphen. Internationalized names must be given in their xn-- form.
  • name: Leading and trailing whitespace and one trailing dot are removed, and the name is stored in lower case.
  • name: Must be unique within the namespace among zones that are not deleted.
  • description: Optional string, cannot exceed 255 characters or contain control characters.
  • soa.primary_ns and soa.hostmaster: Domain names. The hostmaster is written in DNS form, such as hostmaster.example.com. They default to ns1.<zone> and hostmaster.<zone>.
  • soa.refresh, soa.retry and soa.expire: Between 1 and 2147483647 seconds. soa.minimum and soa.ttl: between 0 and 2147483647.
  • soa.serial: Set by Valgrid. It starts at the namespace's config_version when the zone is created and increases on every change to the zone or its RRsets.

RRset Validations

  • name: Relative to the zone, such as www or _sip._tcp. @ or an empty name is the zone apex. A name ending in a dot, such as www.example.internal., must be in the zone. * can be used as the leftmost label for a wildcard. The name is stored in lower case and cannot be changed.
  • type: Required on create and cannot be changed. One of A, AAAA, CAA, CNAME, MX, NS, PTR, SRV and TXT, in any letter case.
  • type: An RRset of the same name and type must not exist in the zone. A CNAME cannot share its name with any other RRset and cannot be at the apex.
  • ttl: Optional, between 0 and 2147483647 seconds. Defaults to 300.
  • records: 1 to 100 records with different contents; a CNAME has exactly one. On update, the records replace the existing ones.
  • records[].content: At most 2048 characters without control characters, written as in a zone file:
  • A: an IPv4 address, such as 192.0.2.1.
  • AAAA: an IPv6 address, such as 2001:db8::1.
  • CNAME, NS, PTR: a domain name. A name ending in a dot is absolute; one without is relative to the zone.
  • MX: a preference and a mail server, such as 10 mail.example.com..
  • SRV: priority, weight, port and target, such as 10 60 5060 sip.example.com..
  • CAA: flags, tag and value, such as 0 issue "letsencrypt.org".
  • TXT: any text.
  • records[].disabled: Optional. A disabled record is kept but not served.

Pagination

List endpoints accept two query parameters:

  • limit: Optional integer between 1 and 100. Defaults to 20.
  • after: Optional token copied from the Link: <...>; rel="next" header of the previous page. Follow that link as is, rather than building it yourself.

Error Responses

A failed validation returns 400 Bad Request with the VALIDATION_FAILED error code. This includes an invalid limit or after value.