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

# Update a trunk endpoint



## OpenAPI

````yaml /openapi.json patch /v1/trunks/{trunk_id}/endpoints/{endpoint_id}
openapi: 3.1.0
info:
  title: Leamout API
  version: 1.0.0
  description: The Leamout API for programmable communications.
servers:
  - url: https://api.leamout.com
security:
  - BearerAuth: []
tags:
  - name: Voice applications
    description: Programmable voice applications and inbound bindings.
  - name: Calls
    description: Durable calls and live call control.
  - name: SIP domains
    description: Organization-owned SIP namespaces.
  - name: SIP subscribers
    description: SIP identities and credentials.
  - name: Carrier providers
    description: Carrier provider definitions available to connections.
  - name: Carrier connections
    description: >-
      Organization carrier relationships, authentication, policy, and
      validation.
  - name: Trunks
    description: BYOC and managed SIP trunks and their physical endpoints.
  - name: Numbers
    description: BYOC and managed phone-number resources.
  - name: Recordings
    description: Call recording metadata and playback.
  - name: Conferences
    description: Conference resources and participant controls.
  - name: Realtime
    description: Short-lived realtime/WebRTC credentials.
  - name: Webhooks
    description: Webhook endpoints, secrets, tests, deliveries, and retries.
paths:
  /v1/trunks/{trunk_id}/endpoints/{endpoint_id}:
    parameters:
      - $ref: '#/components/parameters/TrunkId'
      - $ref: '#/components/parameters/EndpointId'
    patch:
      tags:
        - Trunks
      summary: Update a trunk endpoint
      operationId: updateTrunkEndpoint
      requestBody:
        $ref: '#/components/requestBodies/TrunkEndpointUpdate'
      responses:
        '200':
          description: Endpoint updated
components:
  parameters:
    TrunkId:
      name: trunk_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    EndpointId:
      name: endpoint_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  requestBodies:
    TrunkEndpointUpdate:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TrunkEndpointUpdate'
  schemas:
    TrunkEndpointUpdate:
      type: object
      properties:
        host:
          type: string
        port:
          type: integer
        transport:
          type: string
        direction:
          type: string
        priority:
          type: integer
        weight:
          type: integer
        enabled:
          type: boolean
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Organization credential
      description: Organization bearer credential beginning with lm_org_.

````