> ## 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 DynamicProperties sections for an organization

> Replaces the sections layout for the given section type (defaults to "Contact"). Performs renames on existing owner documents, optionally unsets removed properties when isForced=true, validates regex patterns / link-target graphs, and rejects modifications to protected schema fields. Admin or SuperAdmin only.



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/organizations/sections/{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/organizations/sections/{id}:
    put:
      tags:
        - Organizations
      summary: Update DynamicProperties sections for an organization
      description: >-
        Replaces the sections layout for the given section type (defaults to
        "Contact"). Performs renames on existing owner documents, optionally
        unsets removed properties when isForced=true, validates regex patterns /
        link-target graphs, and rejects modifications to protected schema
        fields. Admin or SuperAdmin only.
      operationId: put_organizations_sections_id
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: type
          required: false
          schema:
            type: string
            default: Contact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrgSectionsRequest'
      responses:
        '200':
          description: Sections updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateOrgSectionsResponse'
        '400':
          description: >-
            Validation error (regex, protected fields, missing properties, data
            type changes, link graph, etc.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
        '500':
          description: Failed to update organization section
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateOrgSectionsRequest:
      type: object
      properties:
        sections:
          type: array
          items:
            $ref: '#/components/schemas/OrgSection'
        isForced:
          type: boolean
          description: >-
            When true, force-removes properties that have data in existing owner
            documents and unsets fields whose dataType changed.
      required:
        - sections
      additionalProperties: true
      example:
        sections:
          - name: Personal Information
            isHidden: false
            properties:
              firstName:
                name: First Name
                dataType: string
                isHidden: false
              lastName:
                name: Last Name
                dataType: string
                isHidden: false
        isForced: false
    UpdateOrgSectionsResponse:
      type: object
      properties:
        message:
          type: string
        organization:
          type: object
          additionalProperties: true
          description: Updated DynamicProperties document.
        renamedProperties:
          type: object
          additionalProperties:
            type: string
          description: Map from old property name to new property name.
      additionalProperties: true
      example:
        message: Sections updated successfully
        organization:
          _id: 5f7b1c2e8a1d4e0012c3b500
          organizationId: 5f7b1c2e8a1d4e0012c3b400
          type: Contact
        renamedProperties:
          firstname: firstName
    OrganizationErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: string
      additionalProperties: true
      example:
        error: Organization not found
        details: No organization exists with the provided id
    OrgSection:
      type: object
      properties:
        name:
          type: string
        isHidden:
          type: boolean
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/OrgSectionProperty'
      required:
        - name
      additionalProperties: true
      example:
        name: Personal Information
        isHidden: false
        properties:
          firstName:
            name: First Name
            dataType: string
            isHidden: false
          lastName:
            name: Last Name
            dataType: string
            isHidden: false
          email:
            name: Email
            dataType: string
            isHidden: false
    OrgSectionProperty:
      type: object
      description: >-
        A DynamicProperties property entry. Either a leaf (dataType + optional
        options/formula/extractionRule) or a branch (linkId / linkTargetType
        pointing at another DynamicProperties doc).
      properties:
        name:
          type: string
        isHidden:
          type: boolean
        _id:
          type: string
        dataType:
          type: string
        options:
          type: array
          items: {}
        dropdownType:
          type: string
        expression:
          type: string
        canonicalExpression:
          type: string
        outputType:
          type: string
        dependencies:
          type: array
          items:
            type: string
        status:
          type: string
        formula:
          type: object
          additionalProperties: true
        extractionRule:
          $ref: '#/components/schemas/ExtractionRule'
        linkId:
          type: string
        linkTargetType:
          type: string
      additionalProperties: true
      example:
        name: First Name
        dataType: string
        isHidden: false
    ExtractionRule:
      type: object
      properties:
        mode:
          type: string
          enum:
            - allowlist
            - blacklist
        values:
          type: array
          items:
            type: string
        regex:
          type: array
          items:
            type: string
        prompt:
          type: string
          maxLength: 500
      required:
        - mode
        - values
        - regex
      additionalProperties: true
      example:
        mode: allowlist
        values:
          - 'ON'
          - QC
          - BC
          - AB
        regex:
          - ^[A-Z]{2}$
        prompt: Two-letter Canadian province code
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````