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

# Create config

> Create a config, such as login credentials for a test user, so tests can use it. Check `list_configs` first to avoid duplicates.



## OpenAPI

````yaml /api-reference/api.json post /v1/configs
openapi: 3.0.0
info:
  title: QA.tech API
  version: 1.0.0
  contact:
    name: QA.tech
    url: https://qa.tech
    email: support@qa.tech
  description: API for triggering and managing AI-powered test runs
servers:
  - url: https://api.qa.tech
    description: Production
    variables: {}
security:
  - BearerAuth: []
tags:
  - name: Runs
  - name: Infrastructure
  - name: Test Cases
  - name: Application Builds
  - name: Status badge
  - name: Remote Tunnels
  - name: Chat
  - name: Applications
  - name: Features
  - name: Metrics
  - name: Projects
  - name: Knowledge
  - name: Rules
  - name: Configs
  - name: Labels
  - name: Issues
  - name: Todos
  - name: Automations
  - name: Test plans
paths:
  /v1/configs:
    post:
      tags:
        - Configs
      summary: Create config
      description: >-
        Create a config, such as login credentials for a test user, so tests can
        use it. Check `list_configs` first to avoid duplicates.
      operationId: CreateConfig
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConfigRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateConfigResponse'
components:
  schemas:
    CreateConfigRequest:
      type: object
      required:
        - name
        - type
        - data
      properties:
        name:
          type: string
          minLength: 2
          maxLength: 100
        description:
          type: string
          maxLength: 2000
          description: When to use this config, e.g. an admin user with billing access.
        type:
          $ref: '#/components/schemas/WritableConfigType'
        data:
          type: object
          additionalProperties: {}
          description: >-
            Values for the config type:

            - USERNAME_PASSWORD: `username`, `password`, optional
            `enableForBasicAuthentication` (boolean).

            - USERNAME_PASSWORD_2FA: `username`, `password`,
            `oneTimePasswordGoogleUri` (`otpauth://totp/...`).

            - EMAIL_PASSWORD: `password`. QA.tech generates an inbox email the
            agent can receive mail on; it is returned as `email`.

            - FIXED_EMAIL: none. QA.tech generates an inbox email, returned as
            `email`.

            - API_KEY: `apiKey`.

            - API_CALL: optional `url`, `method` (GET, POST, PUT, DELETE,
            PATCH), `headers` (object), `body` (string). At least one of url,
            headers or body.

            - CUSTOM_FIELDS: `fields`, an array of `{ key, value }` with unique
            keys.

            - ONE_TIME_USE_ITEMS: `items`, an array of strings. Each test run
            consumes one item.
        applicationShortId:
          allOf:
            - $ref: '#/components/schemas/ApplicationShortId'
          description: >-
            Limit the config to one application. Omit to make it available to
            every application.
        projectShortId:
          allOf:
            - $ref: '#/components/schemas/ProjectShortId'
          description: >-
            Target a specific project by its prefixed short ID
            (proj-slug_shortId or proj_shortId), as returned by the projects
            API. Required for organization-scoped API keys; project-scoped keys
            may only pass their own project's short ID.
    CreateConfigResponse:
      type: object
      required:
        - success
        - config
      properties:
        success:
          type: boolean
        config:
          $ref: '#/components/schemas/ProjectConfig'
        email:
          type: string
          description: >-
            Inbox address QA.tech generated for EMAIL_PASSWORD and FIXED_EMAIL
            configs.
    WritableConfigType:
      type: string
      enum:
        - USERNAME_PASSWORD
        - USERNAME_PASSWORD_2FA
        - EMAIL_PASSWORD
        - FIXED_EMAIL
        - API_KEY
        - API_CALL
        - CUSTOM_FIELDS
        - ONE_TIME_USE_ITEMS
      description: >-
        Config types that can be created and edited over the API. File, audio,
        video and SMS phone number configs are managed in the dashboard.
    ApplicationShortId:
      type: string
      pattern: ^app(-.+_.+|_.+)$
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    ProjectConfig:
      type: object
      required:
        - shortId
        - name
        - description
        - type
        - summary
        - applicationShortId
        - readOnly
        - createdAt
        - updatedAt
      properties:
        shortId:
          allOf:
            - $ref: '#/components/schemas/ConfigShortId'
          description: >-
            Config short id. Pass it in `configShortIds` when creating a test
            case so the agent can use this data.
        name:
          type: string
        description:
          type: string
          nullable: true
          description: >-
            When to use this config, e.g. which user role it represents. The
            assistant and test agent read this to pick the right config.
        type:
          type: string
          description: Config type, e.g. `USERNAME_PASSWORD` or `CUSTOM_FIELDS`.
        summary:
          type: string
          nullable: true
          description: >-
            Masked preview of the values, as shown in the dashboard. Passwords,
            keys and header values are never returned.
        applicationShortId:
          type: string
          allOf:
            - $ref: '#/components/schemas/ApplicationShortId'
          nullable: true
          description: >-
            Application the config is scoped to, or null when it is available to
            every application.
        readOnly:
          type: boolean
          description: >-
            System configs provided by QA.tech (such as the project inbox) are
            read-only.
        createdAt:
          type: string
        updatedAt:
          type: string
          nullable: true
    ConfigShortId:
      type: string
      pattern: ^cfg(-.+_.+|_.+)$
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.