> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdial.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Required inputs for a schema

> Returns the input keys required and optionally accepted to submit a request against this schema. Field names are returned verbatim. Use them as the keys of the `inputs` object on `POST /v1/requests`. Lists are sorted. This is the baseline: if your account is enabled for per-payer required inputs, some payers require additional fields not listed here, reported as `INVALID_INPUTS` on `POST /v1/requests`.



## OpenAPI

````yaml /openapi.json get /v1/schemas/{schemaId}/required-inputs
openapi: 3.0.0
info:
  description: SuperDial REST API Reference
  version: 1.0.0
  title: SuperDial API
servers:
  - url: https://robodialer-service-api-9nc4t1p9.uc.gateway.dev
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      SuperDial employs Bearer Authentication. Fetch a bearer token using your
      API Key and API Secret, then pass it as `Authorization: Bearer <token>` on
      subsequent calls.
  - name: Requests
    description: >-
      Endpoints for creating and reading requests (structured data extraction
      jobs). All non-2xx responses use the uniform `{error, message, [details]}`
      envelope (see the `ApiError` schema).
  - name: Schemas
    description: >-
      Discover the schemas provisioned for your account and the required input
      keys for each. All non-2xx responses use the uniform `{error, message,
      [details]}` envelope (see the `ApiError` schema).
paths:
  /v1/schemas/{schemaId}/required-inputs:
    get:
      tags:
        - Schemas
      summary: Required inputs for a schema
      description: >-
        Returns the input keys required and optionally accepted to submit a
        request against this schema. Field names are returned verbatim. Use them
        as the keys of the `inputs` object on `POST /v1/requests`. Lists are
        sorted. This is the baseline: if your account is enabled for per-payer
        required inputs, some payers require additional fields not listed here,
        reported as `INVALID_INPUTS` on `POST /v1/requests`.
      parameters:
        - name: schemaId
          in: path
          required: true
          schema:
            type: string
          description: >-
            The schema ID (from `GET /v1/schemas`). Must be non-blank, ≤1500
            characters, contain no `/`, and must not start with `_` or `.`.
      responses:
        '200':
          description: Sorted list of required input field names for this schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequiredInputsResponse'
              example:
                schemaId: fWxzG4nqtpHsJxS5Lm3q
                requiredInputs:
                  fields:
                    - beginningDateOfService
                    - billingProviderName
                    - billingProviderTaxId
                    - claimChargeAmount
                    - memberId
                    - patientDateOfBirth
                    - patientFirstName
                    - patientLastName
                    - payerName
                    - phoneNumber
                    - renderingProviderName
                    - renderingProviderNpi
                optionalInputs:
                  fields:
                    - memberId2
        '400':
          description: >-
            Invalid `schemaId` path parameter (empty, contains `/`, starts with
            `_` or `.`, or exceeds 1500 characters).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error: INVALID_REQUEST
                message: The provided schemaId is invalid.
        '401':
          description: >-
            Unauthorized: enforced by the API gateway. Returned when the
            `Authorization: Bearer <token>` header is missing, malformed, or the
            token is invalid/expired.
          headers:
            WWW-Authenticate:
              description: Bearer realm and (when applicable) error code per RFC 6750.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
              examples:
                missingAuth:
                  summary: No Authorization header
                  value:
                    code: 401
                    message: Jwt is missing
        '404':
          description: Schema not found, or account not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                schemaNotFound:
                  summary: >-
                    Schema not found, or has been retired and is no longer
                    available for new requests
                  value:
                    error: SCHEMA_NOT_FOUND
                    message: No schema with that ID exists for your account.
                accountNotFound:
                  summary: >-
                    The API key resolves to an account that no longer exists.
                    Rare: wrong-API-key cases hit `INVALID_API_KEY` at
                    `/v1/auth` first.
                  value:
                    error: ACCOUNT_NOT_FOUND
                    message: >-
                      No account is associated with this API key. Contact
                      support if you believe this is an error.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error: INTERNAL_ERROR
                message: >-
                  An internal error occurred. Please try again or contact
                  support if the problem persists.
      security:
        - bearerAuth: []
