XRHealth Auth API

The Auth API from XRHealth — 8 operation(s) for auth.

Operations 8

POST /auth/passwordless/start Send a one-time patient login code #
POST /auth/passwordless/verify Exchange a one-time code for XRHealth tokens #
POST /auth/public/passwordless/start Start passwordless login for a registered public client #
POST /auth/public/passwordless/verify Exchange a passwordless code for a short-lived PKCE authorization code #
POST /auth/public/token Exchange a PKCE authorization code or rotate a public-client refresh token #
POST /auth/public/token/revoke Revoke a public-client refresh token #
POST /auth/token/refresh Rotate a patient refresh token #
POST /auth/token/revoke Revoke a patient refresh token #

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/xrhealth-auth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

xrhealth-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: XRHealth Platform Auth API
  version: 1.0.0
  description: Common API for XRHealth applications and approved integrations.
servers:
- url: /v1
tags:
- name: Auth
paths:
  /auth/passwordless/start:
    post:
      operationId: startPatientPasswordlessLogin
      summary: Send a one-time patient login code
      security:
      - applicationToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasswordlessStartRequest'
      responses:
        '202':
          description: A code request was accepted.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
  /auth/passwordless/verify:
    post:
      operationId: verifyPatientPasswordlessLogin
      summary: Exchange a one-time code for XRHealth tokens
      security:
      - applicationToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasswordlessVerifyRequest'
      responses:
        '200':
          description: XRHealth access and refresh tokens.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
  /auth/public/passwordless/start:
    post:
      operationId: startPublicPatientPasswordlessLogin
      summary: Start passwordless login for a registered public client
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicPasswordlessStartRequest'
      responses:
        '202':
          description: A code request was accepted.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
  /auth/public/passwordless/verify:
    post:
      operationId: verifyPublicPatientPasswordlessLogin
      summary: Exchange a passwordless code for a short-lived PKCE authorization code
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicPasswordlessVerifyRequest'
      responses:
        '200':
          description: A one-time authorization code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationCodeResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
  /auth/public/token:
    post:
      operationId: exchangePublicPatientToken
      summary: Exchange a PKCE authorization code or rotate a public-client refresh token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicTokenRequest'
      responses:
        '200':
          description: XRHealth access and refresh tokens.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
  /auth/public/token/revoke:
    post:
      operationId: revokePublicPatientToken
      summary: Revoke a public-client refresh token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicTokenRevokeRequest'
      responses:
        '200':
          description: The refresh token is no longer usable.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
  /auth/token/refresh:
    post:
      operationId: refreshPatientToken
      summary: Rotate a patient refresh token
      security:
      - applicationToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenRequest'
      responses:
        '200':
          description: Rotated XRHealth tokens.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
  /auth/token/revoke:
    post:
      operationId: revokePatientToken
      summary: Revoke a patient refresh token
      security:
      - applicationToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenRequest'
      responses:
        '200':
          description: The refresh token is no longer usable.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/Unavailable'
      tags:
      - Auth
components:
  responses:
    RateLimited:
      description: The request was rate limited.
    Unavailable:
      description: The authentication module is temporarily unavailable.
    Unauthorized:
      description: The application or patient token is invalid.
    Forbidden:
      description: The token does not have access to this resource.
    BadRequest:
      description: The request is invalid.
  schemas:
    PublicPasswordlessStartRequest:
      type: object
      required:
      - client_id
      - email
      - code_challenge
      - code_challenge_method
      properties:
        client_id:
          type: string
          minLength: 8
          maxLength: 128
        email:
          type: string
          format: email
        code_challenge:
          type: string
          minLength: 43
          maxLength: 128
        code_challenge_method:
          type: string
          enum:
          - S256
      additionalProperties: false
    PublicPasswordlessVerifyRequest:
      type: object
      required:
      - client_id
      - request_id
      - email
      - code
      properties:
        client_id:
          type: string
          minLength: 8
          maxLength: 128
        request_id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        code:
          type: string
          pattern: ^\d{4,8}$
      additionalProperties: false
    PasswordlessVerifyRequest:
      type: object
      required:
      - request_id
      - email
      - code
      properties:
        request_id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        code:
          type: string
          pattern: ^\d{4,8}$
      additionalProperties: false
    RefreshTokenRequest:
      type: object
      required:
      - refresh_token
      properties:
        refresh_token:
          type: string
          minLength: 16
      additionalProperties: false
    PublicTokenRequest:
      type: object
      required:
      - client_id
      - grant_type
      properties:
        client_id:
          type: string
          minLength: 8
          maxLength: 128
        grant_type:
          type: string
          enum:
          - authorization_code
          - refresh_token
        authorization_code:
          type: string
          minLength: 16
        code_verifier:
          type: string
          minLength: 43
          maxLength: 128
        refresh_token:
          type: string
          minLength: 16
      additionalProperties: false
    TokenResponse:
      type: object
      required:
      - token_type
      - access_token
      - expires_in
      - refresh_token
      - refresh_token_expires_in
      - subject
      - scope
      properties:
        token_type:
          type: string
          enum:
          - Bearer
        access_token:
          type: string
        expires_in:
          type: integer
          example: 900
        refresh_token:
          type: string
        refresh_token_expires_in:
          type: integer
          example: 2592000
        subject:
          type: string
          description: Opaque public patient subject.
        scope:
          type: string
          example: patient:login patient:read
    PublicTokenRevokeRequest:
      type: object
      required:
      - client_id
      - refresh_token
      properties:
        client_id:
          type: string
          minLength: 8
          maxLength: 128
        refresh_token:
          type: string
          minLength: 16
      additionalProperties: false
    AuthorizationCodeResponse:
      type: object
      required:
      - authorization_code
      - expires_in
      properties:
        authorization_code:
          type: string
        expires_in:
          type: integer
          example: 60
    PasswordlessStartRequest:
      type: object
      required:
      - email
      properties:
        email:
          type: string
          format: email
      additionalProperties: false
  securitySchemes:
    applicationToken:
      type: apiKey
      in: header
      name: X-XRHealth-Application-Token
    patientBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT