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

# Patch Source

> Change who may write to a source whose type admits senders (Telegram).



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/workspaces/{workspace}/streams/{stream_id}/sources/{source_id}
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.2
servers: []
security:
  - bearer: []
paths:
  /v1/workspaces/{workspace}/streams/{stream_id}/sources/{source_id}:
    patch:
      tags:
        - v1
        - protected
        - streams
      summary: Patch Source
      description: Change who may write to a source whose type admits senders (Telegram).
      operationId: patch_source_v1_streams__stream_id__sources__source_id__patch
      parameters:
        - in: path
          name: stream_id
          required: true
          schema:
            format: uuid
            title: Stream Id
            type: string
        - in: path
          name: source_id
          required: true
          schema:
            format: uuid
            title: Source Id
            type: string
        - description: Slug of the workspace the request acts in
          in: path
          name: workspace
          required: true
          schema:
            description: Slug of the workspace the request acts in
            maxLength: 120
            pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
            title: Workspace
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamSourceResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    SourceUpdate:
      additionalProperties: false
      description: 'What can change on a source once added: who may write to it.'
      properties:
        senders:
          $ref: '#/components/schemas/Senders'
      required:
        - senders
      title: SourceUpdate
      type: object
    StreamSourceResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        event_templates:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: This source's own kind / key / session_key templates.
          title: Event Templates
        id:
          format: uuid
          title: Id
          type: string
        kind:
          description: webhook or poll
          title: Kind
          type: string
        poll_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Poll Error
        polled_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Polled At
        registered:
          default: false
          description: >-
            The provider was pointed at webhook_url (entries with a
            registration).
          title: Registered
          type: boolean
        senders:
          anyOf:
            - $ref: '#/components/schemas/Senders'
            - type: 'null'
          description: >-
            Who may write, on a type that admits senders; null there means
            members (added before it could be chosen), and null on every other
            type.
        senders_set_by:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The user who chose senders: 'owner' admits them, listed senders run
            as them.
          title: Senders Set By
        source_type:
          anyOf:
            - type: string
            - type: 'null'
          description: The catalog slug of GET /streams/source-types.
          title: Source Type
        webhook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Id
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Public URL the provider posts to; null for a poll source.
          title: Webhook Url
      required:
        - id
        - kind
        - source_type
        - webhook_id
        - webhook_url
        - created_at
      title: StreamSourceResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Senders:
      additionalProperties: false
      description: >-
        Which senders a source with an ``admission`` lets through to its agent.


        ``owner``: only whoever added the source, once their account is linked.

        ``members``: anyone linked whom the graph lets run the agent.

        ``ids``: exactly these accounts at the provider, linked or not; the
        owner

        answers for them, so their runs are the owner's.
      properties:
        allow:
          enum:
            - owner
            - members
            - ids
          title: Allow
          type: string
        ids:
          default: []
          items:
            type: string
          maxItems: 100
          title: Ids
          type: array
      required:
        - allow
      title: Senders
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

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