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

# Update red team spec

> Update a red team spec



## OpenAPI

````yaml PATCH /api/dataframer/red-team-specs/{spec_id}/
openapi: 3.0.0
info:
  title: DataFramer API
  version: 0.1.0
  description: ''
  termsOfService: https://www.aimon.ai/docs/privacy-policy.pdf
  contact:
    name: DataFramer Support
    email: info@dataframer.ai
  license:
    name: Proprietary
  x-logo:
    url: https://dataframer.ai/logo.png
    altText: DataFramer AI
  x-stainless:
    package-name: aimon-dataframer
    namespace:
      - aimon
      - dataframer
servers:
  - url: https://df-api.dataframer.ai
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Seed Datasets
    description: Manage seed datasets for generation
  - name: Specs
    description: Data specifications for sample generation
  - name: Runs
    description: Generation runs and results
  - name: Evaluations
    description: Evaluate generated sample quality
  - name: Red Teaming
    description: Security testing and adversarial prompts
  - name: Spec Creation
    description: Create specs from datasets or from scratch (seedless)
  - name: Generation
    description: Synthetic data generation
  - name: API Keys
    description: API key management and rotation
  - name: Health
    description: Health check endpoints
  - name: Models
    description: Available AI models
externalDocs:
  description: Complete API Guide
  url: https://docs.dataframer.ai/dataframer
paths:
  /api/dataframer/red-team-specs/{spec_id}/:
    parameters:
      - name: spec_id
        in: path
        required: true
        description: UUID of the red team spec
        schema:
          type: string
          format: uuid
    patch:
      tags:
        - Red Teaming
      summary: Update red team spec
      description: Update a red team spec
      operationId: api_dataframer_red-team-specs_partial_update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedTeamSpecUpdate'
            examples:
              update_concerns:
                summary: Update concerns only
                value:
                  concerns: >-
                    Should not provide medical diagnoses, prescription
                    recommendations, or discuss specific medications
      responses:
        '200':
          description: Red team spec updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedTeamSpec'
        '400':
          description: Validation error or invalid UUID
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  name:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication credentials were not provided
        '402':
          description: Payment required - subscription inactive
        '404':
          description: Red team spec not found
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dataframer from 'dataframer';

            const client = new Dataframer({
              apiKey: process.env['DATAFRAMER_API_KEY'], // This is the default and can be omitted
            });

            const redTeamSpec = await client.dataframer.redTeamSpecs.update(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              {
                concerns:
                  'Should not provide medical diagnoses, prescription recommendations, or discuss specific medications',
              },
            );

            console.log(redTeamSpec.id);
        - lang: Python
          source: |-
            import os
            from dataframer import Dataframer

            client = Dataframer(
                api_key=os.environ.get("DATAFRAMER_API_KEY"),  # This is the default and can be omitted
            )
            red_team_spec = client.dataframer.red_team_specs.update(
                spec_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                concerns="Should not provide medical diagnoses, prescription recommendations, or discuss specific medications",
            )
            print(red_team_spec.id)
components:
  schemas:
    RedTeamSpecUpdate:
      type: object
      description: Request body for updating a red team spec (all fields optional)
      properties:
        name:
          type: string
          description: New name for the spec (will be converted to snake_case)
        domain_description:
          type: string
          description: Updated domain description
        app_description:
          type: string
          description: Updated application description
        concerns:
          type: string
          description: Updated security concerns
    RedTeamSpec:
      type: object
      description: >-
        A red team specification defining the application context for
        adversarial prompt generation
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Unique identifier for the red team spec
        name:
          type: string
          description: Name of the red team spec (auto-converted to snake_case)
        domain_description:
          type: string
          description: Description of the domain or industry the application operates in
        app_description:
          type: string
          description: >-
            Description of the application being tested, including its purpose
            and functionality
        concerns:
          type: string
          nullable: true
          description: >-
            Specific security concerns or behaviors to focus on during red
            teaming
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when the spec was created
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when the spec was last modified
        company_id:
          type: string
          format: uuid
          readOnly: true
          description: ID of the company that owns this spec
        company_name:
          type: string
          readOnly: true
          description: Name of the company that owns this spec
        created_by:
          type: integer
          readOnly: true
          description: ID of the user who created this spec
        created_by_email:
          type: string
          readOnly: true
          description: Email of the user who created this spec
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API Key authentication. Format: "Bearer YOUR_API_KEY"'

````