components:
  schemas:
    RequiredInputsResponse:
      type: object
      description: >-
        Success response from `GET /v1/schemas/{schemaId}/required-inputs`.
        Carries both required and optional input field lists; the two are
        disjoint: if a name is required by any source, it appears only in
        `requiredInputs.fields`.
      required:
        - schemaId
        - requiredInputs
        - optionalInputs
      properties:
        schemaId:
          type: string
          description: Echoes the path parameter.
        requiredInputs:
          type: object
          required:
            - fields
          properties:
            fields:
              type: array
              items:
                type: string
              description: >-
                Sorted list of required input field names. Use these as the keys
                of the `inputs` object on `POST /v1/requests`. Returned
                verbatim: the names are exactly what the request validator
                expects. This is the baseline; with per-payer required inputs
                enabled, some payers require additional fields not listed here.
        optionalInputs:
          type: object
          required:
            - fields
          properties:
            fields:
              type: array
              items:
                type: string
              description: >-
                Sorted list of optional input field names, accepted but not
                required by `POST /v1/requests`. Disjoint from
                `requiredInputs.fields`.
    ApiError:
      type: object
      description: >-
        Uniform error envelope returned by every non-2xx response from
        `/v1/requests` and `/v1/schemas`. The `error` field is a stable
        machine-readable code; the `message` field is a human-readable
        description safe to surface to end users; `details` (optional) carries
        the structured `missingInputs` / `invalidInputs` block on the
        `INVALID_INPUTS` path. Unmatched paths and unsupported HTTP methods fall
        back to the framework's default response (typically HTML); use a
        documented endpoint and method to receive this envelope.
      required:
        - error
        - message
      properties:
        error:
          type: string
          enum:
            - INVALID_REQUEST
            - INVALID_INPUTS
            - PAYER_NOT_FOUND
            - ACCOUNT_NOT_FOUND
            - SCHEMA_NOT_FOUND
            - REQUEST_NOT_FOUND
            - INTERNAL_ERROR
            - PAYER_LOOKUP_FAILURE
            - PAYER_REQUIRED_INPUTS_DISABLED
          description: >-
            Machine-readable error code for the HTTP envelope. See [Creating a
            Request → Error handling](/guides/creating-a-request#error-handling)
            for what each code means, when it fires, and how to handle it.
        message:
          type: string
          description: >-
            Human-readable error description. Never contains stack traces or
            internal identifiers.
        details:
          type: object
          description: >-
            **Optional.** Currently set only for `INVALID_INPUTS`, where it
            contains `missingInputs` (array of field names) and/or
            `invalidInputs` (object mapping field name to reason). See the
            [Input Validation](/guides/input-validation) guide for the full set
            of rules behind these reasons.
          properties:
            missingInputs:
              type: array
              description: >-
                Field names that were required but absent, null, or
                empty/whitespace-only.
              items:
                type: string
            invalidInputs:
              type: object
              description: >-
                Maps each rejected field name to a human-readable reason (e.g.
                `phoneNumber is not a valid U.S. phone number`,
                `claimChargeAmount is scientific notation`, `memberId contains
                invalid characters (curly braces)`, or a member-ID structure
                message).
              additionalProperties:
                type: string
    GatewayErrorResponse:
      type: object
      description: >-
        Error envelope returned by the API Gateway for auth failures and routing
        errors. Distinct from the service's own `ApiError` envelope: gateway
        responses use `{code, message}` because they're produced before the
        request reaches the service.
      properties:
        code:
          type: integer
          description: HTTP status code, repeated in the body.
          example: 401
        message:
          type: string
          description: Human-readable error message from the gateway.
          example: Jwt is missing
      required:
        - code
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained from the /v1/auth endpoint

````