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

# Share client with collaborator

> Share a client with an external collaborator, optionally sharing folders and granting client portal access



## OpenAPI

````yaml /api-reference/cx/swagger.json post /clients/{client}/collaborate/_share
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /clients/{client}/collaborate/_share:
    post:
      tags:
        - clients
      summary: Share client with collaborator
      description: >-
        Share a client with an external collaborator, optionally sharing folders
        and granting client portal access
      parameters:
        - description: Client ID
          name: client
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_clients_collaborate.CollaborateRequest
        description: Collaborate request (name, email required)
        required: true
      responses:
        '200':
          description: Share result with activity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_clients_collaborate.ShareClientResponse
        '400':
          description: >-
            Bad request - invalid client ID, request body, or missing team
            branding
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '403':
          description: Forbidden - no permission to share
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_clients_collaborate.CollaborateRequest:
      type: object
      properties:
        company:
          type: string
        contact:
          type: string
        cp_access:
          type: boolean
        email:
          type: string
        folders:
          type: array
          items:
            type: string
        name:
          type: string
        preferred_name:
          type: string
        read_only:
          type: boolean
        share_participant_data:
          type: boolean
    pkg_routes_clients_collaborate.ShareClientResponse:
      type: object
      properties:
        activity:
          type: array
          items:
            $ref: '#/components/schemas/types.Activity'
        ok:
          type: boolean
        team:
          type: string
        user:
          type: string
    types.Activity:
      type: object
      properties:
        _id:
          type: string
        action:
          type: string
        changes:
          type: array
          items:
            $ref: '#/components/schemas/types.Change'
        client:
          type: string
        on_id:
          type: string
        on_py:
          type: integer
        on_type:
          type: string
        team:
          type: string
        timestamp:
          type: string
        user:
          type: string
    types.Change:
      type: object
      properties:
        data:
          type: string
        field:
          type: string
        from:
          type: string
        to:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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