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

# Manage Project Sharing

> Manages a project's public share link. Send any combination of: `enabled` to turn sharing on/off, `password` to set or clear (null) a password, and `refresh_token` to rotate the share token (invalidating the previous link). Returns the current share state, including the share URL when sharing is enabled. The password itself is never returned.



## OpenAPI

````yaml /openapi.json patch /api/v1/projects/{project}/share
openapi: 3.1.0
info:
  title: Surfacd Public API
  version: 1.0.0
  description: >-
    Public API for Surfacd. Team-scoped operations live under
    `/api/v1/team/...`; project collections live under `/api/v1/projects`;
    project-scoped operations live under `/api/v1/projects/{project}/...`. All
    endpoints require a Bearer team API key created in Team Settings. The API
    key selects the team for team-level and collection endpoints.
servers:
  - url: https://app.surfacd.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Project management endpoints. Reads only in this version.
  - name: Prompts
    description: Prompt management endpoints. Reads only in this version.
  - name: Team
    description: Team settings and plan details for the current team.
  - name: Reporting
    description: >-
      Read-only reporting endpoints for projects (brand rankings, mentions,
      visibility, matrix analysis, source data).
  - name: Reference
    description: Reference data used by create, update, and reporting filters.
  - name: Tags
    description: Project tag management endpoints.
paths:
  /api/v1/projects/{project}/share:
    parameters:
      - $ref: '#/components/parameters/ProjectUuid'
    patch:
      tags:
        - Projects
      summary: Manage Project Sharing
      description: >-
        Manages a project's public share link. Send any combination of:
        `enabled` to turn sharing on/off, `password` to set or clear (null) a
        password, and `refresh_token` to rotate the share token (invalidating
        the previous link). Returns the current share state, including the share
        URL when sharing is enabled. The password itself is never returned.
      operationId: v1ProjectsShare
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectShareRequest'
      responses:
        '200':
          description: The project's current share settings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectShare'
        '404':
          description: Project not found in the current team.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    ProjectUuid:
      name: project
      in: path
      required: true
      description: Project UUID.
      schema:
        type: string
        format: uuid
  schemas:
    UpdateProjectShareRequest:
      type: object
      description: Any combination of fields may be sent.
      properties:
        enabled:
          type: boolean
          description: Turn the public share link on or off.
        password:
          type:
            - string
            - 'null'
          minLength: 4
          description: Set a password to view the shared project, or null to remove it.
        refresh_token:
          type: boolean
          description: >-
            When true, rotates the share token, invalidating any previously
            shared link.
    ProjectShare:
      type: object
      properties:
        enabled:
          type: boolean
        share_url:
          type:
            - string
            - 'null'
          description: >-
            The public share URL (includes the token). Null when sharing is
            disabled.
        password_protected:
          type: boolean
          description: Whether a password is required to view the shared project.
      required:
        - enabled
        - share_url
        - password_protected
    ValidationError:
      type: object
      description: Returned when one or more request parameters fail validation.
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
  responses:
    ValidationError:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        Team API key created in Team Settings. Use it with URLs for the same
        team.

````