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

# Create application

> Creates a new Application for an existing Contact in the caller organization. The contact must belong to the same organization. The caller must supply either a `status` or a `pipelineStage`; the request resolves the appropriate Pipeline and stage on the way in.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/applications
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:
    post:
      tags:
        - Applications
      summary: Create application
      description: >-
        Creates a new Application for an existing Contact in the caller
        organization. The contact must belong to the same organization. The
        caller must supply either a `status` or a `pipelineStage`; the request
        resolves the appropriate Pipeline and stage on the way in.
      operationId: post_applications
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApplicationRequest'
      responses:
        '201':
          description: Application created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationMutationResponse'
        '400':
          description: Missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsErrorResponse'
        '404':
          description: Contact not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsErrorResponse'
        '500':
          description: Failed to create application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateApplicationRequest:
      type: object
      properties:
        contactId:
          type: string
          description: Contact `_id` this Application belongs to.
        name:
          type: string
          description: Display name for the Application (e.g. property/unit label).
        status:
          type: string
          description: >-
            Initial status label; mutually exchangeable with `pipelineStage`
            (one of the two must be provided).
        pipelineStage:
          type: string
          description: Stage `_id` within the chosen pipeline.
        pipelineId:
          type: string
          description: Pipeline `_id` this Application is tracked under.
        userId:
          type: string
          description: >-
            Owning user `_id`; defaults to the authenticated caller when
            omitted.
      required:
        - contactId
        - name
      description: Either status or pipelineStage should be provided.
      additionalProperties: true
      example:
        contactId: 64b2c3d4e5f60012345678aa
        name: Maple Court — Unit 412
        pipelineStage: New lead
        pipelineId: 64a1b2c3d4e5f6001234567a
        userId: 64a1b2c3d4e5f60012345679
    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

````