Hatch
On this page

POST/api/sites

Authorization

  • session: Authorization: Bearer <token>. The session token from signing in (or the session cookie in a browser on the same origin).

Request body

  • slug string: At most 100 characters
  • title string: At most 120 characters

Response

201: It worked

  • site Site (required)

    • id string (required): At most 300 characters
    • slug string (required): At most 300 characters
    • title string (required): At most 300 characters
    • visibility "public" | "link" | "invite" (required)
    • invites array<string> (required)
    • key string (required): The secret in a link-only site’s address. At most 100 characters
    • bytes number (required)
    • files number (required)
    • updatedAt number | null (required)
    • newsletter boolean (required): The site takes email sign-ups
    • takenDown object | null (required)

      • One of: Option 1

        • reason string (required): At most 100000 characters
        • at number (required)
    • url string (required): At most 2000 characters
    • domain DomainState | null

      • One of: DomainState

        • domain string (required): At most 300 characters
        • verified boolean (required)
        • proof boolean | null (required)
        • pointing boolean | null (required)
        • checkedAt number | null (required)
        • records array<object> (required)
        • addresses array<string> (required)
    • webhook object | null

      • One of: Option 1

        • url string (required): At most 500 characters

Other answers:

  • 4XX: Refused, with a message to show the person