> ## 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.

# Update application

> Patches mutable fields on an Application (status, pipelineStage, pipelineId, owner, custom fields). Pipeline-stage transitions are resolved against the application's pipeline before saving. `fromHistoryModal` suppresses some side-effects when set.



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/applications/{id}
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}:
    put:
      tags:
        - Applications
      summary: Update application
      description: >-
        Patches mutable fields on an Application (status, pipelineStage,
        pipelineId, owner, custom fields). Pipeline-stage transitions are
        resolved against the application's pipeline before saving.
        `fromHistoryModal` suppresses some side-effects when set.
      operationId: put_application
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApplicationRequest'
      responses:
        '200':
          description: Application updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationMutationResponse'
        '400':
          description: Application id is required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsErrorResponse'
        '404':
          description: Application not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsErrorResponse'
        '500':
          description: Failed to update application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateApplicationRequest:
      type: object
      properties:
        _id:
          type: string
          description: >-
            Application `_id` (redundant with the path id; tolerated for legacy
            clients).
        fromHistoryModal:
          type: boolean
          description: >-
            Suppresses side-effects (audit log, socket emit) when the update
            originates from the history viewer.
        pipelineId:
          type: string
          description: >-
            New pipeline `_id` if moving the Application to a different
            pipeline.
      additionalProperties: true
      example:
        pipelineId: 64a1b2c3d4e5f6001234567a
        pipelineStage: Application submitted
        status: in_progress
    ApplicationMutationResponse:
      type: object
      description: >-
        Returned by `POST /api/applications` and `PUT /api/applications/{id}` —
        wraps the created/updated `ApplicationDocument` plus a status message.
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
        data:
          $ref: '#/components/schemas/ApplicationDocument'
      required:
        - success
        - message
        - data
      additionalProperties: true
      example:
        success: true
        message: Application created successfully
        data:
          _id: 64d2f9c5e8a1d4e001a0b1c2
          name: Maple Court — Unit 412
          organizationId: 64a1b2c3d4e5f60012345678
          status: in_progress
          pipelineStage: Tour scheduled
          createdAt: '2026-04-12T14:22:10.000Z'
          updatedAt: '2026-04-12T14:22:10.000Z'
    ApplicationsErrorResponse:
      type: object
      description: Standard error envelope for Applications endpoints (CRUD + list).
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
        error:
          description: >-
            Optional error detail (string or structured object on validation
            failures).
      required:
        - success
      additionalProperties: true
      example:
        success: false
        message: Application not found
    ApplicationDocument:
      type: object
      description: >-
        An `Application` document. Populated fields (`contactId`, `userId`) may
        be either an ObjectId string or a partial subset of the related
        document.
      properties:
        _id:
          type: string
        name:
          type: string
        organizationId:
          type: string
        contactId:
          description: >-
            ObjectId or populated Contact subset (firstName, lastName,
            phoneNumber, email).
        userId:
          description: ObjectId or populated User subset (fullName, email).
        status:
          type: string
        pipelineId:
          type: string
          nullable: true
        pipelineStage:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
      example:
        _id: 64d2f9c5e8a1d4e001a0b1c2
        name: Maple Court — Unit 412
        organizationId: 64a1b2c3d4e5f60012345678
        contactId:
          _id: 64b2c3d4e5f60012345678aa
          firstName: Alex
          lastName: Nguyen
          phoneNumber: '+14155551234'
          email: alex.nguyen@example.com
        userId:
          _id: 64a1b2c3d4e5f60012345679
          fullName: Jordan Lee
          email: jordan@maplegroup.example
        status: in_progress
        pipelineId: 64a1b2c3d4e5f6001234567a
        pipelineStage: Tour scheduled
        createdAt: '2026-04-12T14:22:10.000Z'
        updatedAt: '2026-04-22T10:14:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````