Skip to main content
An AI agent can create and deploy a Mintlify site without first signing up for an account. You can then claim the site an agent creates for you from your own Mintlify account. Use this site creation and signup flow when you want an agent to work on a site autonomously or when you want to demo a live site before creating an account. If you already have an account or are ready to sign up, use the agent setup workflow instead.

Deploy a site

Run mint deploy from the documentation directory. The directory must contain a docs.json file.
The command provisions a site at https://<subdomain>.mintlify.site and prints a hosted Git repository URL and a short-lived write token. It does not upload files. The agent then:
  1. Clones the hosted repository into a separate directory, passing the write token as an Authorization: Bearer header for that Git process only.
  2. Copies docs.json, pages, and assets into the repository root.
  3. Commits and pushes to main. The push starts a build.
The output includes ready-to-run Git commands. Run mint deploy again from the same directory to get a fresh write token, or pass --new --subdomain <name> to create another site.
The write token grants push access to the site. Don’t paste it into public logs, commit it, or save it in a Git remote URL.

Deploy on every push from GitHub

If your documentation lives in a GitHub repository, mint deploy --github sets up a workflow that deploys the site on every push to the repository’s default branch. The workflow authenticates with GitHub’s OIDC identity token, so the repository doesn’t store any secrets. --github requires a GitHub origin remote and the GitHub CLI signed in with access to the repository.
The command:
  1. Provisions the site, or reuses the site from an earlier mint deploy in the same directory.
  2. Trusts the repository and its default branch to deploy the site.
  3. Writes .github/workflows/mintlify.yml at the repository root.
Commit and push the workflow file to the default branch. Each later push to that branch runs mint deploy in GitHub Actions, which pushes the checked-out commit to the site. If your docs live in a subdirectory, run the command from the repository root and pass the subdirectory with --directory. The subdirectory becomes the site root, and the workflow only runs when files in that subdirectory or the workflow itself change.
If .github/workflows/mintlify.yml already exists with different contents, the command stops. Pass --force to overwrite it.
--github only works for unclaimed sites. To deploy a claimed site from GitHub, connect the repository from the dashboard.

Claim the site

A site created with mint deploy expires 24 hours after the agent creates it unless a person claims it. The Expires line in the mint deploy output shows the exact time. When an unclaimed site expires, Mintlify deletes it. When you claim a site, it moves into a new organization in your account and you become its admin, so you can manage it from the dashboard.
  1. The agent runs:
    The agent doesn’t need your email. If it already knows the email of your Mintlify account, it can pass --email <email> to prefill the sign-in.
  2. Open the claim link.
  3. Sign in to Mintlify with any account, or create one.
  4. Click Confirm. There is no code to send back to the agent.
Run mint claim from the same directory as mint deploy, or pass --directory. The CLI stores the agent’s credentials and reads them during the claim, so agents shouldn’t read or print them. After you confirm, the claim page opens the new organization in the dashboard.

Check that the claim finished

mint claim doesn’t wait for you to confirm, and the agent has no claim code to submit. To check whether you’ve confirmed, the agent runs mint deploy again from the same directory:
  • If you’ve confirmed, the command prints This site has been claimed. Manage it in the Mintlify dashboard. and doesn’t issue a write token.
  • If the site isn’t claimed yet, the command prints a new write token as usual. Wait for you to click Confirm, then run it again.
Running mint claim again before you confirm prints a new claim link. It doesn’t report the claim status.

Use auth.md without the CLI

Agents that can’t install the CLI can follow https://mintlify.com/auth.md. It describes the same flow as raw HTTP requests: register an anonymous agent identity, provision a site, and hand the account to a person through the claim page.

Add a custom domain

After you claim the site, an agent following auth.md can add a custom domain you ask for, at the domain root or under /docs. The agent gives you the DNS records to add: the TXT records first, then a CNAME to cname.mintlify.builders once they validate. If you host under /docs and your domain serves another site, skip the CNAME, because it sends every path on the domain to Mintlify. Set up a reverse proxy for /docs instead.