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

# Add a Paladin context source

> Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml post /paladin/{paladin_id}/context-sources
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: campaigns
    description: Operations related to access review campaigns
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: event-streams
    description: Operations related to event streaming connections
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: opal-queries
    description: Operations related to OpalQuery
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: paladin
    description: Operations related to Paladin
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs. Deprecated in favor of the `campaigns` API.
  - name: users
    description: Operations related to users
paths:
  /paladin/{paladin_id}/context-sources:
    post:
      tags:
        - paladin
      summary: Add a Paladin context source
      description: >-
        Configures a context source (a Slack channel or a document) for a
        Paladin to read. Idempotent, so re-adding an existing source returns it.
      operationId: createPaladinContextSource
      parameters:
        - description: The ID of the Paladin.
          example: 32acc112-21ff-4669-91c2-21e27683eaa1
          explode: true
          in: path
          name: paladin_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaladinContextSourceInfo'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaladinContextSource'
          description: The configured context source.
      security:
        - BearerAuth: []
components:
  schemas:
    CreatePaladinContextSourceInfo:
      description: Information for adding a context source to a Paladin.
      example:
        source_kind: SLACK_CHANNEL
        third_party_provider: SLACK
        remote_id: C0123456789
        name: '#access-requests'
      properties:
        source_kind:
          $ref: '#/components/schemas/PaladinContextSourceKind'
        third_party_provider:
          $ref: '#/components/schemas/PaladinContextSourceProvider'
        remote_id:
          description: >-
            The provider's identifier for the source. The Slack channel ID for a
            channel, or the Notion/Confluence page ID for a document.
          type: string
        name:
          description: An optional human-readable name for the source.
          type: string
        url:
          description: An optional link to the source.
          type: string
      required:
        - source_kind
        - third_party_provider
        - remote_id
      type: object
    PaladinContextSource:
      description: |-
        # PaladinContextSource Object
        ### Description
        A context source (a Slack channel or a document) that a Paladin is
        configured to read during access-request review.
      example:
        id: 8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8
        paladin_id: 32acc112-21ff-4669-91c2-21e27683eaa1
        source_kind: SLACK_CHANNEL
        third_party_provider: SLACK
        remote_id: C0123456789
        name: '#access-requests'
        url: https://example.slack.com/archives/C0123456789
      properties:
        id:
          description: The ID of the context source.
          format: uuid
          type: string
        paladin_id:
          description: The ID of the Paladin this source belongs to.
          format: uuid
          type: string
        source_kind:
          $ref: '#/components/schemas/PaladinContextSourceKind'
        third_party_provider:
          $ref: '#/components/schemas/PaladinContextSourceProvider'
        remote_id:
          description: >-
            The provider's identifier for the source. The Slack channel ID for a
            channel, or the Notion/Confluence page ID for a document.
          type: string
        name:
          description: A human-readable name for the source.
          type: string
        url:
          description: A link to the source.
          type: string
      required:
        - id
        - paladin_id
        - source_kind
        - third_party_provider
        - remote_id
        - name
        - url
      type: object
    PaladinContextSourceKind:
      description: >-
        The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack
        channel; a DOCUMENT is a Notion or Confluence page.
      enum:
        - SLACK_CHANNEL
        - DOCUMENT
      type: string
    PaladinContextSourceProvider:
      description: The integration a Paladin context source comes from.
      enum:
        - SLACK
        - NOTION
        - CONFLUENCE
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````