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

# Set evaluation targets

> Replaces the full set of targets — who the evaluation grades. Targets expand to agents live: `organization` covers every agent in the organization, `team` every agent a team owns, `user` a member's personal agents, `agent` one agent. Removing the last target pauses an enabled evaluation; `enabled` in the response reflects that.




## OpenAPI

````yaml put /evaluations/{evaluation_id}/targets
openapi: 3.0.0
info:
  title: Public API
  version: 1.0.0
servers:
  - url: https://api.gumloop.com/api/v1
security: []
paths:
  /evaluations/{evaluation_id}/targets:
    put:
      tags:
        - Organization Evaluations
      summary: Set evaluation targets
      description: >
        Replaces the full set of targets — who the evaluation grades. Targets
        expand to agents live: `organization` covers every agent in the
        organization, `team` every agent a team owns, `user` a member's personal
        agents, `agent` one agent. Removing the last target pauses an enabled
        evaluation; `enabled` in the response reflects that.
      operationId: setOrganizationEvaluationTargets
      parameters:
        - in: path
          name: evaluation_id
          required: true
          schema:
            type: string
          description: ID of the organization evaluation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - targets
              properties:
                targets:
                  type: array
                  maxItems: 1000
                  items:
                    $ref: '#/components/schemas/EvaluationTarget'
      responses:
        '200':
          description: The saved targets and resulting coverage.
          content:
            application/json:
              schema:
                type: object
                properties:
                  targets:
                    type: array
                    items:
                      $ref: '#/components/schemas/EvaluationTarget'
                  covered_agent_count:
                    type: integer
                    description: Agents the targets currently expand to.
                  enabled:
                    type: boolean
                    description: Whether the evaluation is still enabled after the change.
              example:
                targets:
                  - type: team
                    id: team_4f8c92ab
                  - type: agent
                    id: agent_91ab73cd
                covered_agent_count: 12
                enabled: true
        '400':
          description: >-
            Invalid request (for example a `team`, `user`, or `agent` target
            without an `id`).
        '401':
          description: Unauthorized — missing or invalid credentials.
        '403':
          description: >-
            Forbidden — not an organization admin, or the organization is not on
            the Enterprise plan.
        '404':
          description: >-
            Evaluation not found, or a target is not part of this organization
            (`organization_evaluation_target_not_in_organization`).
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl -X PUT
            'https://api.gumloop.com/api/v1/evaluations/EVALUATION_ID/targets' \
              -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
              -H 'Content-Type: application/json' \
              -d '{"targets": [{"type": "team", "id": "TEAM_ID"}, {"type": "agent", "id": "AGENT_ID"}]}'
        - lang: python
          label: Python
          source: |
            from gumloop import Gumloop

            client = Gumloop(access_token="YOUR_ACCESS_TOKEN")

            response = client.evaluations.set_targets(
                "EVALUATION_ID",
                [{"type": "team", "id": "TEAM_ID"}, {"type": "agent", "id": "AGENT_ID"}],
            )
            print(response.covered_agent_count)
components:
  schemas:
    EvaluationTarget:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - organization
            - team
            - user
            - agent
          description: >-
            What the target expands to. `user` covers a member's personal
            agents.
        id:
          type: string
          description: >-
            Team, user, or agent ID. Omitted for `organization`; responses
            return the organization ID.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A personal API key or an [OAuth 2.0](/api-reference/oauth) access token.
        Personal API keys also require the `x-auth-key` header with your user
        ID.

````