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

# Change a source status

> Run an operation on a source: start (only from paused), pause (cancels a running sync), sync (from synced, error, out_of_sync or daily_quota_reached) and archive (from any status but archived). Archiving removes the indexed documents and the files, and cannot be undone. An operation that does not match the current status returns 400 Operation is not valid.



## OpenAPI

````yaml /openapi.json put /dc/sources/{source_pid}/status
openapi: 3.1.0
info:
  title: Cominty API
  description: >-
    The HTTP API behind the Cominty Python SDK: chat and threads, memory, MCP
    integrations, agents, skills, document sources, and documents. Send your API
    key in the x-cominty-token header.
  version: main.5359267
servers:
  - url: https://ds.cominty.com
security:
  - comintyToken: []
paths:
  /dc/sources/{source_pid}/status:
    put:
      tags:
        - document_stores
        - sources
      summary: Change a source status
      description: >-
        Run an operation on a source: start (only from paused), pause (cancels a
        running sync), sync (from synced, error, out_of_sync or
        daily_quota_reached) and archive (from any status but archived).
        Archiving removes the indexed documents and the files, and cannot be
        undone. An operation that does not match the current status returns 400
        Operation is not valid.
      operationId: manage_source_dc_sources__source_pid__status_put
      parameters:
        - name: source_pid
          in: path
          required: true
          schema:
            type: string
            title: Source Pid
          description: Public id of the source (the pid field, a string).
        - name: operation
          in: query
          required: true
          schema:
            enum:
              - start
              - pause
              - archive
              - sync
            type: string
            title: Operation
          description: >-
            start, pause, sync or archive. Each one is valid from some statuses
            only.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SourceOut:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        id:
          type: integer
          title: Id
          description: Numeric id. Use it in source_ids on a capability or a scope.
        pid:
          type: string
          title: Pid
          description: Public id. Use it in every path.
        name:
          type: string
          title: Name
        scope:
          type: string
          title: Scope
        created_by:
          type: string
          title: Created By
        store:
          type: string
          title: Store
          description: >-
            draganddrop, googledrive or sharepoint. A key creates only
            draganddrop.
        status:
          type: string
          title: Status
          description: >-
            pending, syncing, synced, error, out_of_sync, cancelling, pausing,
            paused, archived, disconnected, inoperative_connection,
            expired_connection, invalid_configuration or daily_quota_reached.
        size:
          type: integer
          title: Size
        embedded_size:
          type: integer
          title: Embedded Size
        config:
          additionalProperties: true
          type: object
          title: Config
        documents_synced:
          type: integer
          title: Documents Synced
        documents_failed:
          type: integer
          title: Documents Failed
        oversized_documents:
          type: integer
          title: Oversized Documents
        documents_embedded:
          type: integer
          title: Documents Embedded
        last_synced_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Synced At
        archived_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Archived At
        connection:
          anyOf:
            - $ref: >-
                #/components/schemas/cominty__api__routers__document_stores__sources__ConnectionOut
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - created_at
        - id
        - pid
        - name
        - scope
        - created_by
        - store
        - status
        - size
        - embedded_size
        - config
        - documents_synced
        - documents_failed
        - oversized_documents
        - documents_embedded
        - last_synced_at
        - archived_at
        - connection
      title: SourceOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    cominty__api__routers__document_stores__sources__ConnectionOut:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        status:
          type: string
          title: Status
        created_by:
          type: string
          title: Created By
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        checked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Checked At
        inoperative:
          type: boolean
          title: Inoperative
      additionalProperties: false
      type: object
      required:
        - id
        - name
        - status
        - created_by
        - expires_at
        - checked_at
        - inoperative
      title: ConnectionOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    comintyToken:
      type: apiKey
      in: header
      name: x-cominty-token
      description: >-
        A Cominty Platform API secret. A key created now starts with sk-cmt-.
        Send it as is, or as Bearer sk-cmt-..., with at most one Bearer prefix.
        A key created before the prefix existed has no sk-cmt- and still works.

````

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