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

# Create load balancer destination

> Add a new destination to a load balancer. The destination starts enabled and will immediately begin receiving traffic according to the load balancer routing type.



## OpenAPI

````yaml https://api.sevalla.com/v3/openapi.json post /load-balancers/{id}/destinations
openapi: 3.1.0
info:
  title: Sevalla API docs
  version: 1.0.0
servers:
  - url: https://api.sevalla.com/v3
security:
  - bearerAuth: []
paths:
  /load-balancers/{id}/destinations:
    post:
      tags:
        - Load balancers
      summary: Create load balancer destination
      description: >-
        Add a new destination to a load balancer. The destination starts enabled
        and will immediately begin receiving traffic according to the load
        balancer routing type.
      operationId: createLoadBalancerDestinationV3
      parameters:
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            example: fb5e5168-4281-4bec-94c5-0d1584e9e657
          in: path
          name: id
          required: true
          description: Load balancer identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                service_id:
                  description: >-
                    Identifier of the backing service. Required for APP,
                    STATIC_SITE, OBJECT_STORAGE, and LOAD_BALANCER types. Must
                    not be set for EXTERNAL type.
                  example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                  type: string
                  minLength: 1
                service_type:
                  type: string
                  enum:
                    - APP
                    - STATIC_SITE
                    - OBJECT_STORAGE
                    - EXTERNAL
                    - LOAD_BALANCER
                  description: >-
                    Type of the backing service. `APP` - application.
                    `STATIC_SITE` - static site. `OBJECT_STORAGE` - object
                    storage bucket. `EXTERNAL` - external URL. `LOAD_BALANCER` -
                    nested load balancer.
                  example: APP
                weight:
                  description: >-
                    Traffic weight for weighted routing. Higher values receive
                    proportionally more traffic.
                  example: 100
                  type: integer
                  minimum: 0
                  maximum: 10000
                url:
                  description: External URL, required when service_type is EXTERNAL
                  example: https://example.com
                  type: string
                latitude:
                  description: Geographic latitude for GEO routing
                  example: 37.7749
                  type: number
                  minimum: -90
                  maximum: 90
                longitude:
                  description: Geographic longitude for GEO routing
                  example: -122.4194
                  type: number
                  minimum: -180
                  maximum: 180
              required:
                - service_type
              additionalProperties: false
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    description: Unique identifier for the destination
                    example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                  service_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Identifier of the backing service for this destination.
                      Null for EXTERNAL type destinations.
                    example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                  service_type:
                    type: string
                    enum:
                      - APP
                      - STATIC_SITE
                      - OBJECT_STORAGE
                      - EXTERNAL
                      - LOAD_BALANCER
                    description: >-
                      Type of the backing service. `APP` - application.
                      `STATIC_SITE` - static site. `OBJECT_STORAGE` - object
                      storage bucket. `EXTERNAL` - external URL. `LOAD_BALANCER`
                      - nested load balancer.
                    example: APP
                  is_enabled:
                    type: boolean
                    description: Whether this destination is currently receiving traffic
                    example: true
                  weight:
                    anyOf:
                      - type: integer
                        minimum: 0
                        maximum: 10000
                      - type: 'null'
                    description: >-
                      Traffic weight for weighted routing. Higher values receive
                      proportionally more traffic.
                    example: 100
                  url:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: External URL for EXTERNAL service type destinations
                    example: null
                  latitude:
                    anyOf:
                      - type: number
                        minimum: -90
                        maximum: 90
                      - type: 'null'
                    description: Geographic latitude for GEO routing
                    example: null
                  longitude:
                    anyOf:
                      - type: number
                        minimum: -180
                        maximum: 180
                      - type: 'null'
                    description: Geographic longitude for GEO routing
                    example: null
                  created_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    description: >-
                      Timestamp when the destination was created, in ISO 8601
                      format
                    example: '2025-01-30T00:00:00.000Z'
                  updated_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    description: >-
                      Timestamp when the destination was last modified, in ISO
                      8601 format
                    example: '2025-01-30T00:00:00.000Z'
                required:
                  - id
                  - service_id
                  - service_type
                  - is_enabled
                  - weight
                  - url
                  - latitude
                  - longitude
                  - created_at
                  - updated_at
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Bad request
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 400
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 401
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 403
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not found
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 404
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Too many requests
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 429
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 500
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Pass your API key as a Bearer token in the
        Authorization header.

````