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

# Create a new plugin

> Creates a new plugin with the specified plugin details.



## OpenAPI

````yaml /openapi.json post /plugins
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /plugins:
    post:
      tags:
        - Plugins
      summary: Create a new plugin
      description: Creates a new plugin with the specified plugin details.
      operationId: CreatePluginAsync
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PluginDto'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PluginDto'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PluginDto'
      responses:
        '202':
          description: When request is accepted. Returns a 'Link' object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            When the authenticated account does not have access to create
            plugins.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When required resources are not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    PluginDto:
      type: object
      properties:
        externalId:
          type: string
          description: Optional id provided by the external system that owns this plugin.
          nullable: true
        application:
          allOf:
            - $ref: '#/components/schemas/PluginApplication'
          description: The application that the plugin should be rendered in.
        type:
          allOf:
            - $ref: '#/components/schemas/PluginType'
          description: The type of component the plugin should represent.
        version:
          allOf:
            - $ref: '#/components/schemas/PluginVersionDto'
          description: Current version of the plugin.
          nullable: true
        key:
          type: string
          description: "Signing key of the plugin to verify integrity of requesting secure URLs.\r\nOnly available to set on Plugin creation."
          nullable: true
        additionalData:
          type: object
          additionalProperties: {}
          description: >-
            Collection of KeyValuePair(string, object) to update Plugin meta
            data.
          nullable: true
      additionalProperties: false
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    PluginApplication:
      enum:
        - Native
        - Web
        - Archie
      type: string
      description: The application that the plugin should be rendered in.
    PluginType:
      enum:
        - Button
        - Tab
      type: string
      description: The type of component the plugin should represent.
    PluginVersionDto:
      type: object
      properties:
        name:
          type: string
          description: The name of the plugin.
          nullable: true
        description:
          type: string
          description: A description of the plugin.
          nullable: true
        placement:
          type: string
          description: "A placement key representing where the plugin should be rendered in the UI.\r\n\r\nPlacement key must correspond to the type of the plugin.\r\n\r\nRefer to documentation for valid placement keys."
          nullable: true
        requestEndpointUrl:
          type: string
          description: "The url that is called to request the plugin endpoint.\r\n\r\nWhen a user views a plugin, we request the url to view securely through your backend.\r\n\r\nMatter and user information is passed to the endpoint through POST body, and the endpoint is expected to return a JSON object containing a url field.\r\nThe plugin will then load the URL and display it to the user."
          nullable: true
        attributes:
          allOf:
            - $ref: '#/components/schemas/PluginAttributes'
          description: Visual attributes associated to this plugin.
          nullable: true
        availability:
          allOf:
            - $ref: '#/components/schemas/PluginAvailability'
          description: Optional settings for determining the availability of a plugin.
          nullable: true
      additionalProperties: false
    PluginAttributes:
      type: object
      properties:
        text:
          type: string
          description: The text to be rendered on the plugin component (where applicable).
          nullable: true
        icon:
          type: string
          description: "The Icon to be rendered on the plugin component (where applicable).\r\nRefer to documentation for a full list of icons."
          nullable: true
        color:
          type: string
          description: >-
            The hex color code to be rendered on the plugin component (where
            applicable).
          nullable: true
        tooltip:
          type: string
          description: >-
            Optional: The tooltip to display on component hover (where
            applicable).
          nullable: true
        page:
          allOf:
            - $ref: '#/components/schemas/PluginPage'
          description: Page attributes for the plugin (where applicable).
          nullable: true
      additionalProperties: false
    PluginAvailability:
      type: object
      properties:
        matterTypeIds:
          type: array
          items:
            type: string
          description: "Optional matter types applicable for the plugin.\r\n\r\nPlugin is applicable for all matter types if this is left empty."
          nullable: true
      additionalProperties: false
    PluginPage:
      type: object
      properties:
        title:
          type: string
          description: "Optional: The title of the page rendered by the plugin (where applicable).\r\nIf not specified, the name of the plugin will be used."
          nullable: true
        width:
          type: integer
          description: "Optional: The width of the page rendered by the plugin (where applicable).\r\nIf not specified, a default width will be used."
          format: int32
        height:
          type: integer
          description: "Optional: The height of the page rendered by the plugin (where applicable).\r\nIf not specified, a default width will be used."
          format: int32
        useDefaultBrowser:
          type: boolean
          description: "Optional: Override browser behavior.\r\nWhen true, loads the endpoint in the internal browser (where applicable)."
      additionalProperties: false
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````