# Update a parent test

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /email-placement/update/parent-test:
    patch:
      summary: Update a parent test
      deprecated: false
      description: >-
        Update test configuration including settings, scheduling, recipients,
        senders, and content.
      operationId: updateParentTest
      tags:
        - Email Placement Test/Parent Recurring Test
        - Parent Tests
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - workspace_id
                - test_id
                - throttle
                - tz
                - frequency
                - no_of_week
                - days_of_week
              properties:
                workspace_id:
                  type: string
                  pattern: ^[a-f0-9]{24}$
                  description: Workspace ID
                test_id:
                  type: string
                  pattern: ^[a-f0-9]{24}$
                  description: Parent reccuring test ID
                  examples:
                    - 65f3c92d3dbe5dbb35374abc
                name:
                  type: string
                  description: Updated test name
                status:
                  type: string
                  description: Test status (ACTIVE, INACTIVE)
                  enum:
                    - ACTIVE
                    - PAUSED
                    - INACTIVE
                  x-apidog-enum:
                    - value: ACTIVE
                      name: ''
                      description: ''
                    - value: PAUSED
                      name: ''
                      description: ''
                    - value: INACTIVE
                      name: ''
                      description: ''
                send_as_txt:
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                  description: Send emails as plain text
                is_public:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: Make test results public (0=private, 1=public)
                start_now:
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                  description: >-
                    "yes" to start a Test Run immediately. Status must be
                    ACTIVE.
                throttle:
                  type: string
                  enum:
                    - AI
                    - SEQUENTIAL
                  description: Email sending mode (SEQUENTIAL or AI)
                min_intv:
                  type: integer
                  minimum: 1
                  description: >-
                    Minimum interval in minutes (required if
                    throttle=SEQUENTIAL)
                st_date:
                  type: string
                  format: date
                  description: (Optional)Start date (YYYY-MM-DD)
                  examples:
                    - '2024-03-01'
                end_date:
                  type: string
                  format: date
                  description: (Optional) End date (YYYY-MM-DD)
                  examples:
                    - '2024-03-31'
                st_time:
                  type: string
                  pattern: ^\d{2}:\d{2}$
                  description: Start time (HH:MM), e.g. 09:00
                  examples:
                    - '09:00'
                end_time:
                  type: string
                  pattern: ^\d{2}:\d{2}$
                  description: End time (HH:MM),  e.g. 18:00 (ONLY required if throttle=AI)
                  examples:
                    - '17:00'
                tz:
                  type: string
                  description: >-
                    Timezone, IANA timezone identifier (e.g., "Asia/Singapore",
                    "UTC")
                  examples:
                    - America/New_York
                frequency:
                  type: string
                  description: Test frequency (WEEKLY)
                  enum:
                    - WEEKLY
                  x-apidog-enum:
                    - value: WEEKLY
                      name: ''
                      description: ''
                no_of_week:
                  type: integer
                  enum:
                    - 1
                    - 2
                  description: Week interval
                days_of_week:
                  type: array
                  items:
                    type: string
                    enum:
                      - Sunday
                      - Monday
                      - Tuesday
                      - Wednesday
                      - Thursday
                      - Friday
                      - Saturday
                  description: Days of week to run e.g.  ["Wednesday", "Tuesday", "Friday"]
                  examples:
                    - - Monday
                      - Wednesday
                      - Friday
                recipient_config:
                  type: object
                  description: Recipient configuration
                  properties:
                    rec_providers:
                      type: array
                      items:
                        type: object
                        properties:
                          recipient_type:
                            type: string
                            description: >-
                              Use "Get recipient provider" endpoint to get list
                              of recipient_type, e.g. GOOGLE, PERSONAL_GMAIL
                          max_emails:
                            type: integer
                            description: Max emails per recipient type
                        x-apidog-orders:
                          - recipient_type
                          - max_emails
                        x-apidog-ignore-properties: []
                  x-apidog-orders:
                    - rec_providers
                  x-apidog-ignore-properties: []
                sender_config:
                  type: object
                  description: Sender configuration
                  properties:
                    senders:
                      type: array
                      items:
                        type: string
                        pattern: ^[a-f0-9]{24}$
                        description: Array of sender account Id
                  x-apidog-orders:
                    - senders
                  x-apidog-ignore-properties: []
                content_config:
                  type: object
                  description: Content configuration
                  properties:
                    type:
                      type: string
                      enum:
                        - CAMPAIGN
                        - MANUAL
                      description: CAMPAIGN or MANUAL
                    random:
                      type: integer
                      enum:
                        - 0
                        - 1
                      description: set as 1 to randomize campaign content for each run
                    subject:
                      type: string
                      description: Required for MANUAL
                    body:
                      type: string
                      description: Required for MANUAL
                    campaign_ids:
                      type: array
                      items:
                        type: string
                        pattern: ^[a-f0-9]{24}$
                        description: Array of campaign id
                      description: Required for CAMPAIGN
                    step:
                      type: integer
                      minimum: 1
                      description: Required for CAMPAIGN and when random is off
                    variation:
                      type: string
                      description: Required for CAMPAIGN and when random is off
                  x-apidog-orders:
                    - type
                    - random
                    - subject
                    - body
                    - campaign_ids
                    - step
                    - variation
                  x-apidog-ignore-properties: []
              x-apidog-orders:
                - workspace_id
                - test_id
                - name
                - status
                - send_as_txt
                - is_public
                - start_now
                - throttle
                - min_intv
                - st_date
                - end_date
                - st_time
                - end_time
                - tz
                - frequency
                - no_of_week
                - days_of_week
                - recipient_config
                - sender_config
                - content_config
              x-apidog-ignore-properties: []
            examples: {}
      responses:
        '200':
          description: Test updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          headers: {}
          x-apidog-name: ''
        '400':
          description: Bad request - validation error or missing required fields
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: 0
                message: Validation error
                error: Validation error
                errors:
                  - workspace_id is required
                  - api_key must be a valid string
          headers: {}
          x-apidog-name: BadRequest
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema: *ref_0
              example:
                status: 0
                message: Unauthorized
                error: Invalid API key
          headers: {}
          x-apidog-name: Unauthorized
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: Email Placement Test/Parent Recurring Test
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-28696780-run
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        status:
          type: integer
          examples:
            - 1
        message:
          type: string
          examples:
            - Operation successful
        data:
          type: object
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - status
        - message
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      required:
        - code
        - message
        - data
      properties:
        code:
          type: integer
          enum:
            - 0
        message:
          type: string
        data:
          type: object
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - code
        - message
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
