xhostd Auth API

The Auth API from xhostd — 10 operation(s) for auth.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 17

POST /auth/ssh-key Ssh Key Login #
GET /auth/google Auth Google Start #
GET /auth/google/callback Auth Google Callback #
GET /auth/pick-username Pick Username Page #
POST /auth/pick-username Pick Username Submit #
GET /auth/login Login Page #
POST /auth/login Login Submit #
GET /auth/signup Signup Page #
POST /auth/signup Signup Submit #
GET /auth/signup/complete Signup Complete Page #
POST /auth/signup/complete Signup Complete Submit #
GET /auth/forgot Forgot Page #
POST /auth/forgot Forgot Submit #
GET /auth/reset Reset Page #
POST /auth/reset Reset Submit #
GET /auth/confirm-email Confirm Email Page #
POST /auth/confirm-email Confirm Email Submit #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/xhostd-com:xhostd-com-auth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

xhostd-com-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Xhostd Com Auth API
  version: 0.1.0
  description: 'Operations tagged Auth across 2 of this provider''s published API definitions: api.xhostd.com-openapi.json, console.xhostd.com-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Auth
paths:
  /auth/ssh-key:
    post:
      summary: Ssh Key Login
      description: 'Mint a 30-day token for an ``api_login`` key.


        The route finds the key row by the fingerprint of the presented

        line, verifies the signature against the STORED blob, and mints

        under the ``ssh-key-login`` label with the 20-token cap. An unknown

        fingerprint and a key without ``api_login`` answer the same 404.'
      operationId: ssh_key_login_auth_ssh_key_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SshKeyLoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SshKeyLoginResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/google:
    get:
      summary: Auth Google Start
      description: 'Kick off the Google OAuth flow.


        The signed ``state`` carries the referral token beside ``return_to``,

        so the token survives the round trip through Google without a second

        cookie and without a value a visitor can forge.


        **The URL wins over the cookies.** Either URL name, ``ref`` or its

        alias ``fpr`` (:func:`_url_ref`), beats every cookie. A visitor who

        followed a partner link now is attributed to that partner, whatever

        an earlier visit stored. The cookies answer only when this request

        carries no token, which is the return visit they exist for

        (:func:`_cookie_ref`).


        The signup source rides in the same state, beside the token, already

        resolved by :func:`_url_touch`, without its Google Ads click id

        (design/ATTRIBUTION.md).


        The state also carries a fresh nonce, and the response sets the same

        nonce in the ``__Host-xhost_google`` cookie, the pattern of

        :func:`_new_form_state`. The signature alone shows that the console

        minted the state. The nonce shows that this browser asked for it, so

        the callback refuses a ``code`` and ``state`` that another person

        obtained and sent this browser to complete.'
      operationId: auth_google_start_auth_google_get
      parameters:
      - name: return_to
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Return To
      - name: xt_src
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Src
      - name: xt_med
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Med
      - name: xt_cmp
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Cmp
      - name: xt_rh
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Rh
      - name: xt_lp
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Lp
      - name: xt_ck
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Ck
      - name: ref
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Ref
      - name: fpr
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Fpr
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/google/callback:
    get:
      summary: Auth Google Callback
      description: 'Handle the redirect back from Google.


        The callback deletes the Google sign-in nonce once it accepts the

        ``state``, and at no other point. A refusal that comes before that

        leaves the cookie as it is: any website can send a browser here with

        values of its own, and such a request must not end a sign-in that

        the browser has in progress. From the acceptance on, every answer

        deletes the cookie, a refusal included, so one ``state`` reaches at

        most one code exchange.'
      operationId: auth_google_callback_auth_google_callback_get
      parameters:
      - name: code
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Code
      - name: state
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: State
      - name: error
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Error
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/pick-username:
    get:
      summary: Pick Username Page
      operationId: pick_username_page_auth_pick_username_get
      parameters:
      - name: return_to
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Return To
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
    post:
      summary: Pick Username Submit
      operationId: pick_username_submit_auth_pick_username_post
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
      tags:
      - Auth
  /auth/login:
    get:
      summary: Login Page
      description: 'The sign-in page: a password form, and Continue with Google.


        The page deletes the login flag and leaves the session cookie alone.

        A flag that outlived its session leads a website visitor here, so

        this is where it stops showing the signed-in buttons

        (design/AUTH.md, "Login flag").'
      operationId: login_page_auth_login_get
      parameters:
      - name: return_to
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Return To
      - name: xt_src
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Src
      - name: xt_med
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Med
      - name: xt_cmp
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Cmp
      - name: xt_rh
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Rh
      - name: xt_lp
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Lp
      - name: xt_ck
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Ck
      - name: ref
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Ref
      - name: fpr
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Fpr
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
    post:
      summary: Login Submit
      description: 'Verify an identifier and a password, and start a session.


        The order is the contract. The form state is read first. Then the

        two caps, BEFORE the credential

        reaches xhostd, so a spent budget costs one page render and no

        derivation. A failure records against both caps; a success records

        nothing.'
      operationId: login_submit_auth_login_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_login_submit_auth_login_post'
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/signup:
    get:
      summary: Signup Page
      description: 'The signup page: an address, and nothing else.


        No account exists until the person opens the mailed link, so this

        page asks for no username and no password. It reads the signup

        switch, ``WebSettings.password_signup_enabled``, to decide whether

        to render the form.'
      operationId: signup_page_auth_signup_get
      parameters:
      - name: return_to
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Return To
      - name: xt_src
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Src
      - name: xt_med
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Med
      - name: xt_cmp
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Cmp
      - name: xt_rh
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Rh
      - name: xt_lp
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Lp
      - name: xt_ck
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Xt Ck
      - name: ref
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Ref
      - name: fpr
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Fpr
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
    post:
      summary: Signup Submit
      description: 'Ask xhostd to stage a signup, and say the same thing every time.


        The page renders one confirmation for a free address, an address an

        account already holds, and a repeat inside the resend window,

        because xhostd answers all three alike. Telling them apart here

        would rebuild the enumeration oracle the staging design closes. A

        503 from xhostd renders the closed page, the one a fleet with signup

        turned off serves.'
      operationId: signup_submit_auth_signup_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_signup_submit_auth_signup_post'
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/signup/complete:
    get:
      summary: Signup Complete Page
      description: 'The page the signup mail links to: a username and a password.'
      operationId: signup_complete_page_auth_signup_complete_get
      parameters:
      - name: token
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Token
      - name: return_to
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Return To
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
    post:
      summary: Signup Complete Submit
      description: 'Create the account the mailed secret proves, and sign the person in.


        xhostd owns every rule here — the password policy, the username

        rule, the reserved names, the budgets, and whether the link is still

        good — so this route renders the platform''s own message for a 400, a

        409, and a 410 rather than writing a second copy of those rules.'
      operationId: signup_complete_submit_auth_signup_complete_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_signup_complete_submit_auth_signup_complete_post'
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/forgot:
    get:
      summary: Forgot Page
      description: The page that asks for a reset link.
      operationId: forgot_page_auth_forgot_get
      parameters:
      - name: return_to
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Return To
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
    post:
      summary: Forgot Submit
      description: 'Ask xhostd for a reset link, and say the same thing every time.


        xhostd mails one branch alone — an active account that holds a

        password — and answers every branch identically, so this page states

        that a link is on its way if the account exists. It never says

        whether it does.'
      operationId: forgot_submit_auth_forgot_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_forgot_submit_auth_forgot_post'
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/reset:
    get:
      summary: Reset Page
      description: 'The page the reset mail links to: one new password.'
      operationId: reset_page_auth_reset_get
      parameters:
      - name: token
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Token
      - name: return_to
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Return To
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
    post:
      summary: Reset Submit
      description: 'Replace a password through a mailed secret, and sign the person in.


        A reset never writes a FIRST password: xhostd refuses an account

        whose ``password_hash`` is NULL, because transient mailbox access to

        a Google-signup address would otherwise mint a credential that

        outlives that access. Adding a first password takes a live console

        session, on ``/account#password``.'
      operationId: reset_submit_auth_reset_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_reset_submit_auth_reset_post'
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
  /auth/confirm-email:
    get:
      summary: Confirm Email Page
      description: The page the confirmation mail links to. It reads and never writes.
      operationId: confirm_email_page_auth_confirm_email_get
      parameters:
      - name: token
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
    post:
      summary: Confirm Email Submit
      description: 'Bind the address the link names, on the person''s click.


        A submission with no usable form state confirms nothing: the page

        renders the preview again with fresh state, and one more click

        confirms. A dead link renders the one gone line, and a refusal

        xhostd worded, such as an address another account holds, reaches the

        reader through :func:`_auth_error`.'
      operationId: confirm_email_submit_auth_confirm_email_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_confirm_email_submit_auth_confirm_email_post'
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Auth
components:
  schemas:
    SshKeyLoginResponse:
      properties:
        token:
          type: string
          title: Token
        token_expires_at:
          type: string
          format: date-time
          title: Token Expires At
        user_id:
          type: string
          format: uuid
          title: User Id
        username:
          type: string
          title: Username
      type: object
      required:
      - token
      - token_expires_at
      - user_id
      - username
      title: SshKeyLoginResponse
    SshKeyLoginRequest:
      properties:
        public_key:
          type: string
          title: Public Key
        timestamp:
          type: integer
          title: Timestamp
        signature:
          type: string
          title: Signature
      additionalProperties: false
      type: object
      required:
      - public_key
      - timestamp
      - signature
      title: SshKeyLoginRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Body_signup_submit_auth_signup_post:
      properties:
        email:
          type: string
          title: Email
          default: ''
        state:
          type: string
          title: State
          default: ''
      type: object
      title: Body_signup_submit_auth_signup_post
    Body_forgot_submit_auth_forgot_post:
      properties:
        identifier:
          type: string
          title: Identifier
          default: ''
        state:
          type: string
          title: State
          default: ''
      type: object
      title: Body_forgot_submit_auth_forgot_post
    Body_login_submit_auth_login_post:
      properties:
        identifier:
          type: string
          title: Identifier
          default: ''
        password:
          type: string
          title: Password
          default: ''
        state:
          type: string
          title: State
          default: ''
      type: object
      title: Body_login_submit_auth_login_post
    Body_confirm_email_submit_auth_confirm_email_post:
      properties:
        token:
          type: string
          title: Token
          default: ''
        state:
          type: string
          title: State
          default: ''
      type: object
      title: Body_confirm_email_submit_auth_confirm_email_post
    Body_signup_complete_submit_auth_signup_complete_post:
      properties:
        token:
          type: string
          title: Token
          default: ''
        username:
          type: string
          title: Username
          default: ''
        password:
          type: string
          title: Password
          default: ''
        state:
          type: string
          title: State
          default: ''
      type: object
      title: Body_signup_complete_submit_auth_signup_complete_post
    Body_reset_submit_auth_reset_post:
      properties:
        token:
          type: string
          title: Token
          default: ''
        password:
          type: string
          title: Password
          default: ''
        state:
          type: string
          title: State
          default: ''
      type: object
      title: Body_reset_submit_auth_reset_post
x-refined-from:
- api.xhostd.com-openapi.json
- console.xhostd.com-openapi.json