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

# Save culture configuration (step 2 → 3)

> Updates the council sage post with culture/evaluation settings.
Duration is NOT updatable here — it comes from the base sage.

Permission: user must have `ss_council_sage` capability (or
`ss_admin_all`) and belong to the same council as the sage.

Non-customizable (system) sages cannot be edited and will
return an error.

Registered as `wp_ajax_sagescreen_save_culture` — **login required**.




## OpenAPI

````yaml /openapi/private/specs/wp/sage-internal.yml post /wp-admin/admin-ajax.php?action=sagescreen_save_culture
openapi: 3.1.0
info:
  title: SageScreen — Sage Module
  description: >
    Council sage management. Sages are AI screening assistants customized

    per council. Each council can have system sages (non-customizable,

    auto-attached) and custom sages (built through a multi-step workflow).


    **CPT:** `ss_council_sage`

    **Custom statuses:** `ss_draft`, `ss_building`, `ss_active`, `ss_inactive`,
    `ss_paused`


    ## Build Workflow


    Custom sages go through a 6-step creation workflow:

    1. **Context** — Define role, level, and job description

    2. **Culture** — Configure tone, scoring, intro question, evaluation
    guidelines

    3. **Build** — Automated build via Python service (8 sub-steps)

    4. **Test** — Optional test screen to verify sage behavior

    5. **Finalize** — Review and confirm build

    6. **Deploy** — Set email config and activate sage


    Build sub-steps (step 3) run sequentially in the Python service:

    `starting` → `creating_sage` → `sage_generation` → `test_shu` →

    `test_ha` → `test_ri` → `transcending_training` → `enlightenment`
  version: 1.0.0
servers:
  - url: https://{domain}/wp-json/sagescreen/v1
    description: WordPress REST API
    variables:
      domain:
        default: api.sagescreen.app
security: []
tags:
  - name: Sage – REST
    description: REST API endpoints for sage operations and Python callbacks
  - name: Sage – CRUD
    description: AJAX endpoints for sage creation, editing, and status management
  - name: Sage – Build Workflow
    description: AJAX endpoints for the multi-step sage build process
paths:
  /wp-admin/admin-ajax.php?action=sagescreen_save_culture:
    post:
      tags:
        - Sage – CRUD
      summary: Save culture configuration (step 2 → 3)
      description: |
        Updates the council sage post with culture/evaluation settings.
        Duration is NOT updatable here — it comes from the base sage.

        Permission: user must have `ss_council_sage` capability (or
        `ss_admin_all`) and belong to the same council as the sage.

        Non-customizable (system) sages cannot be edited and will
        return an error.

        Registered as `wp_ajax_sagescreen_save_culture` — **login required**.
      operationId: ajaxSaveCulture
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SaveCultureRequest'
      responses:
        '200':
          description: Culture configuration saved
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AjaxSuccessMessage'
                  - $ref: '#/components/schemas/AjaxErrorResponse'
              examples:
                success:
                  summary: Culture saved
                  value:
                    success: true
                    data:
                      message: Culture settings saved
                notCustomizable:
                  summary: Non-customizable sage
                  value:
                    success: false
                    message: This sage is not customizable and cannot be edited.
                noPermission:
                  summary: Insufficient permissions
                  value:
                    success: false
                    message: You do not have permission to edit sages
                wrongCouncil:
                  summary: Council mismatch
                  value:
                    success: false
                    message: >-
                      Access denied: You do not have permission to edit this
                      sage
      security:
        - wpAjaxNonce: []
components:
  schemas:
    SaveCultureRequest:
      type: object
      required:
        - action
        - nonce
        - sage_id
        - role_title
      properties:
        action:
          type: string
          const: sagescreen_save_culture
        nonce:
          type: string
          description: WP nonce for `sagescreen_frontend_nonce`
          examples:
            - abc123def456
        sage_id:
          type: integer
          description: WordPress post ID of the council sage
          examples:
            - 1234
        instructions:
          type: string
          description: Custom instructions for the sage
          examples:
            - Focus on system design and architecture.
        role_title:
          type: string
          description: Role title (required)
          examples:
            - Senior Software Engineer
        intro_question:
          type: string
          description: Opening question
          examples:
            - Tell me about your experience with distributed systems.
        intro_reasoning:
          type: string
          description: Reasoning behind the intro question
          examples:
            - Assesses distributed systems knowledge.
        hire_threshold:
          type: integer
          description: Minimum hire score (0-100)
          examples:
            - 75
        exclude[]:
          type: array
          items:
            type: string
          description: Category IDs to exclude
          examples:
            - - '2'
        include[]:
          type: array
          items:
            type: string
          description: Category IDs to include
          examples:
            - - '1'
              - '3'
        tone[]:
          type: array
          items:
            type: string
          description: Tone attributes
          examples:
            - - professional
              - friendly
        evaluation_guideline:
          type: string
          description: Evaluation strictness
          examples:
            - relaxed
        elevenlabs_voice_id:
          type: string
          description: ElevenLabs voice ID
          examples:
            - EXAVITQu4vr4xnSDxMaL
        sage_language:
          type: string
          description: ISO language code
          examples:
            - en
    AjaxSuccessMessage:
      type: object
      properties:
        success:
          type: boolean
          const: true
          examples:
            - true
        data:
          type: object
          required:
            - message
          properties:
            message:
              type: string
              examples:
                - Operation completed successfully
    AjaxErrorResponse:
      type: object
      description: |
        Standard AJAX error. The `data` field is either a plain string
        (from `wp_send_json_error`) or absent when using `wp_send_json`
        directly with `success: false`.
      properties:
        success:
          type: boolean
          const: false
          examples:
            - false
        message:
          type: string
          description: Error message (when using wp_send_json directly)
          examples:
            - Security check failed
        data:
          oneOf:
            - type: string
              examples:
                - Security check failed
            - type: object
              properties:
                message:
                  type: string
                  examples:
                    - Insufficient permissions
  securitySchemes:
    wpAjaxNonce:
      type: apiKey
      in: query
      name: nonce
      description: WordPress AJAX nonce (passed as form field, verified per-action)

````