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

# Get website test results

> Per-variant impressions, conversions, lift, significance, and conversion value, with the current decision and a daily series. Results are recomputed when the stored rollup is more than five minutes old.



## OpenAPI

````yaml /openapi.json get /v1/optimize/tests/{id}/results
openapi: 3.1.0
info:
  title: RevDesk v1 API
  version: 1.0.0
  description: >-
    Connect RevDesk calls, SMS, phone numbers, caller IDs, caller trust, agents,
    contacts, tasks, webhooks, and usage to the rest of your revenue workflow
    with organization-scoped permissions.
  contact:
    name: RevDesk
    email: support@revdesk.com
servers:
  - url: https://api.revdesk.com
security:
  - bearerAuth: []
tags:
  - name: Phone Numbers
  - name: Caller IDs
  - name: Enterprise Registration
  - name: Branded Calling
  - name: Calls
  - name: SMS
  - name: WebRTC
  - name: Reputation
  - name: Usage
  - name: Account
  - name: Agents
  - name: Appointments
  - name: Contacts
  - name: Documents
  - name: Notifications
  - name: Number Health
  - name: Number Registration
  - name: Optimize
  - name: Sandbox
  - name: Sub-entities
  - name: Tasks
  - name: Webhooks
externalDocs:
  description: RevDesk API versioning and deprecation policy
  url: https://docs.revdesk.com/api-reference/versioning-and-deprecation
