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

# Set OpenTelemetry export

> Set or replace the account's OTLP endpoint and send a test export.



## OpenAPI

````yaml openapi/boat-v1.yaml PUT /telemetry
openapi: 3.1.0
info:
  title: Boat Public API v1
  version: 1.0.0
  description: >
    Public JSON API for creating, operating, prompting, observing, and exposing
    sandboxes from backend services, CI jobs, hosted workers, and Boat
    automation products.


    The v1 reference intentionally documents the developer integration surface
    only. Dashboard billing actions are not part of v1.
servers:
  - url: https://boat.dev/api/v1
security:
  - BoatBearerAuth: []
tags:
  - name: Boat
    description: >-
      Unified Boat account, setup, lifecycle, prompting, event history, desktop
      access, and SSH operations.
paths:
  /telemetry:
    put:
      tags:
        - Boat
      summary: Set OpenTelemetry export
      description: >
        Sets the account's one OTLP/HTTP destination, or replaces it. Boat then
        sends one metrics export at once and returns the collector's answer in
        `test`.


        Every 60 seconds Boat sends the sandbox and account gauges to
        `<endpoint>/v1/metrics`. Each sandbox lifecycle event goes to
        `<endpoint>/v1/logs`. The endpoint must use HTTPS on port 443 or 4318
        and resolve only to public addresses. Needs an API key with
        `account.admin`.
      operationId: setTelemetry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TelemetrySetRequest'
            examples:
              datadog:
                value:
                  endpoint: https://otlp.datadoghq.com
                  headers:
                    dd-api-key: <DATADOG_API_KEY>
      responses:
        '200':
          description: Export saved. `test` holds the result of the first export.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelemetrySetResponse'
              examples:
                saved:
                  value:
                    ok: true
                    type: telemetry.updated
                    telemetry:
                      endpoint: https://otlp.datadoghq.com
                      headers:
                        - dd-api-key
                      lastExportAt: null
                      lastError: null
                      createdAt: '2026-10-09T11:00:00Z'
                    test:
                      ok: true
                      status: 202
                      message: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    TelemetrySetRequest:
      type: object
      required:
        - endpoint
      properties:
        endpoint:
          type: string
          description: >-
            HTTPS URL on port 443 or 4318. Boat removes a trailing `/v1/metrics`
            or `/v1/logs`.
          example: https://otlp.example.com
        headers:
          type: object
          maxProperties: 20
          additionalProperties:
            type: string
            maxLength: 8192
          description: >-
            Headers sent with every export, for example the vendor API key. Boat
            encrypts them at rest.
          example:
            dd-api-key: <DATADOG_API_KEY>
    TelemetrySetResponse:
      allOf:
        - $ref: '#/components/schemas/TelemetryResponse'
        - type: object
          required:
            - test
          properties:
            test:
              $ref: '#/components/schemas/TelemetryTestResult'
    TelemetryResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessBase'
        - type: object
          required:
            - telemetry
          properties:
            telemetry:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/TelemetryConfig'
    TelemetryTestResult:
      type: object
      required:
        - ok
        - status
        - message
      properties:
        ok:
          type: boolean
          description: True when the collector accepted the test export.
        status:
          type:
            - integer
            - 'null'
        message:
          type:
            - string
            - 'null'
          description: The collector error or partial-success message.
    ErrorEnvelope:
      type: object
      required:
        - ok
        - type
        - status
        - code
        - message
        - error
        - requestId
      properties:
        ok:
          type: boolean
          examples:
            - false
        type:
          type: string
          examples:
            - sandbox.error
        status:
          type: integer
          examples:
            - 409
        code:
          type: string
          examples:
            - provider_not_configured
        message:
          type: string
          examples:
            - Prompting is locked until Codex is configured on the Agents page.
        requestId:
          type: string
          examples:
            - req_01HX...
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            details:
              type: object
              additionalProperties: true
    SuccessBase:
      type: object
      required:
        - ok
        - type
      properties:
        ok:
          type: boolean
          examples:
            - true
        type:
          type: string
          description: Stable success envelope discriminator added by v1.
    TelemetryConfig:
      type: object
      required:
        - endpoint
        - headers
        - lastExportAt
        - lastError
        - createdAt
      properties:
        endpoint:
          type: string
          format: uri
          description: >-
            The OTLP/HTTP base URL. Boat posts to `<endpoint>/v1/metrics` and
            `<endpoint>/v1/logs`.
        headers:
          type: array
          items:
            type: string
          description: The names of the saved headers. The values are never returned.
        lastExportAt:
          type:
            - string
            - 'null'
          format: date-time
          description: The time of the last metrics export that the collector accepted.
        lastError:
          description: The most recent error from the collector, for metrics or events.
          oneOf:
            - type: 'null'
            - type: object
              required:
                - message
                - status
                - at
              properties:
                message:
                  type: string
                status:
                  type:
                    - integer
                    - 'null'
                  description: HTTP status, or null for a network error.
                at:
                  type: string
                  format: date-time
        createdAt:
          type: string
          format: date-time
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            invalid:
              value:
                ok: false
                type: sandbox.error
                status: 400
                code: invalid_json
                message: Request body must be valid JSON.
                error:
                  code: invalid_json
                  message: Request body must be valid JSON.
                  status: 400
                requestId: req_01HX...
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            unauthorized:
              value:
                ok: false
                type: sandbox.error
                status: 401
                code: unauthorized
                message: Unauthorized
                error:
                  code: unauthorized
                  message: Unauthorized
                  status: 401
                requestId: req_01HX...
  securitySchemes:
    BoatBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sandbox_api_key
      description: >-
        Boat bearer token in the form `boat_...`. Service API keys authenticate
        sandbox operations.

````

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