openapi: 3.0.3
info:
  title: 'Varify.io API Documentation'
  description: "The Varify.io Public API allows you to programmatically manage A/B testing experiments, retrieve analytics reports, and integrate Varify with your existing workflows.\n\n**Base URL:** `https://app.varify.io/papi` | **Rate Limit:** 60 requests/minute\n\n⚠️ **To get started**, see the **Authentication** section below to obtain an access token.\n\n**Need Help?** Contact us at support@varify.io"
  version: 1.0.0
servers:
  -
    url: 'https://app.varify.io'
tags:
  -
    name: Authentication
    description: 'Endpoints for obtaining and managing API access tokens.'
  -
    name: Clients
    description: 'Manage clients within your agency'
  -
    name: Experiments
    description: 'Manage A/B testing experiments'
  -
    name: Reports
    description: 'Retrieve experiment analytics and reports'
  -
    name: Schema
    description: 'JSON Schema definitions for complex request fields'
  -
    name: 'Global JavaScript'
    description: 'Manage team-wide JavaScript'
  -
    name: Goals
    description: 'Manage Varify goals'
  -
    name: Other
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'Use the **Authentication → Get Access Token** endpoint to obtain your bearer token.'
security:
  -
    default: []
paths:
  /oauth/token:
    post:
      summary: 'Get Access Token'
      operationId: getAccessToken
      description: "Exchange your Client ID and Client Secret for an Access Token using OAuth 2.0 Client Credentials flow.\n\n**Important:** You must use this endpoint first before calling any other API endpoints. The Client ID and Client Secret cannot be used directly for API authentication.\n\nThe returned `access_token` should be included in the `Authorization` header of all subsequent API requests.\n"
      parameters: []
      responses:
        200:
          description: 'Successfully obtained access token.'
          content:
            application/json:
              schema:
                type: object
                example:
                  token_type: Bearer
                  expires_in: 31536000
                  access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5ZTFhMmIzYy00ZDVlLTZmN2EtOGI5Yy0wZDFlMmYzYTRiNWMiLCJqdGkiOiJhYmMxMjM0NTY3ODkwIiwiaWF0IjoxNzAyNjQwMDAwLCJuYmYiOjE3MDI2NDAwMDAsImV4cCI6MTczNDE3NjAwMCwic3ViIjoiIiwic2NvcGVzIjpbIioiXX0.example_signature
                properties:
                  token_type:
                    type: string
                    example: Bearer
                    description: 'The type of token. Always `Bearer`.'
                  expires_in:
                    type: integer
                    example: 31536000
                    description: 'Token validity duration in seconds (default 1 year).'
                  access_token:
                    type: string
                    example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5ZTFhMmIzYy00ZDVlLTZmN2EtOGI5Yy0wZDFlMmYzYTRiNWMiLCJqdGkiOiJhYmMxMjM0NTY3ODkwIiwiaWF0IjoxNzAyNjQwMDAwLCJuYmYiOjE3MDI2NDAwMDAsImV4cCI6MTczNDE3NjAwMCwic3ViIjoiIiwic2NvcGVzIjpbIioiXX0.example_signature
                    description: 'The JWT access token to use in the Authorization header.'
        401:
          description: 'Invalid credentials.'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: invalid_client
                  error_description: 'Client authentication failed'
                  message: 'Client authentication failed'
                properties:
                  error:
                    type: string
                    example: invalid_client
                  error_description:
                    type: string
                    example: 'Client authentication failed'
                  message:
                    type: string
                    example: 'Client authentication failed'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  description: 'The OAuth grant type. Must be `client_credentials`.'
                  example: client_credentials
                client_id:
                  type: string
                  description: 'Your API Client ID from Team Settings → API Keys.'
                  example: 9e1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
                client_secret:
                  type: string
                  description: 'Your API Client Secret (shown only once when created).'
                  example: your-client-secret
                scope:
                  type: string
                  description: 'The scope of access, space-separated. Use `*` for full access, including scopes added later, or list specific scopes like `list-clients list-experiments show-experiment create-experiment update-experiment`. Each endpoint names the scope it requires.'
                  example: '*'
              required:
                - grant_type
                - client_id
                - client_secret
      security: []
  /papi/clients:
    get:
      summary: 'List all clients'
      operationId: listAllClients
      description: "Returns a paginated list of all clients belonging to your agency.\n\n**Required scope:** `client:index`\n\n**Note:** This endpoint is only available for agency accounts."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 2
                      email: docs@varify.io
                      bigquery_dataset_id: null
                      bigquery_integration_enabled: false
                      bigquery_project_id: null
                      billing_address: null
                      billing_address_line_2: null
                      billing_city: null
                      billing_country: null
                      billing_state: null
                      billing_zip: null
                      card_country: null
                      consent: true
                      created_at: '2026-11-25T14:15:30.000000Z'
                      current_billing_plan: null
                      data_save_mode: false
                      domain: 'https://acme.example.com'
                      experiments_count: null
                      extra_billing_information: null
                      ga4_account_id: null
                      ga4_dimension_id: null
                      ga4_integration_enabled: null
                      ga4_property_id: null
                      google_access_token: null
                      has_google_service_account: false
                      google_consent_mode: false
                      invitations_count: null
                      local_invoices_count: null
                      name: 'Acme Shop'
                      notifications_count: null
                      owner_id: 1
                      photo_url: 'https://www.gravatar.com/avatar/e2f524006d700265df778381cd47e00164b89ece5b23ca31cd4e7a837b042f0f.jpg?s=200&d=identicon'
                      pm_last_four: null
                      pm_type: null
                      read_notifications_count: null
                      should_exclude_duplicate_user_events: false
                      should_exclude_empty_purchases: false
                      should_exclude_multi_variant_users: false
                      slug: docs-client
                      stripe_id: null
                      subscriptions_count: null
                      team_id: null
                      tokens_count: null
                      total_potential_users_count: null
                      tracking: disabled
                      trial_ends_at: null
                      type: client
                      unread_notifications_count: null
                      updated_at: '2026-11-25T14:15:30.000000Z'
                      users_count: null
                      vat_id: null
                    -
                      id: 2
                      email: docs@varify.io
                      bigquery_dataset_id: null
                      bigquery_integration_enabled: false
                      bigquery_project_id: null
                      billing_address: null
                      billing_address_line_2: null
                      billing_city: null
                      billing_country: null
                      billing_state: null
                      billing_zip: null
                      card_country: null
                      consent: true
                      created_at: '2026-11-25T14:15:30.000000Z'
                      current_billing_plan: null
                      data_save_mode: false
                      domain: 'https://acme.example.com'
                      experiments_count: null
                      extra_billing_information: null
                      ga4_account_id: null
                      ga4_dimension_id: null
                      ga4_integration_enabled: null
                      ga4_property_id: null
                      google_access_token: null
                      has_google_service_account: false
                      google_consent_mode: false
                      invitations_count: null
                      local_invoices_count: null
                      name: 'Acme Shop'
                      notifications_count: null
                      owner_id: 1
                      photo_url: 'https://www.gravatar.com/avatar/e2f524006d700265df778381cd47e00164b89ece5b23ca31cd4e7a837b042f0f.jpg?s=200&d=identicon'
                      pm_last_four: null
                      pm_type: null
                      read_notifications_count: null
                      should_exclude_duplicate_user_events: false
                      should_exclude_empty_purchases: false
                      should_exclude_multi_variant_users: false
                      slug: docs-client
                      stripe_id: null
                      subscriptions_count: null
                      team_id: null
                      tokens_count: null
                      total_potential_users_count: null
                      tracking: disabled
                      trial_ends_at: null
                      type: client
                      unread_notifications_count: null
                      updated_at: '2026-11-25T14:15:30.000000Z'
                      users_count: null
                      vat_id: null
                  links:
                    first: '/?page=1'
                    last: '/?page=1'
                    prev: null
                    next: null
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 1
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        page: null
                        active: false
                      -
                        url: '/?page=1'
                        label: '1'
                        page: 1
                        active: true
                      -
                        url: null
                        label: 'Next &raquo;'
                        page: null
                        active: false
                    path: /
                    per_page: 15
                    to: 2
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 2
                        email: docs@varify.io
                        bigquery_dataset_id: null
                        bigquery_integration_enabled: false
                        bigquery_project_id: null
                        billing_address: null
                        billing_address_line_2: null
                        billing_city: null
                        billing_country: null
                        billing_state: null
                        billing_zip: null
                        card_country: null
                        consent: true
                        created_at: '2026-11-25T14:15:30.000000Z'
                        current_billing_plan: null
                        data_save_mode: false
                        domain: 'https://acme.example.com'
                        experiments_count: null
                        extra_billing_information: null
                        ga4_account_id: null
                        ga4_dimension_id: null
                        ga4_integration_enabled: null
                        ga4_property_id: null
                        google_access_token: null
                        has_google_service_account: false
                        google_consent_mode: false
                        invitations_count: null
                        local_invoices_count: null
                        name: 'Acme Shop'
                        notifications_count: null
                        owner_id: 1
                        photo_url: 'https://www.gravatar.com/avatar/e2f524006d700265df778381cd47e00164b89ece5b23ca31cd4e7a837b042f0f.jpg?s=200&d=identicon'
                        pm_last_four: null
                        pm_type: null
                        read_notifications_count: null
                        should_exclude_duplicate_user_events: false
                        should_exclude_empty_purchases: false
                        should_exclude_multi_variant_users: false
                        slug: docs-client
                        stripe_id: null
                        subscriptions_count: null
                        team_id: null
                        tokens_count: null
                        total_potential_users_count: null
                        tracking: disabled
                        trial_ends_at: null
                        type: client
                        unread_notifications_count: null
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        users_count: null
                        vat_id: null
                      -
                        id: 2
                        email: docs@varify.io
                        bigquery_dataset_id: null
                        bigquery_integration_enabled: false
                        bigquery_project_id: null
                        billing_address: null
                        billing_address_line_2: null
                        billing_city: null
                        billing_country: null
                        billing_state: null
                        billing_zip: null
                        card_country: null
                        consent: true
                        created_at: '2026-11-25T14:15:30.000000Z'
                        current_billing_plan: null
                        data_save_mode: false
                        domain: 'https://acme.example.com'
                        experiments_count: null
                        extra_billing_information: null
                        ga4_account_id: null
                        ga4_dimension_id: null
                        ga4_integration_enabled: null
                        ga4_property_id: null
                        google_access_token: null
                        has_google_service_account: false
                        google_consent_mode: false
                        invitations_count: null
                        local_invoices_count: null
                        name: 'Acme Shop'
                        notifications_count: null
                        owner_id: 1
                        photo_url: 'https://www.gravatar.com/avatar/e2f524006d700265df778381cd47e00164b89ece5b23ca31cd4e7a837b042f0f.jpg?s=200&d=identicon'
                        pm_last_four: null
                        pm_type: null
                        read_notifications_count: null
                        should_exclude_duplicate_user_events: false
                        should_exclude_empty_purchases: false
                        should_exclude_multi_variant_users: false
                        slug: docs-client
                        stripe_id: null
                        subscriptions_count: null
                        team_id: null
                        tokens_count: null
                        total_potential_users_count: null
                        tracking: disabled
                        trial_ends_at: null
                        type: client
                        unread_notifications_count: null
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        users_count: null
                        vat_id: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        email:
                          type: string
                          example: docs@varify.io
                        bigquery_dataset_id:
                          type: string
                          example: null
                          nullable: true
                        bigquery_integration_enabled:
                          type: boolean
                          example: false
                        bigquery_project_id:
                          type: string
                          example: null
                          nullable: true
                        billing_address:
                          type: string
                          example: null
                          nullable: true
                        billing_address_line_2:
                          type: string
                          example: null
                          nullable: true
                        billing_city:
                          type: string
                          example: null
                          nullable: true
                        billing_country:
                          type: string
                          example: null
                          nullable: true
                        billing_state:
                          type: string
                          example: null
                          nullable: true
                        billing_zip:
                          type: string
                          example: null
                          nullable: true
                        card_country:
                          type: string
                          example: null
                          nullable: true
                        consent:
                          type: boolean
                          example: true
                        created_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
                        current_billing_plan:
                          type: string
                          example: null
                          nullable: true
                        data_save_mode:
                          type: boolean
                          example: false
                        domain:
                          type: string
                          example: 'https://acme.example.com'
                        experiments_count:
                          type: string
                          example: null
                          nullable: true
                        extra_billing_information:
                          type: string
                          example: null
                          nullable: true
                        ga4_account_id:
                          type: string
                          example: null
                          nullable: true
                        ga4_dimension_id:
                          type: string
                          example: null
                          nullable: true
                        ga4_integration_enabled:
                          type: string
                          example: null
                          nullable: true
                        ga4_property_id:
                          type: string
                          example: null
                          nullable: true
                        google_access_token:
                          type: string
                          example: null
                          nullable: true
                        has_google_service_account:
                          type: boolean
                          example: false
                        google_consent_mode:
                          type: boolean
                          example: false
                        invitations_count:
                          type: string
                          example: null
                          nullable: true
                        local_invoices_count:
                          type: string
                          example: null
                          nullable: true
                        name:
                          type: string
                          example: 'Acme Shop'
                        notifications_count:
                          type: string
                          example: null
                          nullable: true
                        owner_id:
                          type: integer
                          example: 1
                        photo_url:
                          type: string
                          example: 'https://www.gravatar.com/avatar/e2f524006d700265df778381cd47e00164b89ece5b23ca31cd4e7a837b042f0f.jpg?s=200&d=identicon'
                        pm_last_four:
                          type: string
                          example: null
                          nullable: true
                        pm_type:
                          type: string
                          example: null
                          nullable: true
                        read_notifications_count:
                          type: string
                          example: null
                          nullable: true
                        should_exclude_duplicate_user_events:
                          type: boolean
                          example: false
                        should_exclude_empty_purchases:
                          type: boolean
                          example: false
                        should_exclude_multi_variant_users:
                          type: boolean
                          example: false
                        slug:
                          type: string
                          example: docs-client
                        stripe_id:
                          type: string
                          example: null
                          nullable: true
                        subscriptions_count:
                          type: string
                          example: null
                          nullable: true
                        team_id:
                          type: string
                          example: null
                          nullable: true
                        tokens_count:
                          type: string
                          example: null
                          nullable: true
                        total_potential_users_count:
                          type: string
                          example: null
                          nullable: true
                        tracking:
                          type: string
                          example: disabled
                        trial_ends_at:
                          type: string
                          example: null
                          nullable: true
                        type:
                          type: string
                          example: client
                        unread_notifications_count:
                          type: string
                          example: null
                          nullable: true
                        updated_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
                        users_count:
                          type: string
                          example: null
                          nullable: true
                        vat_id:
                          type: string
                          example: null
                          nullable: true
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: '/?page=1'
                      last:
                        type: string
                        example: '/?page=1'
                      prev:
                        type: string
                        example: null
                        nullable: true
                      next:
                        type: string
                        example: null
                        nullable: true
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            page: null
                            active: false
                          -
                            url: '/?page=1'
                            label: '1'
                            page: 1
                            active: true
                          -
                            url: null
                            label: 'Next &raquo;'
                            page: null
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                              nullable: true
                            label:
                              type: string
                              example: '&laquo; Previous'
                            page:
                              type: string
                              example: null
                              nullable: true
                            active:
                              type: boolean
                              example: false
                      path:
                        type: string
                        example: /
                      per_page:
                        type: integer
                        example: 15
                      to:
                        type: integer
                        example: 2
                      total:
                        type: integer
                        example: 2
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
      tags:
        - Clients
  /papi/experiments:
    get:
      summary: 'List experiments'
      operationId: listExperiments
      description: "Returns a paginated list of experiments for the specified client.\n\n**Required scope:** `experiment:index`"
      parameters:
        -
          in: query
          name: page_id
          description: 'Page number for pagination'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Page number for pagination'
            example: 1
        -
          in: query
          name: per_page
          description: 'Number of items per page'
          example: 15
          required: false
          schema:
            type: integer
            description: 'Number of items per page'
            example: 15
        -
          in: query
          name: order_by
          description: 'Field to order by'
          example: created_at
          required: false
          schema:
            type: string
            description: 'Field to order by'
            example: created_at
        -
          in: query
          name: order_direction
          description: 'Order direction'
          example: desc
          required: false
          schema:
            type: string
            description: 'Order direction'
            example: desc
            enum:
              - asc
              - desc
        -
          in: query
          name: filter_by_status
          description: 'Filter by status'
          example: active
          required: false
          schema:
            type: string
            description: 'Filter by status'
            example: active
        -
          in: query
          name: filter_by_name
          description: 'Filter by name (partial match)'
          example: architecto
          required: true
          schema:
            type: string
            description: 'Filter by name (partial match)'
            example: architecto
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      name: 'Homepage hero headline'
                      type: client
                      big_query_events_count: null
                      bigquery_report: null
                      bigquery_report_updated_at: null
                      cached_reports_count: null
                      created_at: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id: null
                      ga4_events_count: null
                      ga4_metrics_count: null
                      ga4_report: null
                      ga4_report_updated_at: null
                      url: 'https://acme.example.com'
                      slug: homepage-hero-headline
                      started_at: null
                      scheduled_start_date: null
                      scheduled_end_date: null
                      status: initial
                      tracking_enabled: true
                      javascript: null
                      css: null
                      javascript_reset: null
                      updated_at: '2026-11-25T14:15:30.000000Z'
                      variations_count: null
                      variations:
                        -
                          id: 1
                          name: 'Variation 1'
                          changesets: null
                          created_at: '2026-11-25T14:15:30.000000Z'
                          css: null
                          experiment_id: 1
                          extensions: null
                          ga4_audience_id: null
                          javascript: null
                          javascript_reset: null
                          redirect_url: null
                          sequences_count: null
                          slug: variation-1
                          traffic_allocation: 50
                          updated_at: '2026-11-25T14:15:30.000000Z'
                          preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                          force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id: null
                      primary_goal_type: null
                    -
                      id: 1
                      name: 'Homepage hero headline'
                      type: client
                      big_query_events_count: null
                      bigquery_report: null
                      bigquery_report_updated_at: null
                      cached_reports_count: null
                      created_at: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id: null
                      ga4_events_count: null
                      ga4_metrics_count: null
                      ga4_report: null
                      ga4_report_updated_at: null
                      url: 'https://acme.example.com'
                      slug: homepage-hero-headline
                      started_at: null
                      scheduled_start_date: null
                      scheduled_end_date: null
                      status: initial
                      tracking_enabled: true
                      javascript: null
                      css: null
                      javascript_reset: null
                      updated_at: '2026-11-25T14:15:30.000000Z'
                      variations_count: null
                      variations:
                        -
                          id: 1
                          name: 'Variation 1'
                          changesets: null
                          created_at: '2026-11-25T14:15:30.000000Z'
                          css: null
                          experiment_id: 1
                          extensions: null
                          ga4_audience_id: null
                          javascript: null
                          javascript_reset: null
                          redirect_url: null
                          sequences_count: null
                          slug: variation-1
                          traffic_allocation: 50
                          updated_at: '2026-11-25T14:15:30.000000Z'
                          preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                          force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id: null
                      primary_goal_type: null
                  links:
                    first: '/?page=1'
                    last: '/?page=1'
                    prev: null
                    next: null
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 1
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        page: null
                        active: false
                      -
                        url: '/?page=1'
                        label: '1'
                        page: 1
                        active: true
                      -
                        url: null
                        label: 'Next &raquo;'
                        page: null
                        active: false
                    path: /
                    per_page: 15
                    to: 2
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Homepage hero headline'
                        type: client
                        big_query_events_count: null
                        bigquery_report: null
                        bigquery_report_updated_at: null
                        cached_reports_count: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        ga4_audience_id: null
                        ga4_events_count: null
                        ga4_metrics_count: null
                        ga4_report: null
                        ga4_report_updated_at: null
                        url: 'https://acme.example.com'
                        slug: homepage-hero-headline
                        started_at: null
                        scheduled_start_date: null
                        scheduled_end_date: null
                        status: initial
                        tracking_enabled: true
                        javascript: null
                        css: null
                        javascript_reset: null
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        variations_count: null
                        variations:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        primary_goal_id: null
                        primary_goal_type: null
                      -
                        id: 1
                        name: 'Homepage hero headline'
                        type: client
                        big_query_events_count: null
                        bigquery_report: null
                        bigquery_report_updated_at: null
                        cached_reports_count: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        ga4_audience_id: null
                        ga4_events_count: null
                        ga4_metrics_count: null
                        ga4_report: null
                        ga4_report_updated_at: null
                        url: 'https://acme.example.com'
                        slug: homepage-hero-headline
                        started_at: null
                        scheduled_start_date: null
                        scheduled_end_date: null
                        status: initial
                        tracking_enabled: true
                        javascript: null
                        css: null
                        javascript_reset: null
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        variations_count: null
                        variations:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        primary_goal_id: null
                        primary_goal_type: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Homepage hero headline'
                        type:
                          type: string
                          example: client
                        big_query_events_count:
                          type: string
                          example: null
                          nullable: true
                        bigquery_report:
                          type: string
                          example: null
                          nullable: true
                        bigquery_report_updated_at:
                          type: string
                          example: null
                          nullable: true
                        cached_reports_count:
                          type: string
                          example: null
                          nullable: true
                        created_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
                        ga4_audience_id:
                          type: string
                          example: null
                          nullable: true
                        ga4_events_count:
                          type: string
                          example: null
                          nullable: true
                        ga4_metrics_count:
                          type: string
                          example: null
                          nullable: true
                        ga4_report:
                          type: string
                          example: null
                          nullable: true
                        ga4_report_updated_at:
                          type: string
                          example: null
                          nullable: true
                        url:
                          type: string
                          example: 'https://acme.example.com'
                        slug:
                          type: string
                          example: homepage-hero-headline
                        started_at:
                          type: string
                          example: null
                          nullable: true
                        scheduled_start_date:
                          type: string
                          example: null
                          nullable: true
                        scheduled_end_date:
                          type: string
                          example: null
                          nullable: true
                        status:
                          type: string
                          example: initial
                        tracking_enabled:
                          type: boolean
                          example: true
                        javascript:
                          type: string
                          example: null
                          nullable: true
                        css:
                          type: string
                          example: null
                          nullable: true
                        javascript_reset:
                          type: string
                          example: null
                          nullable: true
                        updated_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
                        variations_count:
                          type: string
                          example: null
                          nullable: true
                        variations:
                          type: array
                          example:
                            -
                              id: 1
                              name: 'Variation 1'
                              changesets: null
                              created_at: '2026-11-25T14:15:30.000000Z'
                              css: null
                              experiment_id: 1
                              extensions: null
                              ga4_audience_id: null
                              javascript: null
                              javascript_reset: null
                              redirect_url: null
                              sequences_count: null
                              slug: variation-1
                              traffic_allocation: 50
                              updated_at: '2026-11-25T14:15:30.000000Z'
                              preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                              force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: 'Variation 1'
                              changesets:
                                type: string
                                example: null
                                nullable: true
                              created_at:
                                type: string
                                example: '2026-11-25T14:15:30.000000Z'
                              css:
                                type: string
                                example: null
                                nullable: true
                              experiment_id:
                                type: integer
                                example: 1
                              extensions:
                                type: string
                                example: null
                                nullable: true
                              ga4_audience_id:
                                type: string
                                example: null
                                nullable: true
                              javascript:
                                type: string
                                example: null
                                nullable: true
                              javascript_reset:
                                type: string
                                example: null
                                nullable: true
                              redirect_url:
                                type: string
                                example: null
                                nullable: true
                              sequences_count:
                                type: string
                                example: null
                                nullable: true
                              slug:
                                type: string
                                example: variation-1
                              traffic_allocation:
                                type: integer
                                example: 50
                              updated_at:
                                type: string
                                example: '2026-11-25T14:15:30.000000Z'
                              preview_url:
                                type: string
                                example: 'https://acme.example.com?varify-preview=1-variation-1'
                              force_url:
                                type: string
                                example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        primary_goal_id:
                          type: string
                          example: null
                          nullable: true
                        primary_goal_type:
                          type: string
                          example: null
                          nullable: true
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: '/?page=1'
                      last:
                        type: string
                        example: '/?page=1'
                      prev:
                        type: string
                        example: null
                        nullable: true
                      next:
                        type: string
                        example: null
                        nullable: true
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            page: null
                            active: false
                          -
                            url: '/?page=1'
                            label: '1'
                            page: 1
                            active: true
                          -
                            url: null
                            label: 'Next &raquo;'
                            page: null
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                              nullable: true
                            label:
                              type: string
                              example: '&laquo; Previous'
                            page:
                              type: string
                              example: null
                              nullable: true
                            active:
                              type: boolean
                              example: false
                      path:
                        type: string
                        example: /
                      per_page:
                        type: integer
                        example: 15
                      to:
                        type: integer
                        example: 2
                      total:
                        type: integer
                        example: 2
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
    post:
      summary: 'Create experiment'
      operationId: createExperiment
      description: "Creates a new A/B testing experiment with the specified configuration.\n\n**Required scope:** `experiment:create`\n\nThe experiment will be created in **draft** status. Use the \"Update experiment status\" endpoint to activate it."
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    name: 'Homepage hero headline'
                    type: client
                    big_query_events_count: null
                    bigquery_report: null
                    bigquery_report_updated_at: null
                    cached_reports_count: null
                    created_at: '2026-11-25T14:15:30.000000Z'
                    ga4_audience_id: null
                    ga4_events_count: null
                    ga4_metrics_count: null
                    ga4_report: null
                    ga4_report_updated_at: null
                    url: 'https://acme.example.com'
                    slug: homepage-hero-headline
                    started_at: null
                    scheduled_start_date: null
                    scheduled_end_date: null
                    status: initial
                    tracking_enabled: true
                    javascript: null
                    css: null
                    javascript_reset: null
                    updated_at: '2026-11-25T14:15:30.000000Z'
                    variations_count: null
                    variations:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    primary_goal_id: null
                    primary_goal_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Homepage hero headline'
                      type:
                        type: string
                        example: client
                      big_query_events_count:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      cached_reports_count:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id:
                        type: string
                        example: null
                        nullable: true
                      ga4_events_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_metrics_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_report:
                        type: string
                        example: null
                        nullable: true
                      ga4_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      url:
                        type: string
                        example: 'https://acme.example.com'
                      slug:
                        type: string
                        example: homepage-hero-headline
                      started_at:
                        type: string
                        example: null
                        nullable: true
                      scheduled_start_date:
                        type: string
                        example: null
                        nullable: true
                      scheduled_end_date:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: initial
                      tracking_enabled:
                        type: boolean
                        example: true
                      javascript:
                        type: string
                        example: null
                        nullable: true
                      css:
                        type: string
                        example: null
                        nullable: true
                      javascript_reset:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      variations_count:
                        type: string
                        example: null
                        nullable: true
                      variations:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Variation 1'
                            changesets:
                              type: string
                              example: null
                              nullable: true
                            created_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            css:
                              type: string
                              example: null
                              nullable: true
                            experiment_id:
                              type: integer
                              example: 1
                            extensions:
                              type: string
                              example: null
                              nullable: true
                            ga4_audience_id:
                              type: string
                              example: null
                              nullable: true
                            javascript:
                              type: string
                              example: null
                              nullable: true
                            javascript_reset:
                              type: string
                              example: null
                              nullable: true
                            redirect_url:
                              type: string
                              example: null
                              nullable: true
                            sequences_count:
                              type: string
                              example: null
                              nullable: true
                            slug:
                              type: string
                              example: variation-1
                            traffic_allocation:
                              type: integer
                              example: 50
                            updated_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            preview_url:
                              type: string
                              example: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url:
                              type: string
                              example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id:
                        type: string
                        example: null
                        nullable: true
                      primary_goal_type:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of the experiment'
                  example: 'Homepage Hero Test'
                type:
                  type: string
                  description: 'Experiment type: client, server, or client_aa. Defaults to client. A/A (client_aa) experiments use the same request shape as a client experiment but only require name and page.url; they always run a 50/50 split with default page targeting.'
                  example: client
                page:
                  type: object
                  description: 'Page configuration (required for client experiments)'
                  example: []
                  properties:
                    url:
                      type: string
                      description: 'URL of the page where experiment runs'
                      example: 'http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html'
                    name:
                      type: string
                      description: 'Optional name for the page'
                      example: Homepage
                  required:
                    - url
                tracking_enabled:
                  type: boolean
                  description: 'Whether to enable tracking'
                  example: true
                ga4_audience_id:
                  type: string
                  description: 'GA4 audience ID for targeting'
                  example: architecto
                javascript:
                  type: string
                  description: 'JavaScript code to run when the experiment loads'
                  example: architecto
                css:
                  type: string
                  description: 'CSS styles to apply when the experiment loads'
                  example: architecto
                javascript_reset:
                  type: string
                  description: 'JavaScript code to reset changes when the experiment ends'
                  example: architecto
                variations:
                  type: array
                  description: 'Array of experiment variations'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: 'Name of the variation'
                        example: Control
                      traffic_allocation:
                        type: integer
                        description: 'Traffic percentage (0-100)'
                        example: 50
                      javascript:
                        type: string
                        description: 'JavaScript code for this variation'
                        example: architecto
                      css:
                        type: string
                        description: 'CSS styles for this variation'
                        example: architecto
                    required:
                      - name
                      - traffic_allocation
                      - javascript
                      - css
                audience_targeting:
                  type: array
                  description: 'Audience targeting rules. See `GET /schema/audience-targeting`.'
                  example:
                    -
                      - []
                  items:
                    type: array
                    description: ''
                    example:
                      - []
                    items:
                      type: object
                page_targeting:
                  type: array
                  description: 'Page targeting rules. See `GET /schema/page-targeting`.'
                  example:
                    -
                      - []
                  items:
                    type: array
                    description: ''
                    example:
                      - []
                    items:
                      type: object
              required:
                - name
                - page
                - tracking_enabled
                - ga4_audience_id
                - variations
                - audience_targeting
                - page_targeting
  '/papi/experiments/{experimentId}':
    get:
      summary: 'Get experiment details'
      operationId: getExperimentDetails
      description: "Returns detailed information about a specific experiment including variations and targeting.\n\n**Required scope:** `experiment:show`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    name: 'Homepage hero headline'
                    type: client
                    big_query_events_count: null
                    bigquery_report: null
                    bigquery_report_updated_at: null
                    cached_reports_count: null
                    created_at: '2026-11-25T14:15:30.000000Z'
                    ga4_audience_id: null
                    ga4_events_count: null
                    ga4_metrics_count: null
                    ga4_report: null
                    ga4_report_updated_at: null
                    url: 'https://acme.example.com'
                    slug: homepage-hero-headline
                    started_at: null
                    scheduled_start_date: null
                    scheduled_end_date: null
                    status: initial
                    tracking_enabled: true
                    javascript: null
                    css: null
                    javascript_reset: null
                    updated_at: '2026-11-25T14:15:30.000000Z'
                    variations_count: null
                    variations:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    primary_goal_id: null
                    primary_goal_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Homepage hero headline'
                      type:
                        type: string
                        example: client
                      big_query_events_count:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      cached_reports_count:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id:
                        type: string
                        example: null
                        nullable: true
                      ga4_events_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_metrics_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_report:
                        type: string
                        example: null
                        nullable: true
                      ga4_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      url:
                        type: string
                        example: 'https://acme.example.com'
                      slug:
                        type: string
                        example: homepage-hero-headline
                      started_at:
                        type: string
                        example: null
                        nullable: true
                      scheduled_start_date:
                        type: string
                        example: null
                        nullable: true
                      scheduled_end_date:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: initial
                      tracking_enabled:
                        type: boolean
                        example: true
                      javascript:
                        type: string
                        example: null
                        nullable: true
                      css:
                        type: string
                        example: null
                        nullable: true
                      javascript_reset:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      variations_count:
                        type: string
                        example: null
                        nullable: true
                      variations:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Variation 1'
                            changesets:
                              type: string
                              example: null
                              nullable: true
                            created_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            css:
                              type: string
                              example: null
                              nullable: true
                            experiment_id:
                              type: integer
                              example: 1
                            extensions:
                              type: string
                              example: null
                              nullable: true
                            ga4_audience_id:
                              type: string
                              example: null
                              nullable: true
                            javascript:
                              type: string
                              example: null
                              nullable: true
                            javascript_reset:
                              type: string
                              example: null
                              nullable: true
                            redirect_url:
                              type: string
                              example: null
                              nullable: true
                            sequences_count:
                              type: string
                              example: null
                              nullable: true
                            slug:
                              type: string
                              example: variation-1
                            traffic_allocation:
                              type: integer
                              example: 50
                            updated_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            preview_url:
                              type: string
                              example: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url:
                              type: string
                              example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id:
                        type: string
                        example: null
                        nullable: true
                      primary_goal_type:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
    patch:
      summary: 'Update experiment'
      operationId: updateExperiment
      description: "Updates an existing experiment's configuration, variations, and targeting rules.\n\n**Required scope:** `experiment:update`\n\nYou can update any combination of fields - only the provided fields will be modified.\n\n**Variations:** To update existing variations, include their `id`.\nTo create new variations, omit the `id` field."
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    name: 'Homepage hero headline'
                    type: client
                    big_query_events_count: null
                    bigquery_report: null
                    bigquery_report_updated_at: null
                    cached_reports_count: null
                    created_at: '2026-11-25T14:15:30.000000Z'
                    ga4_audience_id: null
                    ga4_events_count: null
                    ga4_metrics_count: null
                    ga4_report: null
                    ga4_report_updated_at: null
                    url: 'https://acme.example.com'
                    slug: homepage-hero-headline
                    started_at: null
                    scheduled_start_date: null
                    scheduled_end_date: null
                    status: initial
                    tracking_enabled: true
                    javascript: null
                    css: null
                    javascript_reset: null
                    updated_at: '2026-11-25T14:15:30.000000Z'
                    variations_count: null
                    variations:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    primary_goal_id: null
                    primary_goal_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Homepage hero headline'
                      type:
                        type: string
                        example: client
                      big_query_events_count:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      cached_reports_count:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id:
                        type: string
                        example: null
                        nullable: true
                      ga4_events_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_metrics_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_report:
                        type: string
                        example: null
                        nullable: true
                      ga4_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      url:
                        type: string
                        example: 'https://acme.example.com'
                      slug:
                        type: string
                        example: homepage-hero-headline
                      started_at:
                        type: string
                        example: null
                        nullable: true
                      scheduled_start_date:
                        type: string
                        example: null
                        nullable: true
                      scheduled_end_date:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: initial
                      tracking_enabled:
                        type: boolean
                        example: true
                      javascript:
                        type: string
                        example: null
                        nullable: true
                      css:
                        type: string
                        example: null
                        nullable: true
                      javascript_reset:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      variations_count:
                        type: string
                        example: null
                        nullable: true
                      variations:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Variation 1'
                            changesets:
                              type: string
                              example: null
                              nullable: true
                            created_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            css:
                              type: string
                              example: null
                              nullable: true
                            experiment_id:
                              type: integer
                              example: 1
                            extensions:
                              type: string
                              example: null
                              nullable: true
                            ga4_audience_id:
                              type: string
                              example: null
                              nullable: true
                            javascript:
                              type: string
                              example: null
                              nullable: true
                            javascript_reset:
                              type: string
                              example: null
                              nullable: true
                            redirect_url:
                              type: string
                              example: null
                              nullable: true
                            sequences_count:
                              type: string
                              example: null
                              nullable: true
                            slug:
                              type: string
                              example: variation-1
                            traffic_allocation:
                              type: integer
                              example: 50
                            updated_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            preview_url:
                              type: string
                              example: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url:
                              type: string
                              example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id:
                        type: string
                        example: null
                        nullable: true
                      primary_goal_type:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'No data provided'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of the experiment'
                  example: 'Updated Test Name'
                page:
                  type: object
                  description: 'Page configuration'
                  example: []
                  properties:
                    url:
                      type: string
                      description: 'URL of the page'
                      example: 'http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html'
                  required:
                    - url
                tracking_enabled:
                  type: boolean
                  description: 'Whether tracking is enabled'
                  example: false
                javascript:
                  type: string
                  description: 'JavaScript code to run when the experiment loads'
                  example: architecto
                css:
                  type: string
                  description: 'CSS styles to apply when the experiment loads'
                  example: architecto
                javascript_reset:
                  type: string
                  description: 'JavaScript code to reset changes when the experiment ends'
                  example: architecto
                status:
                  type: string
                  description: 'Experiment status'
                  example: architecto
                scheduled_start_date:
                  type: string
                  description: 'Start date (YYYY-MM-DD)'
                  example: '2024-02-01'
                scheduled_end_date:
                  type: string
                  description: 'End date (YYYY-MM-DD)'
                  example: '2024-03-01'
                scheduled_timezone:
                  type: string
                  description: 'Timezone for scheduled dates'
                  example: Europe/Berlin
                variations:
                  type: array
                  description: 'Array of variations'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: 'ID of existing variation'
                        example: 16
                      name:
                        type: string
                        description: 'Name of the variation'
                        example: architecto
                      traffic_allocation:
                        type: integer
                        description: 'Traffic percentage (0-100)'
                        example: 16
                    required:
                      - id
                      - name
                      - traffic_allocation
                audience_targeting:
                  type: array
                  description: 'Audience targeting rules. See `GET /schema/audience-targeting`.'
                  example:
                    -
                      - []
                  items:
                    type: array
                    description: ''
                    example:
                      - []
                    items:
                      type: object
                page_targeting:
                  type: array
                  description: 'Page targeting rules. See `GET /schema/page-targeting`.'
                  example:
                    -
                      - []
                  items:
                    type: array
                    description: ''
                    example:
                      - []
                    items:
                      type: object
              required:
                - page
                - tracking_enabled
                - status
                - variations
                - audience_targeting
                - page_targeting
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/status':
    post:
      summary: 'Update experiment status'
      operationId: updateExperimentStatus
      description: "Changes the status of an experiment.\n\n**Required scope:** `experiment:update-status`\n\n**Available statuses:**\n- `draft` - Experiment is not running, can be edited freely\n- `active` - Experiment is running and collecting data\n- `paused` - Experiment is temporarily stopped\n- `completed` - Experiment has finished running\n- `archived` - Experiment is archived and hidden from default views"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    name: 'Homepage hero headline'
                    type: client
                    big_query_events_count: null
                    bigquery_report: null
                    bigquery_report_updated_at: null
                    cached_reports_count: null
                    created_at: '2026-11-25T14:15:30.000000Z'
                    ga4_audience_id: null
                    ga4_events_count: null
                    ga4_metrics_count: null
                    ga4_report: null
                    ga4_report_updated_at: null
                    url: 'https://acme.example.com'
                    slug: homepage-hero-headline
                    started_at: null
                    scheduled_start_date: null
                    scheduled_end_date: null
                    status: initial
                    tracking_enabled: true
                    javascript: null
                    css: null
                    javascript_reset: null
                    updated_at: '2026-11-25T14:15:30.000000Z'
                    variations_count: null
                    variations:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    primary_goal_id: null
                    primary_goal_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Homepage hero headline'
                      type:
                        type: string
                        example: client
                      big_query_events_count:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      cached_reports_count:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id:
                        type: string
                        example: null
                        nullable: true
                      ga4_events_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_metrics_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_report:
                        type: string
                        example: null
                        nullable: true
                      ga4_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      url:
                        type: string
                        example: 'https://acme.example.com'
                      slug:
                        type: string
                        example: homepage-hero-headline
                      started_at:
                        type: string
                        example: null
                        nullable: true
                      scheduled_start_date:
                        type: string
                        example: null
                        nullable: true
                      scheduled_end_date:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: initial
                      tracking_enabled:
                        type: boolean
                        example: true
                      javascript:
                        type: string
                        example: null
                        nullable: true
                      css:
                        type: string
                        example: null
                        nullable: true
                      javascript_reset:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      variations_count:
                        type: string
                        example: null
                        nullable: true
                      variations:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Variation 1'
                            changesets:
                              type: string
                              example: null
                              nullable: true
                            created_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            css:
                              type: string
                              example: null
                              nullable: true
                            experiment_id:
                              type: integer
                              example: 1
                            extensions:
                              type: string
                              example: null
                              nullable: true
                            ga4_audience_id:
                              type: string
                              example: null
                              nullable: true
                            javascript:
                              type: string
                              example: null
                              nullable: true
                            javascript_reset:
                              type: string
                              example: null
                              nullable: true
                            redirect_url:
                              type: string
                              example: null
                              nullable: true
                            sequences_count:
                              type: string
                              example: null
                              nullable: true
                            slug:
                              type: string
                              example: variation-1
                            traffic_allocation:
                              type: integer
                              example: 50
                            updated_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            preview_url:
                              type: string
                              example: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url:
                              type: string
                              example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id:
                        type: string
                        example: null
                        nullable: true
                      primary_goal_type:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: 'New experiment status'
                  example: active
              required:
                - status
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/qa-mode':
    post:
      summary: 'Start experiment QA mode'
      operationId: startExperimentQAMode
      description: "Puts an experiment into QA mode, so its variations are only delivered to QA sessions.\n\nQA mode can only be started for experiments that are not running (`initial` or `paused`).\n\n**Required scope:** `update-experiment-qa-mode`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: 'The updated experiment'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'The experiment is running, archived or already in QA mode'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
    delete:
      summary: 'Stop experiment QA mode'
      operationId: stopExperimentQAMode
      description: "Takes an experiment out of QA mode. An experiment that has run before goes back to `paused`,\notherwise it goes back to `initial`.\n\n**Required scope:** `update-experiment-qa-mode`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: 'The updated experiment'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'The experiment is not in QA mode'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/duplicate':
    post:
      summary: 'Duplicate experiment'
      operationId: duplicateExperiment
      description: "Creates a copy of an existing experiment including all its variations, targeting rules, and configuration.\n\nThe duplicated experiment will be created in **draft** status regardless of the original experiment's status.\n\n**Required scope:** `experiment:duplicate`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    name: 'Homepage hero headline'
                    type: client
                    big_query_events_count: null
                    bigquery_report: null
                    bigquery_report_updated_at: null
                    cached_reports_count: null
                    created_at: '2026-11-25T14:15:30.000000Z'
                    ga4_audience_id: null
                    ga4_events_count: null
                    ga4_metrics_count: null
                    ga4_report: null
                    ga4_report_updated_at: null
                    url: 'https://acme.example.com'
                    slug: homepage-hero-headline
                    started_at: null
                    scheduled_start_date: null
                    scheduled_end_date: null
                    status: initial
                    tracking_enabled: true
                    javascript: null
                    css: null
                    javascript_reset: null
                    updated_at: '2026-11-25T14:15:30.000000Z'
                    variations_count: null
                    variations:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    primary_goal_id: null
                    primary_goal_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Homepage hero headline'
                      type:
                        type: string
                        example: client
                      big_query_events_count:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      cached_reports_count:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id:
                        type: string
                        example: null
                        nullable: true
                      ga4_events_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_metrics_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_report:
                        type: string
                        example: null
                        nullable: true
                      ga4_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      url:
                        type: string
                        example: 'https://acme.example.com'
                      slug:
                        type: string
                        example: homepage-hero-headline
                      started_at:
                        type: string
                        example: null
                        nullable: true
                      scheduled_start_date:
                        type: string
                        example: null
                        nullable: true
                      scheduled_end_date:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: initial
                      tracking_enabled:
                        type: boolean
                        example: true
                      javascript:
                        type: string
                        example: null
                        nullable: true
                      css:
                        type: string
                        example: null
                        nullable: true
                      javascript_reset:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      variations_count:
                        type: string
                        example: null
                        nullable: true
                      variations:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Variation 1'
                            changesets:
                              type: string
                              example: null
                              nullable: true
                            created_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            css:
                              type: string
                              example: null
                              nullable: true
                            experiment_id:
                              type: integer
                              example: 1
                            extensions:
                              type: string
                              example: null
                              nullable: true
                            ga4_audience_id:
                              type: string
                              example: null
                              nullable: true
                            javascript:
                              type: string
                              example: null
                              nullable: true
                            javascript_reset:
                              type: string
                              example: null
                              nullable: true
                            redirect_url:
                              type: string
                              example: null
                              nullable: true
                            sequences_count:
                              type: string
                              example: null
                              nullable: true
                            slug:
                              type: string
                              example: variation-1
                            traffic_allocation:
                              type: integer
                              example: 50
                            updated_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            preview_url:
                              type: string
                              example: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url:
                              type: string
                              example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id:
                        type: string
                        example: null
                        nullable: true
                      primary_goal_type:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment to duplicate'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/traffic-allocation':
    post:
      summary: 'Update traffic allocation'
      operationId: updateTrafficAllocation
      description: "Updates the traffic allocation percentages for an experiment's variations.\n\nThe total allocation across all variations must not exceed 100%.\n\n**Required scope:** `experiment:update-traffic-allocation`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      name: 'Variation 1'
                      changesets: null
                      created_at: '2026-11-25T14:15:30.000000Z'
                      css: null
                      experiment_id: 1
                      extensions: null
                      ga4_audience_id: null
                      javascript: null
                      javascript_reset: null
                      redirect_url: null
                      sequences_count: null
                      slug: variation-1
                      traffic_allocation: 50
                      updated_at: '2026-11-25T14:15:30.000000Z'
                      preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                      force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    -
                      id: 1
                      name: 'Variation 1'
                      changesets: null
                      created_at: '2026-11-25T14:15:30.000000Z'
                      css: null
                      experiment_id: 1
                      extensions: null
                      ga4_audience_id: null
                      javascript: null
                      javascript_reset: null
                      redirect_url: null
                      sequences_count: null
                      slug: variation-1
                      traffic_allocation: 50
                      updated_at: '2026-11-25T14:15:30.000000Z'
                      preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                      force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Variation 1'
                        changesets:
                          type: string
                          example: null
                          nullable: true
                        created_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
                        css:
                          type: string
                          example: null
                          nullable: true
                        experiment_id:
                          type: integer
                          example: 1
                        extensions:
                          type: string
                          example: null
                          nullable: true
                        ga4_audience_id:
                          type: string
                          example: null
                          nullable: true
                        javascript:
                          type: string
                          example: null
                          nullable: true
                        javascript_reset:
                          type: string
                          example: null
                          nullable: true
                        redirect_url:
                          type: string
                          example: null
                          nullable: true
                        sequences_count:
                          type: string
                          example: null
                          nullable: true
                        slug:
                          type: string
                          example: variation-1
                        traffic_allocation:
                          type: integer
                          example: 50
                        updated_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
                        preview_url:
                          type: string
                          example: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url:
                          type: string
                          example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                variations:
                  type: array
                  description: 'Array of variation traffic allocations'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: 'ID of the variation'
                        example: 789
                      value:
                        type: integer
                        description: 'Traffic percentage (0-100)'
                        example: 50
                    required:
                      - id
                      - value
              required:
                - variations
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/goals':
    post:
      summary: 'Update experiment goals'
      operationId: updateExperimentGoals
      description: "Sets the Varify goals of an experiment. The given list replaces the currently assigned goals;\nsend an empty list to remove all of them. The first assigned goal becomes the primary goal when\nthe experiment has none.\n\nRequires the Varify tracking integration to be enabled.\n\n**Required scope:** `update-experiment-goals`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    name: 'Homepage hero headline'
                    type: client
                    big_query_events_count: null
                    bigquery_report: null
                    bigquery_report_updated_at: null
                    cached_reports_count: null
                    created_at: '2026-11-25T14:15:30.000000Z'
                    ga4_audience_id: null
                    ga4_events_count: null
                    ga4_metrics_count: null
                    ga4_report: null
                    ga4_report_updated_at: null
                    url: 'https://acme.example.com'
                    slug: homepage-hero-headline
                    started_at: null
                    scheduled_start_date: null
                    scheduled_end_date: null
                    status: initial
                    tracking_enabled: true
                    javascript: null
                    css: null
                    javascript_reset: null
                    updated_at: '2026-11-25T14:15:30.000000Z'
                    variations_count: null
                    variations:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    primary_goal_id: null
                    primary_goal_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Homepage hero headline'
                      type:
                        type: string
                        example: client
                      big_query_events_count:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      cached_reports_count:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id:
                        type: string
                        example: null
                        nullable: true
                      ga4_events_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_metrics_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_report:
                        type: string
                        example: null
                        nullable: true
                      ga4_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      url:
                        type: string
                        example: 'https://acme.example.com'
                      slug:
                        type: string
                        example: homepage-hero-headline
                      started_at:
                        type: string
                        example: null
                        nullable: true
                      scheduled_start_date:
                        type: string
                        example: null
                        nullable: true
                      scheduled_end_date:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: initial
                      tracking_enabled:
                        type: boolean
                        example: true
                      javascript:
                        type: string
                        example: null
                        nullable: true
                      css:
                        type: string
                        example: null
                        nullable: true
                      javascript_reset:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      variations_count:
                        type: string
                        example: null
                        nullable: true
                      variations:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Variation 1'
                            changesets:
                              type: string
                              example: null
                              nullable: true
                            created_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            css:
                              type: string
                              example: null
                              nullable: true
                            experiment_id:
                              type: integer
                              example: 1
                            extensions:
                              type: string
                              example: null
                              nullable: true
                            ga4_audience_id:
                              type: string
                              example: null
                              nullable: true
                            javascript:
                              type: string
                              example: null
                              nullable: true
                            javascript_reset:
                              type: string
                              example: null
                              nullable: true
                            redirect_url:
                              type: string
                              example: null
                              nullable: true
                            sequences_count:
                              type: string
                              example: null
                              nullable: true
                            slug:
                              type: string
                              example: variation-1
                            traffic_allocation:
                              type: integer
                              example: 50
                            updated_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            preview_url:
                              type: string
                              example: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url:
                              type: string
                              example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id:
                        type: string
                        example: null
                        nullable: true
                      primary_goal_type:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                goals:
                  type: array
                  description: 'IDs of the goals to assign'
                  example:
                    - EQFtv4mTmkhB3d
                  items:
                    type: string
              required:
                - goals
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experiment}/toggle-tracking':
    post:
      summary: 'Toggle experiment tracking'
      operationId: toggleExperimentTracking
      description: "Toggles the tracking status of an experiment between enabled and disabled.\n\nWhen tracking is disabled, the experiment will still run but no data will be collected.\n\n**Required scope:** `experiment:update-tracking`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    name: 'Homepage hero headline'
                    type: client
                    big_query_events_count: null
                    bigquery_report: null
                    bigquery_report_updated_at: null
                    cached_reports_count: null
                    created_at: '2026-11-25T14:15:30.000000Z'
                    ga4_audience_id: null
                    ga4_events_count: null
                    ga4_metrics_count: null
                    ga4_report: null
                    ga4_report_updated_at: null
                    url: 'https://acme.example.com'
                    slug: homepage-hero-headline
                    started_at: null
                    scheduled_start_date: null
                    scheduled_end_date: null
                    status: initial
                    tracking_enabled: true
                    javascript: null
                    css: null
                    javascript_reset: null
                    updated_at: '2026-11-25T14:15:30.000000Z'
                    variations_count: null
                    variations:
                      -
                        id: 1
                        name: 'Variation 1'
                        changesets: null
                        created_at: '2026-11-25T14:15:30.000000Z'
                        css: null
                        experiment_id: 1
                        extensions: null
                        ga4_audience_id: null
                        javascript: null
                        javascript_reset: null
                        redirect_url: null
                        sequences_count: null
                        slug: variation-1
                        traffic_allocation: 50
                        updated_at: '2026-11-25T14:15:30.000000Z'
                        preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                        force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                    primary_goal_id: null
                    primary_goal_type: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Homepage hero headline'
                      type:
                        type: string
                        example: client
                      big_query_events_count:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report:
                        type: string
                        example: null
                        nullable: true
                      bigquery_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      cached_reports_count:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      ga4_audience_id:
                        type: string
                        example: null
                        nullable: true
                      ga4_events_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_metrics_count:
                        type: string
                        example: null
                        nullable: true
                      ga4_report:
                        type: string
                        example: null
                        nullable: true
                      ga4_report_updated_at:
                        type: string
                        example: null
                        nullable: true
                      url:
                        type: string
                        example: 'https://acme.example.com'
                      slug:
                        type: string
                        example: homepage-hero-headline
                      started_at:
                        type: string
                        example: null
                        nullable: true
                      scheduled_start_date:
                        type: string
                        example: null
                        nullable: true
                      scheduled_end_date:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: initial
                      tracking_enabled:
                        type: boolean
                        example: true
                      javascript:
                        type: string
                        example: null
                        nullable: true
                      css:
                        type: string
                        example: null
                        nullable: true
                      javascript_reset:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      variations_count:
                        type: string
                        example: null
                        nullable: true
                      variations:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Variation 1'
                            changesets: null
                            created_at: '2026-11-25T14:15:30.000000Z'
                            css: null
                            experiment_id: 1
                            extensions: null
                            ga4_audience_id: null
                            javascript: null
                            javascript_reset: null
                            redirect_url: null
                            sequences_count: null
                            slug: variation-1
                            traffic_allocation: 50
                            updated_at: '2026-11-25T14:15:30.000000Z'
                            preview_url: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Variation 1'
                            changesets:
                              type: string
                              example: null
                              nullable: true
                            created_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            css:
                              type: string
                              example: null
                              nullable: true
                            experiment_id:
                              type: integer
                              example: 1
                            extensions:
                              type: string
                              example: null
                              nullable: true
                            ga4_audience_id:
                              type: string
                              example: null
                              nullable: true
                            javascript:
                              type: string
                              example: null
                              nullable: true
                            javascript_reset:
                              type: string
                              example: null
                              nullable: true
                            redirect_url:
                              type: string
                              example: null
                              nullable: true
                            sequences_count:
                              type: string
                              example: null
                              nullable: true
                            slug:
                              type: string
                              example: variation-1
                            traffic_allocation:
                              type: integer
                              example: 50
                            updated_at:
                              type: string
                              example: '2026-11-25T14:15:30.000000Z'
                            preview_url:
                              type: string
                              example: 'https://acme.example.com?varify-preview=1-variation-1'
                            force_url:
                              type: string
                              example: 'https://acme.example.com?varify-force=1-1&varify-qa=true'
                      primary_goal_id:
                        type: string
                        example: null
                        nullable: true
                      primary_goal_type:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Experiments
    parameters:
      -
        in: path
        name: experiment
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/report':
    get:
      summary: 'Get experiment report'
      operationId: getExperimentReport
      description: "Retrieves aggregated report data for an experiment within a specified date range.\n\nReturns statistical data including visitors, conversions, revenue,\nand statistical significance for each variation.\n\n**Required scope:** `experiment:report`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: 'Report data'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Reports
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 'Start date (YYYY-MM-DD)'
                  example: '2024-01-01'
                end_date:
                  type: string
                  description: 'End date (YYYY-MM-DD)'
                  example: '2024-01-31'
                report_type:
                  type: string
                  description: 'Analytics provider'
                  example: ga4
                  enum:
                    - ga4
                    - posthog
                should_exclude_duplicate_user_events:
                  type: boolean
                  description: 'Exclude duplicate events'
                  example: false
                is_outlier_correction_enabled:
                  type: boolean
                  description: 'Smooth revenue outliers'
                  example: false
                dimensions:
                  type: object
                  description: 'Segment filters'
                  example: []
                  properties:
                    device:
                      type: string
                      description: 'Filter by device type'
                      example: all
                      enum:
                        - all
                        - desktop
                        - mobile
                        - tablet
                    userType:
                      type: string
                      description: 'Filter by user type'
                      example: all
                      enum:
                        - all
                        - new
                        - returning
                raw_data:
                  type: boolean
                  description: 'Return raw data instead of formatted'
                  example: false
              required:
                - start_date
                - end_date
                - report_type
                - should_exclude_duplicate_user_events
                - is_outlier_correction_enabled
                - dimensions
                - raw_data
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/daily-report':
    get:
      summary: 'Get daily report'
      operationId: getDailyReport
      description: "Retrieves day-by-day report data for an experiment within a specified date range.\n\nReturns daily breakdown of visitors, conversions, and revenue for each variation, useful for trend analysis.\n\n**Required scope:** `experiment:report`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: 'Daily report data'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Reports
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 'Start date (YYYY-MM-DD)'
                  example: '2024-01-01'
                end_date:
                  type: string
                  description: 'End date (YYYY-MM-DD)'
                  example: '2024-01-31'
                report_type:
                  type: string
                  description: 'Analytics provider'
                  example: ga4
                  enum:
                    - ga4
                    - posthog
                should_exclude_duplicate_user_events:
                  type: boolean
                  description: 'Exclude duplicate events'
                  example: false
                is_outlier_correction_enabled:
                  type: boolean
                  description: 'Smooth revenue outliers'
                  example: false
                dimensions:
                  type: object
                  description: 'Segment filters'
                  example: []
                  properties:
                    device:
                      type: string
                      description: 'Filter by device type'
                      example: all
                      enum:
                        - all
                        - desktop
                        - mobile
                        - tablet
                    userType:
                      type: string
                      description: 'Filter by user type'
                      example: all
                      enum:
                        - all
                        - new
                        - returning
              required:
                - start_date
                - end_date
                - report_type
                - should_exclude_duplicate_user_events
                - is_outlier_correction_enabled
                - dimensions
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  '/papi/experiments/{experimentId}/raw-revenue-report':
    get:
      summary: 'Get raw revenue report'
      operationId: getRawRevenueReport
      description: "Retrieves raw revenue data for an experiment within a specified date range.\n\nReturns detailed revenue metrics for each variation, useful for financial analysis and custom reporting.\n\n**Required scope:** `experiment:report`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: 'Raw revenue report data'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        404:
          description: 'Experiment not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Reports
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 'Start date (YYYY-MM-DD)'
                  example: '2024-01-01'
                end_date:
                  type: string
                  description: 'End date (YYYY-MM-DD)'
                  example: '2024-01-31'
                report_type:
                  type: string
                  description: 'Analytics provider'
                  example: ga4
                  enum:
                    - ga4
                    - posthog
                should_exclude_duplicate_user_events:
                  type: boolean
                  description: 'Exclude duplicate events'
                  example: false
                is_outlier_correction_enabled:
                  type: boolean
                  description: 'Smooth revenue outliers'
                  example: false
                dimensions:
                  type: object
                  description: 'Segment filters'
                  example: []
                  properties:
                    device:
                      type: string
                      description: 'Filter by device type'
                      example: all
                      enum:
                        - all
                        - desktop
                        - mobile
                        - tablet
                    userType:
                      type: string
                      description: 'Filter by user type'
                      example: all
                      enum:
                        - all
                        - new
                        - returning
                raw_data:
                  type: boolean
                  description: 'Return raw data instead of formatted'
                  example: false
              required:
                - start_date
                - end_date
                - report_type
                - should_exclude_duplicate_user_events
                - is_outlier_correction_enabled
                - dimensions
                - raw_data
    parameters:
      -
        in: path
        name: experimentId
        description: 'The ID of the experiment'
        example: 456
        required: true
        schema:
          type: integer
  /papi/schema/audience-targeting:
    get:
      summary: 'Get Audience Targeting Schema'
      operationId: getAudienceTargetingSchema
      description: "Returns all possible examples for audience targeting.\nEach example shows a valid combination you can copy and use.\n\n**Structure:** `[[rule1, rule2], [rule3]]` = (rule1 AND rule2) OR rule3"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      example: browser
                    condition:
                      type: string
                      example: is
                    browsers:
                      type: array
                      example:
                        - firefox
                      items:
                        type: string
                example:
                  -
                    type: browser
                    condition: is
                    browsers:
                      - firefox
                  -
                    type: browser
                    condition: is
                    browsers:
                      - chrome
                  -
                    type: browser
                    condition: is
                    browsers:
                      - safari
                  -
                    type: browser
                    condition: is
                    browsers:
                      - edge
                  -
                    type: browser
                    condition: is
                    browsers:
                      - opera
                  -
                    type: browser
                    condition: is_not
                    browsers:
                      - firefox
                  -
                    type: browser
                    condition: is_not
                    browsers:
                      - chrome
                  -
                    type: browser
                    condition: is_not
                    browsers:
                      - safari
                  -
                    type: browser
                    condition: is_not
                    browsers:
                      - edge
                  -
                    type: browser
                    condition: is_not
                    browsers:
                      - opera
                  -
                    type: device
                    condition: is
                    devices:
                      - desktop
                  -
                    type: device
                    condition: is
                    devices:
                      - phone
                  -
                    type: device
                    condition: is
                    devices:
                      - tablet
                  -
                    type: device
                    condition: is_not
                    devices:
                      - desktop
                  -
                    type: device
                    condition: is_not
                    devices:
                      - phone
                  -
                    type: device
                    condition: is_not
                    devices:
                      - tablet
                  -
                    type: platform
                    condition: is
                    platforms:
                      - ios
                  -
                    type: platform
                    condition: is
                    platforms:
                      - android
                  -
                    type: platform
                    condition: is
                    platforms:
                      - windows
                  -
                    type: platform
                    condition: is
                    platforms:
                      - mac
                  -
                    type: platform
                    condition: is
                    platforms:
                      - linux
                  -
                    type: platform
                    condition: is_not
                    platforms:
                      - ios
                  -
                    type: platform
                    condition: is_not
                    platforms:
                      - android
                  -
                    type: platform
                    condition: is_not
                    platforms:
                      - windows
                  -
                    type: platform
                    condition: is_not
                    platforms:
                      - mac
                  -
                    type: platform
                    condition: is_not
                    platforms:
                      - linux
                  -
                    type: browser_language
                    condition: is_set_to
                    languages:
                      - en
                      - de
                  -
                    type: browser_language
                    condition: is_not_set_to
                    languages:
                      - en
                      - de
                  -
                    type: geolocation
                    condition: is
                    values:
                      -
                        country: DE
                        county: null
                        city: null
                  -
                    type: geolocation
                    condition: is
                    values:
                      -
                        country: US
                        county: California
                        city: 'San Francisco'
                  -
                    type: geolocation
                    condition: is_not
                    values:
                      -
                        country: DE
                        county: null
                        city: null
                  -
                    type: geolocation
                    condition: is_not
                    values:
                      -
                        country: US
                        county: California
                        city: 'San Francisco'
                  -
                    type: ip
                    condition: is
                    ips:
                      - 192.168.1.1
                  -
                    type: ip
                    condition: is
                    ips:
                      - 10.0.0.0/8
                  -
                    type: ip
                    condition: is_not
                    ips:
                      - 192.168.1.1
                  -
                    type: ip
                    condition: is_not
                    ips:
                      - 10.0.0.0/8
                  -
                    type: cookie
                    condition: has
                    cookies:
                      -
                        name: my_cookie
                        condition: equals
                        value: some_value
                  -
                    type: cookie
                    condition: has
                    cookies:
                      -
                        name: my_cookie
                        condition: not_equals
                        value: some_value
                  -
                    type: cookie
                    condition: has
                    cookies:
                      -
                        name: my_cookie
                        condition: contains
                        value: some_value
                  -
                    type: cookie
                    condition: has
                    cookies:
                      -
                        name: my_cookie
                        condition: any
                  -
                    type: cookie
                    condition: has_not
                    cookies:
                      -
                        name: my_cookie
                        condition: equals
                        value: some_value
                  -
                    type: cookie
                    condition: has_not
                    cookies:
                      -
                        name: my_cookie
                        condition: not_equals
                        value: some_value
                  -
                    type: cookie
                    condition: has_not
                    cookies:
                      -
                        name: my_cookie
                        condition: contains
                        value: some_value
                  -
                    type: cookie
                    condition: has_not
                    cookies:
                      -
                        name: my_cookie
                        condition: any
                  -
                    type: local_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: equals
                        value: some_value
                  -
                    type: local_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: not_equals
                        value: some_value
                  -
                    type: local_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: contains
                        value: some_value
                  -
                    type: local_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: any
                  -
                    type: local_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: equals
                        value: some_value
                  -
                    type: local_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: not_equals
                        value: some_value
                  -
                    type: local_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: contains
                        value: some_value
                  -
                    type: local_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: any
                  -
                    type: session_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: equals
                        value: some_value
                  -
                    type: session_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: not_equals
                        value: some_value
                  -
                    type: session_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: contains
                        value: some_value
                  -
                    type: session_storage
                    condition: has
                    values:
                      -
                        name: my_key
                        condition: any
                  -
                    type: session_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: equals
                        value: some_value
                  -
                    type: session_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: not_equals
                        value: some_value
                  -
                    type: session_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: contains
                        value: some_value
                  -
                    type: session_storage
                    condition: has_not
                    values:
                      -
                        name: my_key
                        condition: any
                  -
                    type: url_referrer
                    condition: comes_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: simple
                  -
                    type: url_referrer
                    condition: comes_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: regex
                  -
                    type: url_referrer
                    condition: comes_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: contains
                  -
                    type: url_referrer
                    condition: comes_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: exact
                  -
                    type: url_referrer
                    condition: does_not_come_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: simple
                  -
                    type: url_referrer
                    condition: does_not_come_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: regex
                  -
                    type: url_referrer
                    condition: does_not_come_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: contains
                  -
                    type: url_referrer
                    condition: does_not_come_from
                    urls:
                      -
                        url: 'https://google.com'
                        condition: exact
                  -
                    type: url_query_parameter
                    condition: has
                    parameters:
                      -
                        name: utm_source
                        condition: equals
                        value: newsletter
                  -
                    type: url_query_parameter
                    condition: has
                    parameters:
                      -
                        name: utm_source
                        condition: contains
                        value: newsletter
                  -
                    type: url_query_parameter
                    condition: has
                    parameters:
                      -
                        name: utm_source
                        condition: matches
                        value: newsletter
                  -
                    type: url_query_parameter
                    condition: has
                    parameters:
                      -
                        name: utm_source
                        condition: any
                  -
                    type: url_query_parameter
                    condition: has_not
                    parameters:
                      -
                        name: utm_source
                        condition: equals
                        value: newsletter
                  -
                    type: url_query_parameter
                    condition: has_not
                    parameters:
                      -
                        name: utm_source
                        condition: contains
                        value: newsletter
                  -
                    type: url_query_parameter
                    condition: has_not
                    parameters:
                      -
                        name: utm_source
                        condition: matches
                        value: newsletter
                  -
                    type: url_query_parameter
                    condition: has_not
                    parameters:
                      -
                        name: utm_source
                        condition: any
                  -
                    type: javascript
                    code: 'return window.userType === "premium";'
      tags:
        - Schema
      security: []
  /papi/schema/page-targeting:
    get:
      summary: 'Get Page Targeting Schema'
      operationId: getPageTargetingSchema
      description: "Returns all possible examples for page targeting. Each example shows a valid combination you can copy and use.\n\n**Structure:** `[[rule1, rule2], [rule3]]` = (rule1 AND rule2) OR rule3"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      example: url_match
                    condition:
                      type: string
                      example: matches
                    urls:
                      type: array
                      example:
                        -
                          url: 'https://example.com/products/*'
                          condition: simple
                      items:
                        type: object
                        properties:
                          url:
                            type: string
                            example: 'https://example.com/products/*'
                          condition:
                            type: string
                            example: simple
                example:
                  -
                    type: url_match
                    condition: matches
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: simple
                  -
                    type: url_match
                    condition: matches
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: regex
                  -
                    type: url_match
                    condition: matches
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: contains
                  -
                    type: url_match
                    condition: matches
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: exact
                  -
                    type: url_match
                    condition: does_not_match
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: simple
                  -
                    type: url_match
                    condition: does_not_match
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: regex
                  -
                    type: url_match
                    condition: does_not_match
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: contains
                  -
                    type: url_match
                    condition: does_not_match
                    urls:
                      -
                        url: 'https://example.com/products/*'
                        condition: exact
                  -
                    type: css_selector
                    condition: matches
                    css_selectors:
                      - .product-page
                      - '#checkout-form'
                  -
                    type: css_selector
                    condition: does_not_match
                    css_selectors:
                      - .product-page
                      - '#checkout-form'
                  -
                    type: javascript
                    code: 'return document.querySelector(".target") !== null;'
      tags:
        - Schema
      security: []
  /papi/global-js-settings:
    get:
      summary: 'Get Global JavaScript settings'
      operationId: getGlobalJavaScriptSettings
      description: "Returns the team's Global JS and Global Tracking JS, including when each was last updated.\n\nRequires the Global JavaScript feature.\n\n**Required scope:** `show-global-js`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    global_js: null
                    global_js_updated_at: null
                    global_tracking_js: null
                    global_tracking_js_updated_at: null
                properties:
                  data:
                    type: object
                    properties:
                      global_js:
                        type: string
                        example: null
                        nullable: true
                      global_js_updated_at:
                        type: string
                        example: null
                        nullable: true
                      global_tracking_js:
                        type: string
                        example: null
                        nullable: true
                      global_tracking_js_updated_at:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - 'Global JavaScript'
  /papi/global-js:
    patch:
      summary: 'Update Global JS'
      operationId: updateGlobalJS
      description: "Sets the Global JS that runs on every page where the Varify snippet is installed.\nSend `null` or an empty string to clear it.\n\nRequires the Global JavaScript feature.\n\n**Required scope:** `update-global-js`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    global_js: null
                    global_js_updated_at: null
                    global_tracking_js: null
                    global_tracking_js_updated_at: null
                properties:
                  data:
                    type: object
                    properties:
                      global_js:
                        type: string
                        example: null
                        nullable: true
                      global_js_updated_at:
                        type: string
                        example: null
                        nullable: true
                      global_tracking_js:
                        type: string
                        example: null
                        nullable: true
                      global_tracking_js_updated_at:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - 'Global JavaScript'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                global_js:
                  type: string
                  description: 'JavaScript to run on every page. Send null or an empty string to clear it.'
                  example: 'console.log("global");'
              required:
                - global_js
  /papi/global-tracking-js:
    patch:
      summary: 'Update Global Tracking JS'
      operationId: updateGlobalTrackingJS
      description: "Sets the Global Tracking JS used for analytics and tracking integrations (respects start on tracking events). \nPass an empty string to clear it. \n\nRequires the Global JavaScript feature.\n**Required scope:** `update-global-js`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    global_js: null
                    global_js_updated_at: null
                    global_tracking_js: null
                    global_tracking_js_updated_at: null
                properties:
                  data:
                    type: object
                    properties:
                      global_js:
                        type: string
                        example: null
                        nullable: true
                      global_js_updated_at:
                        type: string
                        example: null
                        nullable: true
                      global_tracking_js:
                        type: string
                        example: null
                        nullable: true
                      global_tracking_js_updated_at:
                        type: string
                        example: null
                        nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                nullable: true
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - 'Global JavaScript'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                global_tracking_js:
                  type: string
                  description: 'JavaScript for analytics and tracking. Send null or an empty string to clear it.'
                  example: 'console.log("tracking");'
              required:
                - global_tracking_js
  /papi/goals:
    get:
      summary: 'List goals'
      operationId: listGoals
      description: "Returns all Varify goals of the team, newest first.\n\nRequires the Varify tracking integration to be enabled.\n\n**Required scope:** `list-goals`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: IBXtAqjufBmDc0
                      name: 'Add to cart'
                      description: 'Clicks on the add to cart button'
                      type: click
                      configuration:
                        api_name: $varify_click
                        selector: '#add-to-cart'
                        is_revenue: false
                      is_once_per_user: false
                      created_at: '2026-11-25T14:15:30.000000Z'
                      updated_at: '2026-11-25T14:15:30.000000Z'
                    -
                      id: IBXtAqjufBmDc0
                      name: 'Add to cart'
                      description: 'Clicks on the add to cart button'
                      type: click
                      configuration:
                        api_name: $varify_click
                        selector: '#add-to-cart'
                        is_revenue: false
                      is_once_per_user: false
                      created_at: '2026-11-25T14:15:30.000000Z'
                      updated_at: '2026-11-25T14:15:30.000000Z'
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: IBXtAqjufBmDc0
                        name: 'Add to cart'
                        description: 'Clicks on the add to cart button'
                        type: click
                        configuration:
                          api_name: $varify_click
                          selector: '#add-to-cart'
                          is_revenue: false
                        is_once_per_user: false
                        created_at: '2026-11-25T14:15:30.000000Z'
                        updated_at: '2026-11-25T14:15:30.000000Z'
                      -
                        id: IBXtAqjufBmDc0
                        name: 'Add to cart'
                        description: 'Clicks on the add to cart button'
                        type: click
                        configuration:
                          api_name: $varify_click
                          selector: '#add-to-cart'
                          is_revenue: false
                        is_once_per_user: false
                        created_at: '2026-11-25T14:15:30.000000Z'
                        updated_at: '2026-11-25T14:15:30.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: IBXtAqjufBmDc0
                        name:
                          type: string
                          example: 'Add to cart'
                        description:
                          type: string
                          example: 'Clicks on the add to cart button'
                        type:
                          type: string
                          example: click
                        configuration:
                          type: object
                          properties:
                            api_name:
                              type: string
                              example: $varify_click
                            selector:
                              type: string
                              example: '#add-to-cart'
                            is_revenue:
                              type: boolean
                              example: false
                        is_once_per_user:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
                        updated_at:
                          type: string
                          example: '2026-11-25T14:15:30.000000Z'
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
      tags:
        - Goals
    post:
      summary: 'Create goal'
      operationId: createGoal
      description: "Creates a Varify goal. The shape of `configuration` depends on `type`:\n\n- `custom`: `{\"is_revenue\": bool, \"api_name\": string}`. Tracked when your code sends an event named `api_name`.\n- `click`: `{\"selector\": string}`. Tracked when a visitor clicks an element matching the CSS selector.\n- `pageview`: `{\"page_targeting\": array}`. Tracked when a visitor views a page matching the page targeting.\n  See `GET /schema/page-targeting`.\n\nRequires the Varify tracking integration to be enabled.\n\n**Required scope:** `create-goal`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: IBXtAqjufBmDc0
                    name: 'Add to cart'
                    description: 'Clicks on the add to cart button'
                    type: click
                    configuration:
                      api_name: $varify_click
                      selector: '#add-to-cart'
                      is_revenue: false
                    is_once_per_user: false
                    created_at: '2026-11-25T14:15:30.000000Z'
                    updated_at: '2026-11-25T14:15:30.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: IBXtAqjufBmDc0
                      name:
                        type: string
                        example: 'Add to cart'
                      description:
                        type: string
                        example: 'Clicks on the add to cart button'
                      type:
                        type: string
                        example: click
                      configuration:
                        type: object
                        properties:
                          api_name:
                            type: string
                            example: $varify_click
                          selector:
                            type: string
                            example: '#add-to-cart'
                          is_revenue:
                            type: boolean
                            example: false
                      is_once_per_user:
                        type: boolean
                        example: false
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Goals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of the goal'
                  example: 'Add to cart'
                description:
                  type: string
                  description: 'Description of the goal'
                  example: 'Clicks on the add to cart button'
                type:
                  type: string
                  description: 'Type of the goal: custom, click, or pageview'
                  example: click
                is_once_per_user:
                  type: boolean
                  description: 'Count at most one conversion per user'
                  example: false
                configuration:
                  type: object
                  description: 'Type-specific configuration, see above'
                  example: []
                  properties:
                    is_revenue:
                      type: boolean
                      description: 'Whether the goal tracks revenue (custom only)'
                      example: false
                    api_name:
                      type: string
                      description: 'Event name to track (custom only)'
                      example: signup
                    selector:
                      type: string
                      description: 'CSS selector to track clicks on (click only)'
                      example: '#add-to-cart'
                    page_targeting:
                      type: array
                      description: 'Page targeting rules (pageview only)'
                      example:
                        - architecto
                      items:
                        type: string
              required:
                - name
                - type
                - is_once_per_user
                - configuration
  '/papi/goals/{publicGoalId}':
    patch:
      summary: 'Update goal'
      operationId: updateGoal
      description: "Changes the name and description of a Varify goal. The type, event name and tracking configuration\ncan't be changed after creation, so existing tracking keeps working.\n\nRequires the Varify tracking integration to be enabled.\n\n**Required scope:** `update-goal`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: IBXtAqjufBmDc0
                    name: 'Add to cart'
                    description: 'Clicks on the add to cart button'
                    type: click
                    configuration:
                      api_name: $varify_click
                      selector: '#add-to-cart'
                      is_revenue: false
                    is_once_per_user: false
                    created_at: '2026-11-25T14:15:30.000000Z'
                    updated_at: '2026-11-25T14:15:30.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: IBXtAqjufBmDc0
                      name:
                        type: string
                        example: 'Add to cart'
                      description:
                        type: string
                        example: 'Clicks on the add to cart button'
                      type:
                        type: string
                        example: click
                      configuration:
                        type: object
                        properties:
                          api_name:
                            type: string
                            example: $varify_click
                          selector:
                            type: string
                            example: '#add-to-cart'
                          is_revenue:
                            type: boolean
                            example: false
                      is_once_per_user:
                        type: boolean
                        example: false
                      created_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
                      updated_at:
                        type: string
                        example: '2026-11-25T14:15:30.000000Z'
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        404:
          description: 'Goal not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                nullable: true
      tags:
        - Goals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of the goal'
                  example: 'Add to cart'
                description:
                  type: string
                  description: 'Description of the goal. Leave out to keep the current one; send an empty string to clear it.'
                  example: 'Clicks on the add to cart button'
              required:
                - name
    delete:
      summary: 'Delete goal'
      operationId: deleteGoal
      description: "Deletes a Varify goal. A goal that is still assigned to an experiment can't be deleted; remove it from\nthose experiments first with `POST /experiments/{experimentId}/goals`.\n\nRequires the Varify tracking integration to be enabled.\n\n**Required scope:** `delete-goal`"
      parameters:
        -
          in: header
          name: X-Client-Id
          description: ''
          example: '123'
          schema:
            type: string
      responses:
        204:
          description: 'Goal deleted'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        401:
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
        404:
          description: 'Goal not found'
          content:
            application/json:
              schema:
                type: object
                nullable: true
        409:
          description: 'Goal is assigned to an experiment'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This goal is attached to one or more experiments. Remove it from them first.'
                properties:
                  message:
                    type: string
                    example: 'This goal is attached to one or more experiments. Remove it from them first.'
      tags:
        - Goals
    parameters:
      -
        in: path
        name: publicGoalId
        description: 'Id of the goal'
        example: k5Vr9a
        required: true
        schema:
          type: string
  '/papi/{fallbackPlaceholder}':
    get:
      summary: ''
      operationId: getPapiFallbackPlaceholder
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Other
    parameters:
      -
        in: path
        name: fallbackPlaceholder
        description: ''
        example: '|{+-0p'
        required: true
        schema:
          type: string
