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

# Create a destination

> Create a new destination



## OpenAPI

````yaml post /v2/destinations
openapi: 3.1.0
info:
  title: The Portable API
  description: This API allows you to interact with the Portable platform.
  version: 0.0.1
servers:
  - url: https://api.portable.io
security:
  - bearerAuth: []
paths:
  /v2/destinations:
    post:
      tags:
        - Destinations
      summary: Create a destination
      description: Create a new destination
      operationId: createDestination
      requestBody:
        description: Destination to create
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  type: string
                  description: A human-readable name for the destination
                  x-order: 1
                destinationSpec:
                  type: string
                  description: The name of the destination spec to create a destination for
                  x-order: 2
                properties:
                  $ref: '#/components/schemas/PropertyInput'
                  x-order: 3
              required:
                - destinationSpec
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Destination'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  schemas:
    PropertyInput:
      type: object
      additionalProperties:
        type: string
        x-go-type: any
    Destination:
      type: object
      required:
        - id
        - destinationSpec
      properties:
        id:
          type: integer
          format: int
          readOnly: true
          x-go-type-skip-optional-pointer: true
          x-order: 1
        displayName:
          type: string
          description: A human-readable name for the destination
          x-go-type-skip-optional-pointer: true
          x-order: 2
        destinationSpec:
          $ref: '#/components/schemas/DestinationSpec'
          x-order: 3
        properties:
          $ref: '#/components/schemas/PropertyInput'
          description: >
            The properties of the destination. This is a map of property names
            to their values. The names are defined in the `propertyDefinitions`
            field of the destination spec.
          x-order: 4
        createdAt:
          type: string
          format: date-time
          readOnly: true
          description: The timestamp marking when the destination was created
          x-go-type-skip-optional-pointer: true
          x-order: 5
        updatedAt:
          type: string
          format: date-time
          readOnly: true
          description: The timestamp marking when the destination was last updated
          x-go-type-skip-optional-pointer: true
          x-order: 6
    DestinationSpec:
      allOf:
        - $ref: '#/components/schemas/DestinationSpecSummary'
        - type: object
          properties:
            instructions:
              type: string
              readOnly: true
              x-go-type-skip-optional-pointer: true
              x-order: 6
            propertyDefinitions:
              type: array
              items:
                $ref: '#/components/schemas/PropertyDefinition'
              readOnly: true
              x-go-type-skip-optional-pointer: true
              x-go-type: '[]*native.PropDef'
              x-order: 7
    DestinationSpecSummary:
      type: object
      properties:
        name:
          type: string
          description: The name of the destination spec
          x-go-type-skip-optional-pointer: true
          x-order: 1
        displayName:
          type: string
          description: A human-readable name for the destination spec
          x-go-type-skip-optional-pointer: true
          x-order: 2
        website:
          type: string
          description: The website of the destination spec
          x-go-type-skip-optional-pointer: true
          x-order: 3
        tagLine:
          type: string
          description: A one line description of the destination spec
          x-go-type-skip-optional-pointer: true
          x-order: 4
        lifecycle:
          type: string
          enum:
            - ALPHA
            - BETA
            - STABLE
            - DEPRECATED
          readOnly: true
          x-go-type-skip-optional-pointer: true
          x-order: 5
    PropertyDefinition:
      type: object
      required:
        - name
        - type
        - required
      x-go-type-import:
        path: github.com/portable-io/portable/model/native
      x-go-type: native.PropDef
      properties:
        name:
          type: string
          description: A machine-readable name for the property
          x-order: 1
        displayName:
          type: string
          description: A human-readable name for the property
          x-go-type-skip-optional-pointer: true
          x-order: 2
        type:
          type: string
          description: The type of the property
          x-order: 3
          enum:
            - STRING
            - PASSWORD
            - TEXT
            - NUMBER
            - BOOLEAN
            - DATE
            - DATETIME
            - TIME
        required:
          type: boolean
          description: Whether the property's value is required
          x-order: 4
        description:
          type: string
          description: A human-readable description of the property
          x-go-type-skip-optional-pointer: true
          x-order: 5
  responses:
    BadRequestError:
      description: Bad Request - The request is malformed.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            examples:
              - message: Bad Request
    UnauthorizedError:
      description: Unauthorized - No valid API key provided.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            examples:
              - message: Unauthorized
    ForbiddenError:
      description: Forbidden - You don't have enough permissions to access this resource.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            examples:
              - message: Your current plan does not support this feature
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````