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

# Retrieve a source

> Returns a single source by ID.



## OpenAPI

````yaml /api-reference/v2.json get /sources/{source_id}
openapi: 3.1.1
info:
  title: Deck API
  version: 2.0.0
servers:
  - url: https://api.deck.co/v2
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Agents
  - name: Components
  - name: Credentials
  - name: Event Destinations
  - name: Events
  - name: Sessions
  - name: Sources
  - name: Storage
  - name: Task Runs
  - name: Tasks
  - name: Test
paths:
  /sources/{source_id}:
    get:
      tags:
        - Sources
      summary: Retrieve a source
      description: Returns a single source by ID.
      operationId: getSource
      parameters:
        - name: source_id
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier for the source (prefixed with `src_`).
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/GetSourceResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/GetSourceResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/GetSourceResponse'
        '400':
          description: Bad request — validation error or malformed input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found — the requested resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Conflict — the request is valid but cannot be completed in the
            current state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Unprocessable content — the request body is understood but contains
            invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetSourceResponse:
      required:
        - id
        - object
        - name
        - type
        - website
        - created_at
        - updated_at
        - request_id
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the source, prefixed with `src_`.
        object:
          type: string
          description: Always `source`.
        name:
          type:
            - 'null'
            - string
          description: Display name for the source.
        type:
          type: string
          description: >-
            The source type. `website` is currently the only supported type; it
            defaults to `website` if omitted.
        website:
          $ref: '#/components/schemas/SourceWebsite'
          description: Website configuration for the source.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the resource was created.
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the resource was last updated.
        request_id:
          type: string
          description: >-
            Unique identifier for the API request. Include this when contacting
            support.
      description: >-
        A source object. Sources are websites or services that agents connect
        to.
    ValidationErrorResponse:
      required:
        - errors
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
          description: RFC 9110 problem type URI.
        title:
          type:
            - 'null'
            - string
          description: Short summary of the validation failure.
        status:
          type:
            - 'null'
            - integer
          description: HTTP status code.
          format: int32
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Validation errors grouped by field name.
        traceId:
          type:
            - 'null'
            - string
          description: Request trace identifier.
      description: Validation error returned for malformed requests (HTTP 400).
    ErrorResponse:
      required:
        - errors
        - request_id
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TaskRunError'
          description: One or more errors that describe what went wrong.
        request_id:
          type: string
          description: Unique identifier for this request, useful for tracing.
      description: Standard error response.
    SourceWebsite:
      required:
        - url
      type: object
      properties:
        url:
          type: string
          description: >-
            The URL of the website or service. Deck normalizes this on create:
            it prepends `https://` when no scheme is given, lowercases the
            scheme and host, drops default ports (80/443), and trims trailing
            slashes — so the stored and returned value may differ from what you
            sent. Non-HTTP(S) URLs are rejected.
      description: Website configuration for a source.
    TaskRunError:
      required:
        - type
        - code
        - message
      type: object
      properties:
        type:
          type: string
          description: >-
            Error category (e.g. `source`, `auth`, `task`, `rate_limit`).
            Determines the class of failure.
        code:
          type: string
          description: Machine-readable error code. Use this for programmatic handling.
        message:
          type: string
          description: >-
            Human-readable explanation. Do not rely on this for logic — it may
            change.
        field:
          type:
            - 'null'
            - string
          description: The input field that caused the error, when applicable.
      description: Error details for a failed task run. Same structure as API-level errors.
  securitySchemes:
    BearerAuth:
      type: http
      description: Secret key (sk_live_...)
      scheme: bearer
      bearerFormat: JWT

````