paths:
  /v1/optimize/tests/{id}/results:
    get:
      tags:
        - Optimize
      summary: Get website test results
      description: >-
        Per-variant impressions, conversions, lift, significance, and conversion
        value, with the current decision and a daily series. Results are
        recomputed when the stored rollup is more than five minutes old.
      operationId: v1_optimize_tests_id_results_get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: days
          in: query
          required: false
          schema:
            type: integer
            minimum: 7
            maximum: 90
      responses:
        '200':
          description: Success
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      test:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          hypothesis:
                            type:
                              - string
                              - 'null'
                          status:
                            type: string
                            enum:
                              - draft
                              - running
                              - paused
                              - completed
                              - shipped
                              - archived
                          kind:
                            type: string
                            enum:
                              - variation
                              - split_url
                          page_url:
                            type: string
                          url_match_type:
                            type: string
                            enum:
                              - exact
                              - prefix
                              - regex
                          goal:
                            anyOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  type:
                                    type: string
                                    enum:
                                      - form_submit
                                      - tel_click
                                      - cta_click
                                      - url_visit
                                      - selector_click
                                  selector:
                                    type:
                                      - string
                                      - 'null'
                                  url_pattern:
                                    type:
                                      - string
                                      - 'null'
                                required:
                                  - id
                                  - type
                                  - selector
                                  - url_pattern
                                additionalProperties: false
                              - type: 'null'
                          traffic_split:
                            type: number
                          variants:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                is_control:
                                  type: boolean
                                weight:
                                  type: number
                                ops:
                                  maxItems: 40
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          selector:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                          nth:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                          op:
                                            type: string
                                            const: setText
                                          value:
                                            type: string
                                            maxLength: 5000
                                        required:
                                          - selector
                                          - op
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          selector:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                          nth:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                          op:
                                            type: string
                                            const: setAttribute
                                          name:
                                            type: string
                                            pattern: >-
                                              ^(?!on)(?!src$)(?!srcdoc$)(?!style$)(?!href$)[a-z][a-z0-9-]*$
                                          value:
                                            type: string
                                            maxLength: 2000
                                        required:
                                          - selector
                                          - op
                                          - name
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          selector:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                          nth:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                          op:
                                            type: string
                                            const: addClass
                                          value:
                                            type: string
                                            maxLength: 200
                                            pattern: ^[\w-]+(\s+[\w-]+)*$
                                        required:
                                          - selector
                                          - op
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          selector:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                          nth:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                          op:
                                            type: string
                                            const: removeClass
                                          value:
                                            type: string
                                            maxLength: 200
                                            pattern: ^[\w-]+(\s+[\w-]+)*$
                                        required:
                                          - selector
                                          - op
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          selector:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                          nth:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                          op:
                                            type: string
                                            const: setStyle
                                          styles:
                                            type: object
                                            propertyNames:
                                              type: string
                                              pattern: ^[a-z-]+$
                                            additionalProperties:
                                              type: string
                                              maxLength: 500
                                        required:
                                          - selector
                                          - op
                                          - styles
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          selector:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                          nth:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                          op:
                                            type: string
                                            const: hide
                                        required:
                                          - selector
                                          - op
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          selector:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                          nth:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                          op:
                                            type: string
                                            const: replaceHref
                                          value:
                                            type: string
                                            maxLength: 2000
                                            pattern: >-
                                              ^(https?:\/\/|tel:|mailto:|sms:|\/(?!\/)|#|\?)
                                        required:
                                          - selector
                                          - op
                                          - value
                                        additionalProperties: false
                                redirect_url:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                                - is_control
                                - weight
                                - ops
                                - redirect_url
                              additionalProperties: false
                          started_at:
                            type:
                              - string
                              - 'null'
                          completed_at:
                            type:
                              - string
                              - 'null'
                          shipped_at:
                            type:
                              - string
                              - 'null'
                          winner_variant_id:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                        required:
                          - id
                          - name
                          - hypothesis
                          - status
                          - kind
                          - page_url
                          - url_match_type
                          - goal
                          - traffic_split
                          - variants
                          - started_at
                          - completed_at
                          - shipped_at
                          - winner_variant_id
                          - created_at
                        additionalProperties: false
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            is_control:
                              type: boolean
                            impressions:
                              type: number
                            conversions:
                              type: number
                            conversion_rate:
                              type:
                                - number
                                - 'null'
                            lift:
                              type:
                                - number
                                - 'null'
                            p_value:
                              type:
                                - number
                                - 'null'
                            probability_to_beat_control:
                              type:
                                - number
                                - 'null'
                            revenue_cents:
                              type: number
                          required:
                            - id
                            - name
                            - is_control
                            - impressions
                            - conversions
                            - conversion_rate
                            - lift
                            - p_value
                            - probability_to_beat_control
                            - revenue_cents
                          additionalProperties: false
                      decision:
                        type: object
                        properties:
                          winner_variant_id:
                            type:
                              - string
                              - 'null'
                          reason:
                            type: string
                            enum:
                              - winner
                              - collecting
                              - no_difference
                              - inconclusive
                        required:
                          - winner_variant_id
                          - reason
                        additionalProperties: false
                      computed_at:
                        type: string
                      daily:
                        type: array
                        items:
                          type: object
                          properties:
                            day:
                              type: string
                            variant_id:
                              type: string
                            impressions:
                              type: number
                            conversions:
                              type: number
                          required:
                            - day
                            - variant_id
                            - impressions
                            - conversions
                          additionalProperties: false
                    required:
                      - test
                      - variants
                      - decision
                      - computed_at
                      - daily
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized
          headers:
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          headers:
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict (incl. idempotency conflicts)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  headers:
    RateLimit:
      description: >-
        Current quota remaining and seconds until reset, using the IETF
        RateLimit structured-field syntax.
      schema:
        type: string
        example: '"default";r=599;t=60'
    RateLimitPolicy:
      description: Named quota policy and one-minute window.
      schema:
        type: string
        example: '"default";q=600;w=60'
    XRateLimitLimit:
      description: Maximum requests allowed in the current one-minute window.
      schema:
        type: integer
    XRateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
    XRateLimitReset:
      description: Unix timestamp in milliseconds when the current window resets.
      schema:
        type: integer
    WWWAuthenticate:
      description: >-
        Bearer challenge with RFC 9728 protected-resource metadata and, on scope
        failures, the required scope.
      schema:
        type: string
    RetryAfter:
      description: Seconds to wait before retrying a rate-limited request.
      schema:
        type: integer
        minimum: 0
  schemas:
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            resolution_hint:
              type: string
            fields:
              type: object
              additionalProperties:
                type: string
            doc_url:
              type: string
              format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: RevDesk API key
      description: >-
        Organization-scoped RevDesk API key. Each operation declares its
        required permissions in x-required-scopes.
      x-scopes-supported:
        - account:read
        - agents:read
        - agents:write
        - bookings:read
        - brand:read
        - brand:write
        - caller_trust:read
        - caller_trust:write
        - calls:read
        - calls:write
        - contacts:read
        - contacts:write
        - jobs:read
        - jobs:write
        - notifications:write
        - phone_numbers:read
        - phone_numbers:write
        - optimize:read
        - optimize:write
        - sms:read
        - sms:write
        - sub_entities:read
        - sub_entities:write
        - tokens:mint
        - transcripts:read
        - usage:read
        - voice:read
        - voice:webrtc
        - voice:write
        - webhooks:read
        - webhooks:write

````