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

# Create an application

> Registers a new AI application in your Trusys workspace.

Use the returned `id` in all subsequent calls for monitoring, evaluations, and guardrails. Application names must be unique within your project.

This creates a minimal application record with no connected model provider — use it when your application sends its own traces via the API (`POST /evaluations`) rather than being called directly by Trusys. If you need Trusys to actively call your model (for example, for security red-teaming that generates its own test prompts), connect a Custom Provider in the Trusys UI instead.



## OpenAPI

````yaml /openapi.json post /applications
openapi: 3.0.0
info:
  title: Trusys API
  version: 1.0.0
  description: >-
    Programmatic access to Trusys for integrating AI quality monitoring,
    evaluation, and guardrails into your own systems — without using the Trusys
    UI.


    **Typical integration flow**


    1. `POST /applications` — register your application and get an id.

    2. `PUT /applications/{id}/monitoring` and/or `PUT
    /applications/{id}/guardrails` — configure which metrics, security plugins,
    and guardrails apply.

    3. `POST /applications/{id}/evaluations` — submit prompt/response traces to
    be scored as your application runs.

    4. `GET /applications/{id}/traces`, `GET /applications/{id}/evaluations`,
    and `POST /applications/{id}/widget-data` — pull results, trends, and
    dashboard-equivalent chart data back into your own tools.


    All requests require an `x-api-key` header (see Authentication). All
    timestamps are ISO 8601 UTC. Paginated endpoints default to 20 items per
    page (max 100).
servers:
  - url: https://app.trusys.ai/api/external
security:
  - ApiKeyAuth: []
paths:
  /applications:
    post:
      tags:
        - Applications
      summary: Create an application
      description: >-
        Registers a new AI application in your Trusys workspace.


        Use the returned `id` in all subsequent calls for monitoring,
        evaluations, and guardrails. Application names must be unique within
        your project.


        This creates a minimal application record with no connected model
        provider — use it when your application sends its own traces via the API
        (`POST /evaluations`) rather than being called directly by Trusys. If
        you need Trusys to actively call your model (for example, for security
        red-teaming that generates its own test prompts), connect a Custom
        Provider in the Trusys UI instead.
      operationId: createApplication
      requestBody:
        required: true
        description: Display name and optional description for the application.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApplicationRequest'
            example:
              name: Customer Support Bot
              description: Production chatbot for billing and account questions
      responses:
        '200':
          description: Application created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateApplicationResponse'
              example:
                success: true
                data:
                  id: 550e8400-e29b-41d4-a716-446655440000
                  createdAt: '2026-07-02T12:00:00.000Z'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: An application with the same name already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                message: Application with this name already exists.
components:
  schemas:
    CreateApplicationRequest:
      type: object
      additionalProperties: false
      description: Payload for registering a new application.
      required:
        - name
      properties:
        name:
          type: string
          minLength: 1
          description: Display name for the application. Must be unique.
          example: Customer Support Bot
        description:
          type: string
          description: Optional longer description of what this application does.
          example: Production chatbot for billing and account questions
    CreateApplicationResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Application UUID — use in all subsequent API calls.
            createdAt:
              type: string
              format: date-time
              description: When the application was created (UTC).
    ErrorResponse:
      type: object
      description: Standard error envelope for non-validation failures.
      properties:
        success:
          type: boolean
          example: false
          description: Always `false` for errors.
        message:
          type: string
          description: Human-readable explanation of the error.
      required:
        - success
        - message
    ValidationErrorResponse:
      type: object
      description: Returned when request body or query parameters fail validation.
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Invalid request body
          description: Summary of the validation failure.
        errors:
          type: array
          description: Per-field validation errors.
          items:
            type: object
            properties:
              path:
                type: string
                description: >-
                  JSON path to the invalid field (for example
                  `traces.0.prompt`).
              message:
                type: string
                description: Why the field failed validation.
  responses:
    ValidationError:
      description: >-
        The request body or query parameters are invalid. See the `errors` array
        for field-level detail.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            success: false
            message: Invalid request body
            errors:
              - path: name
                message: name is required
    Unauthorized:
      description: >-
        The API key is missing, invalid, or revoked. Verify the `x-api-key`
        header and that the key is active in Trusys settings.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Error while verifying api key
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Trusys API key. Create and manage keys in the Trusys UI under
        **Settings → API Keys**.


        Include the key on every request:


        ```

        x-api-key: <your-api-key>

        ```

````