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

# Post organisations schemas

> Create a new schema, which can be used to create an App and in the future be used to reconfigure an existing App.



## OpenAPI

````yaml post /organisations/{organisationId}/schemas
openapi: 3.0.3
info:
  title: Switchboard API
  description: >-
    The Switchboard API provides users the ability to manage their Apps,
    Integrations and Workflows
  version: 0.0.1-alpha.0
servers:
  - url: https://platform.versori.com/api/switchboard/v1alpha1/
    description: Production server
  - url: http://localhost:8080/v1alpha1/
    description: Localhost
security:
  - apiKey: []
paths:
  /organisations/{organisationId}/schemas:
    post:
      tags:
        - schemas
      description: >-
        Create a new schema, which can be used to create an App and in the
        future be used to reconfigure an existing App.
      operationId: CreateSchema
      parameters:
        - name: organisationId
          in: path
          required: true
          schema:
            type: string
          examples:
            postman:
              summary: Use as a variable in a Postman request
              value: '{{organisationId}}'
      requestBody:
        $ref: '#/components/requestBodies/CreateSchemaRequest'
      responses:
        '200':
          $ref: '#/components/responses/CreateSchemaSyncResponse'
        '201':
          $ref: '#/components/responses/CreateSchemaAsyncResponse'
components:
  requestBodies:
    CreateSchemaRequest:
      description: CreateSchemaRequest is the request body for creating a new Schema.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SchemaCreate'
  responses:
    CreateSchemaSyncResponse:
      description: >
        CreateSchemaSyncResponse is the response definition after creating a
        schema synchronously.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Schema'
    CreateSchemaAsyncResponse:
      description: >
        CreateSchemaAsyncResponse is the response definition after creating a
        schema asynchronously.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SchemaImportJob'
  schemas:
    SchemaCreate:
      description: SchemaCreate is the request body for creating a new schema.
      type: object
      properties:
        url:
          description: >-
            URL is the address where the schema file is hosted. This may be an
            externally accessible http(s):// URL, or a gs:// URL which
            Switchboard is granted access to.
          type: string
        type:
          description: >-
            Type is the schema type being created. The only type currently
            supported is "openapi".
          type: string
        async:
          description: >-
            Async is a flag to indicate whether the schema should be created
            asynchronously. This will result in a 201 Accepted response for
            which the response body will be different to the regular synchronous
            response.
          type: boolean
      required:
        - url
        - type
    Schema:
      type: object
      properties:
        id:
          type: string
        type:
          description: >
            Type denotes the type of schema the corresponding App is backed by.
            Currently the only supported value is

            "openapi", but other types such as "soap", "graphql" and "grpc" are
            on the roadmap.
          type: string
        version:
          description: >
            Version denotes the version of the schema specification. This
            property is contextual based on the schema

            type, for example openapi schemas will contain the OpenAPI
            specification version (currently only 3.0.x is

            supported), but `grpc` APIs could be "proto2" or "proto3".
          type: string
        sourceUrl:
          description: >
            URL is the private address for accessing the schema. This is not
            guaranteed to be publicly accessible and

            could be a non-HTTP protocol (i.e. gs:// or s3://)
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
      required:
        - id
        - type
        - version
        - sourceUrl
        - createdAt
        - updatedAt
    SchemaImportJob:
      description: >-
        SchemaImportJob describes a asynchronous job which is importing a new
        schema.
      type: object
      properties:
        id:
          description: ID is the unique identifier of the job.
          type: string
        schema_id:
          description: >-
            SchemaID is the ID of the schema being imported. Performing a
            request to GetSchema with this ID before the job is completed will
            result in a 404 response.
          type: string
        status:
          description: >-
            Status denotes the current status of the job.

            This enum may have values added in minor version increments, which
            can break backwards compatability in languages which are implement
            strongly-typed enums. To overcome this, if a consumer receives a
            value which it is not aware of, it should be treated as if it was
            received as "Unknown".
          type: string
          enum:
            - Unknown
            - Pending
            - Success
            - Failed
        messages:
          description: Messages contains a list of messages to be presented to the user
          type: array
          items:
            $ref: '#/components/schemas/SchemaImportJobMessage'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        completedAt:
          description: >-
            CompletedAt is the time at which the job was either marked as status
            "Success" or "Failure".
          type: string
          format: date-time
      required:
        - id
        - schema_id
        - status
        - messages
        - createdAt
        - updatedAt
    SchemaImportJobMessage:
      description: >-
        SchemaImportJobMessage represents a message to be presented to the user
        during a schema import job.
      type: object
      properties:
        text:
          description: Text is the message to be presented to the user.
          type: string
        type:
          description: >-
            Type denotes the type of message, one of "info", "warning" or
            "error".
          type: string
        timestamp:
          description: Timestamp is the time at which the message was created.
          type: string
          format: date-time
      required:
        - text
        - type
        - timestamp
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization

````