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

# Calculate application time-to-contact

> Calculates the elapsed time between when the Application was created and the first outbound message in any linked Conversation. Returns `timeToContact: null` (and an explanatory message) when no outbound message has been sent yet.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/applications/{id}/time-to-contact
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/applications/{id}/time-to-contact:
    get:
      tags:
        - Applications
      summary: Calculate application time-to-contact
      description: >-
        Calculates the elapsed time between when the Application was created and
        the first outbound message in any linked Conversation. Returns
        `timeToContact: null` (and an explanatory message) when no outbound
        message has been sent yet.
      operationId: get_application_time_to_contact
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Time-to-contact returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationTimeToContactResponse'
        '400':
          description: Invalid application ID or missing creation date
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsBareErrorResponse'
        '404':
          description: Application not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsBareErrorResponse'
        '500':
          description: Failed to calculate time-to-contact
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsBareErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ApplicationTimeToContactResponse:
      type: object
      description: >-
        Time elapsed between application creation and the first outbound message
        in any linked conversation. `timeToContact` and `firstContactAt` are
        null when no outbound message has been sent yet.
      properties:
        timeToContact:
          type: integer
          nullable: true
          description: >-
            Milliseconds between application creation and first outbound
            message. Null if no outbound message yet.
        unit:
          type: string
          enum:
            - milliseconds
        firstContactAt:
          type: string
          format: date-time
          nullable: true
        message:
          type: string
          description: Explanatory message when `timeToContact` is null.
        formatted:
          type: object
          description: >-
            Same value expressed in different units (only present on the success
            path).
          properties:
            milliseconds:
              type: integer
            seconds:
              type: integer
            minutes:
              type: integer
            hours:
              type: integer
            days:
              type: integer
          additionalProperties: true
      required:
        - unit
      additionalProperties: true
      example:
        timeToContact: 184000
        unit: milliseconds
        firstContactAt: '2026-04-12T14:25:14.000Z'
        formatted:
          milliseconds: 184000
          seconds: 184
          minutes: 3
          hours: 0
          days: 0
    ApplicationsBareErrorResponse:
      type: object
      description: >-
        Bare error envelope used by `/conversations` and `/time-to-contact`
        routes which respond with `{ error }` only.
      properties:
        error:
          type: string
      required:
        - error
      additionalProperties: true
      example:
        error: Application not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````