---
updatedAt: 2025-11-05T21:12:46.000Z
agentTools:
  projectIndex: https://developers.short.io/llms.txt
---

# Create a domain

Create a domain

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Short.io API",
    "version": "1.0.0"
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "paths": {
    "/domains": {
      "post": {
        "summary": "Create a domain",
        "tags": [
          "Domains"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hostname": {
                    "format": "fqdn",
                    "description": "Domain hostname",
                    "type": "string",
                    "example": "😀.link"
                  },
                  "hideReferer": {
                    "type": "boolean"
                  },
                  "linkType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "increment"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "random"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "secure"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "four-char"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "eight-char"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "ten-char"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "hostname"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Domain ID",
                      "minimum": 1,
                      "type": "integer",
                      "example": 12345
                    },
                    "hostname": {
                      "format": "hostname",
                      "type": "string"
                    },
                    "unicodeHostname": {
                      "format": "fqdn",
                      "type": "string"
                    },
                    "state": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "extra_records"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "not_registered"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "configured"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "not_configured"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "registration_pending"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "not_verified"
                          ]
                        }
                      ]
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "TeamId": {
                      "nullable": true,
                      "type": "integer"
                    },
                    "hasFavicon": {
                      "type": "boolean"
                    },
                    "segmentKey": {
                      "type": "string"
                    },
                    "hideReferer": {
                      "type": "boolean"
                    },
                    "linkType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "increment"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "random"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "secure"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "four-char"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "eight-char"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "ten-char"
                          ]
                        }
                      ]
                    },
                    "cloaking": {
                      "description": "Enable cloaking for all links on the domain",
                      "type": "boolean"
                    },
                    "hideVisitorIp": {
                      "description": "Don't store visitor IPs in our database",
                      "type": "boolean"
                    },
                    "enableAI": {
                      "description": "Enable AI for all links on the domain",
                      "type": "boolean"
                    },
                    "httpsLevel": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "none"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "redirect"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "hsts"
                          ]
                        }
                      ]
                    },
                    "httpsLinks": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "redirect404": {
                      "format": "uri",
                      "type": "string"
                    },
                    "webhookURL": {
                      "format": "uri",
                      "type": "string"
                    },
                    "integrationGA": {
                      "type": "string"
                    },
                    "integrationFB": {
                      "type": "string"
                    },
                    "integrationAdroll": {
                      "type": "string"
                    },
                    "integrationGTM": {
                      "type": "string"
                    },
                    "clientStorage": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "caseSensitive": {
                      "type": "boolean"
                    },
                    "incrementCounter": {
                      "type": "string"
                    },
                    "robots": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "allow"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "disallow"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "noindex"
                          ]
                        }
                      ]
                    },
                    "sslCertExpirationDate": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "sslCertInstalledSuccess": {
                      "type": "boolean"
                    },
                    "domainRegistrationId": {
                      "type": "integer"
                    },
                    "UserId": {
                      "type": "integer"
                    },
                    "exportEnabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "hostname",
                    "unicodeHostname",
                    "state",
                    "createdAt",
                    "updatedAt",
                    "hasFavicon",
                    "hideReferer",
                    "linkType",
                    "cloaking",
                    "hideVisitorIp",
                    "enableAI",
                    "httpsLevel",
                    "httpsLinks",
                    "clientStorage",
                    "caseSensitive",
                    "incrementCounter",
                    "robots",
                    "exportEnabled"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.short.io",
      "description": "API server"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```