> ## 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.

# Create Source

> Add a webhook source to the stream, with no trigger.

Credentials are write-only and held by reference; the response carries the
public URL to give the sender.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workspaces/{workspace}/streams/{stream_id}/sources
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.0
servers: []
security:
  - bearer: []
paths:
  /v1/workspaces/{workspace}/streams/{stream_id}/sources:
    post:
      tags:
        - v1
        - protected
        - streams
      summary: Create Source
      description: >-
        Add a webhook source to the stream, with no trigger.


        Credentials are write-only and held by reference; the response carries
        the

        public URL to give the sender.
      operationId: create_source_v1_streams__stream_id__sources_post
      parameters:
        - in: path
          name: stream_id
          required: true
          schema:
            format: uuid
            title: Stream 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/WebhookSourceCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSourceCreated'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    WebhookSourceCreate:
      additionalProperties: false
      description: A webhook source on an existing stream, with no trigger.
      properties:
        config:
          additionalProperties:
            type: string
          description: The type's plain settings, e.g. shop_id.
          title: Config
          type: object
        credentials:
          additionalProperties:
            anyOf:
              - type: string
              - $ref: '#/components/schemas/SecretRef'
          description: >-
            The type's credential fields, each a value or {secret_id} of a
            workspace secret. Write-only: never returned.
          title: Credentials
          type: object
        webhook_type:
          description: One of GET /streams/source-types.
          maxLength: 50
          minLength: 1
          title: Webhook Type
          type: string
      required:
        - webhook_type
      title: WebhookSourceCreate
      type: object
    WebhookSourceCreated:
      properties:
        allowed_methods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Methods
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          format: uuid
          title: Id
          type: string
        kind:
          title: Kind
          type: string
        signature_scheme:
          anyOf:
            - $ref: '#/components/schemas/WebhookSignatureScheme'
            - type: 'null'
          description: >-
            How a sender signs for a type verified by configurable HMAC; null
            otherwise.
        signing_secret:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Issued when the type's signing secret is optional and none was
            given; shown this once only.
          title: Signing Secret
        trigger_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: >-
            The webhook trigger that owns this source; null for a source added
            directly.
          title: Trigger Id
        webhook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Id
        webhook_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Type
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Public URL senders post to; null for non-webhook sources.
          title: Webhook Url
      required:
        - id
        - kind
        - webhook_id
        - webhook_type
        - webhook_url
        - allowed_methods
        - created_at
      title: WebhookSourceCreated
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SecretRef:
      additionalProperties: false
      description: >-
        A workspace secret named instead of its value; the value stays where it
        is.
      properties:
        secret_id:
          format: uuid
          title: Secret Id
          type: string
      required:
        - secret_id
      title: SecretRef
      type: object
    WebhookSignatureScheme:
      description: How a sender signs requests to a generic webhook.
      properties:
        algorithm:
          description: HMAC digest, e.g. 'sha256'.
          title: Algorithm
          type: string
        header:
          description: Request header carrying the signature.
          title: Header
          type: string
        prefix:
          description: Text before the hex digest in the header; often empty.
          title: Prefix
          type: string
      required:
        - header
        - algorithm
        - prefix
      title: WebhookSignatureScheme
      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.