Tuti APIPortal

Get the custom domain

Get the portal's custom domain, whether it's verified, and the DNS records to add.

GET/domain

Authorization Bearer token

Responses

  • 200The portal's custom domain

    application/json · object

    The portal's custom domain

    • domainCustomDomain · nullablerequired

      The custom domain; null if none

      Show 5 properties
      • hostnamestringrequired

        The domain

      • statusstringrequired

        verified once domain.verify found its TXT record; pending until then

        One of"pending""verified"

      • verifiedAtstring · nullablerequired

        When it was verified (ISO 8601), or null

      • certificatestring · nullablerequired

        Where Tuti gets certificates through Cloudflare, when HTTPS works there: pending until the CNAME points at Tuti, then active (or failed); null otherwise

        One of"pending""active""failed"

      • recordsarray of objectrequired

        The DNS records to add: a CNAME pointing it at Tuti, and a TXT record that proves it's yours

        Show 3 properties
        • typestringrequired

          The record's type

          One of"CNAME""TXT"

        • namestringrequired

          Its name

        • valuestringrequired

          Its value

  • 401No API key was sent, or it isn't valid: it was revoked, or whoever created it left the team.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 429Too many requests: past 600 a minute per key, try again after the seconds in the Retry-After header. Some operations have limits of their own (their description gives them), whose 429 has no Retry-After.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 500Something went wrong on Tuti's side. Try again in a moment.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

curl 'https://tuti.so/api/v1/domain' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch("https://tuti.so/api/v1/domain", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY"
  },
});
const text = await response.text();
import requests

response = requests.get(
    "https://tuti.so/api/v1/domain",
    headers={
        "Authorization": "Bearer YOUR_API_KEY"
    },
)
print(response.text)
{
  "domain": {
    "hostname": "help.example.com",
    "status": "pending",
    "verifiedAt": null,
    "certificate": null,
    "records": [
      {
        "type": "CNAME",
        "name": "help.example.com",
        "value": "portals.tuti.example"
      }
    ]
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "This API key isn't valid or was revoked"
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Up to 600 requests a minute per key"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Something went wrong"
  }
}