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

# Create a telemetry destination

> Verify and save an OTLP destination for logs, metrics, or traces.



## OpenAPI

````yaml https://api.alpic.ai/openapi.json post /v1/environments/{environmentId}/telemetry-destinations
openapi: 3.1.1
info:
  title: Alpic API
  version: 1.0.0
servers:
  - url: https://api.alpic.ai
security:
  - bearerAuth: []
paths:
  /v1/environments/{environmentId}/telemetry-destinations:
    post:
      tags:
        - telemetry
      summary: Create a telemetry destination
      description: Verify and save an OTLP destination for logs, metrics, or traces.
      operationId: telemetryDestinations.create.v1
      parameters:
        - name: environmentId
          in: path
          required: true
          schema:
            type: string
            description: The ID of the environment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                signal:
                  enum:
                    - logs
                    - metrics
                    - traces
                  type: string
                endpoint:
                  type: string
                  minLength: 1
                  maxLength: 2048
                protocol:
                  enum:
                    - http/protobuf
                    - http/json
                  type: string
                  default: http/protobuf
                isScopedToIntentionalRequestsOnly:
                  type: boolean
                  default: false
                headers:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 128
                        pattern: ^[A-Za-z0-9!#$%&'*+\-.^_`|~]+$
                      value:
                        type: string
                        minLength: 1
                        maxLength: 2048
                      isSecret:
                        type: boolean
                    required:
                      - name
                      - value
                      - isSecret
                  default: []
              required:
                - signal
                - endpoint
      responses:
        '200':
          description: The telemetry destination has been created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  signal:
                    enum:
                      - logs
                      - metrics
                      - traces
                    type: string
                  endpoint:
                    type: string
                    minLength: 1
                    maxLength: 2048
                  protocol:
                    enum:
                      - http/protobuf
                      - http/json
                    type: string
                  headers:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                              minLength: 1
                              maxLength: 128
                              pattern: ^[A-Za-z0-9!#$%&'*+\-.^_`|~]+$
                            value:
                              type: 'null'
                            isSecret:
                              const: true
                          required:
                            - id
                            - name
                            - value
                            - isSecret
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                              minLength: 1
                              maxLength: 128
                              pattern: ^[A-Za-z0-9!#$%&'*+\-.^_`|~]+$
                            value:
                              type: string
                              maxLength: 2048
                            isSecret:
                              const: false
                          required:
                            - id
                            - name
                            - value
                            - isSecret
                  status:
                    enum:
                      - active
                      - suspended
                    type: string
                  lastFailureReason:
                    anyOf:
                      - enum:
                          - credentials
                          - wrong-path
                          - wrong-protocol
                          - invalid-payload
                          - partial-rejection
                          - blocked-target
                          - timeout
                          - unreachable
                          - receiver-error
                          - unexpected-status
                        type: string
                      - type: 'null'
                  isScopedToIntentionalRequestsOnly:
                    type: boolean
                required:
                  - id
                  - signal
                  - endpoint
                  - protocol
                  - headers
                  - status
                  - lastFailureReason
                  - isScopedToIntentionalRequestsOnly
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BAD_REQUEST
                      status:
                        const: 400
                      message:
                        type: string
                        default: Bad Request
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: OTLP_DESTINATION_UNVERIFIED
                      status:
                        const: 400
                      message:
                        type: string
                        default: OTLP_DESTINATION_UNVERIFIED
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: FORBIDDEN
                      status:
                        const: 403
                      message:
                        type: string
                        default: Forbidden
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: NOT_FOUND
                      status:
                        const: 404
                      message:
                        type: string
                        default: Not Found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '500':
          description: '500'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INTERNAL_SERVER_ERROR
                      status:
                        const: 500
                      message:
                        type: string
                        default: Internal Server Error
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
components:
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Bearer token for authentication. Use an API key from the API Keys page
        in team settings, or an OAuth access token.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.