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

# Get campaign by ID

> Returns a `Campaign` object.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /campaigns/{campaign_id}
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: 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
  - name: users
    description: Operations related to users
paths:
  /campaigns/{campaign_id}:
    get:
      tags:
        - campaigns
      summary: Get campaign by ID
      description: Returns a `Campaign` object.
      operationId: getCampaign
      parameters:
        - description: The ID of the campaign.
          example: f454d283-ca87-4a8a-bdbb-df212eca5353
          explode: true
          in: path
          name: campaign_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
          description: The requested `Campaign`.
      security:
        - BearerAuth: []
components:
  schemas:
    Campaign:
      description: An access review campaign.
      example:
        campaign_id: f454d283-ca87-4a8a-bdbb-df212eca5353
        name: Q3 Access Review
        status: DRAFT
        is_template: false
        created_at: '2026-07-01T00:00:00.000Z'
        updated_at: '2026-07-01T00:00:00.000Z'
        created_by_user_id: 32acc112-21ff-4669-91c2-21e27683eaa1
        configuration: null
        started_at: null
        started_by_user_id: null
        stopped_at: null
        stopped_by_user_id: null
        ended_at: null
        ended_by_user_id: null
      properties:
        campaign_id:
          description: The ID of the campaign.
          example: f454d283-ca87-4a8a-bdbb-df212eca5353
          format: uuid
          type: string
        name:
          description: The name of the campaign.
          example: Q3 Access Review
          type: string
        status:
          $ref: '#/components/schemas/CampaignStatusEnum'
        is_template:
          description: >-
            Whether this campaign is a recurring schedule template. Templates
            spawn draft campaigns on schedule rather than being reviewed
            directly.
          example: false
          type: boolean
        created_at:
          description: The creation time of the campaign.
          example: '2026-07-01T00:00:00.000Z'
          format: date-time
          type: string
        updated_at:
          description: The last updated time of the campaign.
          example: '2026-07-01T00:00:00.000Z'
          format: date-time
          type: string
        created_by_user_id:
          description: The ID of the user who created the campaign.
          example: 32acc112-21ff-4669-91c2-21e27683eaa1
          format: uuid
          type: string
        configuration:
          description: The campaign's configuration, if set.
          allOf:
            - $ref: '#/components/schemas/CampaignConfiguration'
          nullable: true
        started_at:
          description: The time the campaign was started, if started.
          example: '2026-07-02T00:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        started_by_user_id:
          description: The ID of the user who started the campaign, if started.
          example: 32acc112-21ff-4669-91c2-21e27683eaa1
          format: uuid
          nullable: true
          type: string
        stopped_at:
          description: The time the campaign was manually stopped, if stopped.
          example: '2026-07-10T00:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        stopped_by_user_id:
          description: The ID of the user who stopped the campaign, if stopped.
          example: 32acc112-21ff-4669-91c2-21e27683eaa1
          format: uuid
          nullable: true
          type: string
        ended_at:
          description: The time the campaign reached its scheduled end, if ended.
          example: '2026-07-14T00:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        ended_by_user_id:
          description: The ID of the user who ended the campaign, if ended.
          example: 32acc112-21ff-4669-91c2-21e27683eaa1
          format: uuid
          nullable: true
          type: string
      required:
        - campaign_id
        - name
        - status
        - is_template
        - created_at
        - updated_at
        - created_by_user_id
      type: object
    CampaignStatusEnum:
      description: The current status of a campaign.
      enum:
        - DRAFT
        - ONGOING
        - COMPLETED
        - STOPPED
        - ENDED
      example: ONGOING
      type: string
    CampaignConfiguration:
      description: Configuration for an access review campaign.
      example:
        configuration_id: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb
        created_at: '2026-07-01T00:00:00.000Z'
        updated_at: '2026-07-01T00:00:00.000Z'
        query: null
        reviewer_assignment_policy: MANUALLY
        allow_self_review: false
        send_reviewer_assignment_notification: true
        allow_reviewer_reassignment: false
        start_date: null
        end_date: '2026-09-30T00:00:00.000Z'
        timezone: America/Los_Angeles
        revoke_on: END
        reminder_schedule:
          - 7
          - 3
          - 1
        reminder_include_manager: true
        require_reason_on_denial: false
        hide_ai_suggestions: false
        custom_start_message: null
        group_asset_visibility_policy: STRICT
        is_template: false
        cron_expression: null
        next_scheduled_run: null
        last_scheduled_run: null
        recurring_duration_days: null
      properties:
        configuration_id:
          description: The ID of the campaign configuration.
          example: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb
          format: uuid
          type: string
        created_at:
          description: The creation time of the configuration.
          example: '2026-07-01T00:00:00.000Z'
          format: date-time
          type: string
        updated_at:
          description: The last updated time of the configuration.
          example: '2026-07-01T00:00:00.000Z'
          format: date-time
          type: string
        query:
          description: >-
            Edge-based query defining the scope of access to review. Matches the
            stored Opal edge-query JSON shape.
          nullable: true
          type: object
          additionalProperties: true
        reviewer_assignment_policy:
          $ref: '#/components/schemas/UARReviewerAssignmentPolicyEnum'
        allow_self_review:
          description: Whether reviewers can review their own access.
          example: false
          type: boolean
        send_reviewer_assignment_notification:
          description: Whether to notify reviewers upon assignment.
          example: true
          type: boolean
        allow_reviewer_reassignment:
          description: Whether reviewers may reassign their reviews to another user.
          example: false
          type: boolean
        start_date:
          description: Scheduled start date of the campaign.
          example: '2026-07-02T00:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        end_date:
          description: Scheduled end date of the campaign.
          example: '2026-09-30T00:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        timezone:
          description: >-
            IANA timezone used to interpret campaign deadlines (e.g.
            America/Los_Angeles).
          example: America/Los_Angeles
          type: string
        revoke_on:
          $ref: '#/components/schemas/CampaignRevokeOnEnum'
        reminder_schedule:
          description: Days before end date to send reminder notifications.
          example:
            - 7
            - 3
            - 1
          items:
            type: integer
          type: array
        reminder_include_manager:
          description: Whether to include the reviewer's manager in reminders.
          example: true
          type: boolean
        require_reason_on_denial:
          description: >-
            Whether reviewers must provide a reason when denying (revoking)
            access.
          example: false
          type: boolean
        hide_ai_suggestions:
          description: Whether AI suggestions are hidden from reviewers.
          example: false
          type: boolean
        custom_start_message:
          description: >-
            Optional custom message included when notifying reviewers that the
            campaign started.
          example: Please complete your reviews by Friday.
          nullable: true
          type: string
        group_asset_visibility_policy:
          $ref: '#/components/schemas/CampaignGroupAssetVisibilityPolicyEnum'
        is_template:
          description: Whether this configuration is a recurring schedule template.
          example: false
          type: boolean
        cron_expression:
          description: >-
            Cron expression driving the recurring schedule. Null for one-off
            campaigns.
          example: 0 9 1 * *
          nullable: true
          type: string
        next_scheduled_run:
          description: Next time a draft will be generated from this template.
          example: '2026-08-01T16:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        last_scheduled_run:
          description: Most recent time a draft was generated from this template.
          example: '2026-07-01T16:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        recurring_duration_days:
          description: >-
            Deadline window in days applied to each draft generated from this
            template.
          example: 14
          nullable: true
          type: integer
      required:
        - configuration_id
        - created_at
        - updated_at
        - reviewer_assignment_policy
        - allow_self_review
        - send_reviewer_assignment_notification
        - allow_reviewer_reassignment
        - timezone
        - revoke_on
        - reminder_include_manager
        - require_reason_on_denial
        - hide_ai_suggestions
        - group_asset_visibility_policy
        - is_template
      type: object
    UARReviewerAssignmentPolicyEnum:
      description: >-
        A policy for auto-assigning reviewers. If auto-assignment is on,
        specific assignments can still be manually adjusted after the access
        review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns
        reviews to resource admins in round-robin fashion.
        BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins.
        BY_APPROVERS assigns reviews to resource approvers in round-robin
        fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers.
      enum:
        - MANUALLY
        - BY_OWNING_TEAM_ADMIN
        - BY_OWNING_TEAM_ADMIN_ALL
        - BY_MANAGER
        - BY_APPROVERS
        - BY_APPROVERS_ALL
      example: MANUALLY
      type: string
    CampaignRevokeOnEnum:
      description: When access decisions take effect during a campaign.
      enum:
        - ACTION
        - END
        - NONE
      example: END
      type: string
    CampaignGroupAssetVisibilityPolicyEnum:
      description: Controls what group assets reviewers can see during the campaign.
      enum:
        - STRICT
        - VIEW_VISIBLE_AND_ASSIGNED
        - VIEW_ALL
      example: STRICT
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````