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

# Link a conversation to a site

> Associates an existing conversation with an existing site. Idempotent: linking an already-linked conversation/site pair succeeds without creating a duplicate. A conversation can be associated with more than one site, so this adds the site — it does not replace the ones already linked, and it never unlinks — use `DELETE /v1/conversation/{id}/site/{siteId}` to remove a link. The linked site is returned by `GET /v1/conversation/{id}?include=sites`. Requires the `conversation:write` and `site:write` scopes.



## OpenAPI

````yaml /openapi.yaml put /v1/conversation/{id}/site/{siteId}
openapi: 3.1.0
info:
  title: ProVision Public API
  version: 1.0.0
  description: >-
    Use the ProVision Public API to integrate with ProVision conversations,
    clients, sites, projects, users, labels, and signal incidents. All endpoints
    accept and return JSON, are authenticated with an `x-api-key` header, and
    are scoped to a single partner tenant.
  contact:
    email: help@onevisionresources.com
    name: OneVision Resources Support
  license:
    name: Proprietary
servers:
  - url: https://connect.provisionapp.io
    description: Production
security: []
tags:
  - name: Conversations
    description: >-
      Support conversations: list and read them, create new ones, update status
      and urgency, read messages, post internal notes, and link sites and
      labels.
  - name: Clients
    description: >-
      The people your team supports: list, read, create, and update clients, and
      link them to their sites.
  - name: Sites
    description: >-
      The addresses your team services: list, read, create, and update sites,
      and apply labels.
  - name: Site files
    description: >-
      Documentation attached to a site, such as plans, photos, and manuals:
      list, download, upload, and delete.
  - name: Projects
    description: >-
      Installation projects at a site. Available to partners with access to
      ProVision Projects.
  - name: Users
    description: The platform users on your team, who can be assignees and message senders.
  - name: User groups
    description: >-
      The groups that bundle permissions for platform users: list the public
      groups available to your team.
  - name: Labels
    description: >-
      The public labels your team can apply to conversations, sites, and
      client-site links.
  - name: Signal incidents
    description: >-
      Raised when a conversation pages someone, and open until an agent resolves
      it: list and resolve them.
  - name: System
    description: Service health, for checking that your API key and network path work.
paths:
  /v1/conversation/{id}/site/{siteId}:
    put:
      tags:
        - Conversations
      summary: Link a conversation to a site
      description: >-
        Associates an existing conversation with an existing site. Idempotent:
        linking an already-linked conversation/site pair succeeds without
        creating a duplicate. A conversation can be associated with more than
        one site, so this adds the site — it does not replace the ones already
        linked, and it never unlinks — use `DELETE
        /v1/conversation/{id}/site/{siteId}` to remove a link. The linked site
        is returned by `GET /v1/conversation/{id}?include=sites`. Requires the
        `conversation:write` and `site:write` scopes.
      operationId: linkConversationToSite
      parameters:
        - schema:
            type: string
            format: uuid
            example: 57f2d879-20f8-4106-9abb-44fa099e0448
          required: true
          name: id
          in: path
          description: Conversation id
        - schema:
            allOf:
              - $ref: '#/components/schemas/SiteId'
              - example: ovaid-61f936b9-6f97-438e-856d-1d99c69304f3
          required: true
          description: Site id
          name: siteId
          in: path
      responses:
        '201':
          description: Conversation linked to site
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationSiteLink'
              example:
                conversationId: 57f2d879-20f8-4106-9abb-44fa099e0448
                siteId: ovaid-2b6d4d8e-9f1a-4b2c-8d4e-5f6011223344
                linked: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OpenApiKeyAuth: []
components:
  schemas:
    SiteId:
      type: string
      minLength: 1
      description: >-
        Site id. Newer ids are `ovaid-<uuid>`; legacy sites may have bare (e.g.
        numeric) ids.
      example: ovaid-2b6d4d8e-9f1a-4b2c-8d4e-5f6011223344
    ConversationSiteLink:
      type: object
      properties:
        conversationId:
          type: string
          format: uuid
        siteId:
          $ref: '#/components/schemas/SiteId'
        linked:
          type: boolean
          description: >-
            Whether the conversation is associated with the site after the
            request
          example: true
      required:
        - conversationId
        - siteId
        - linked
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
          example: NOT_FOUND
        message:
          type: string
          description: Human-readable error description
      required:
        - code
        - message
  securitySchemes:
    OpenApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Send the API key in the x-api-key header.

````

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