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

# Edit Twitch Viewers

> Edit settings for a Twitch Viewers order. Only works for orders where order_type is 'viewers' and service is 'twitch'.



## OpenAPI

````yaml POST /purchases/{orderId}/edit-twitch-viewers
openapi: 3.0.0
info:
  title: StreamSkill - OpenApi 3.0
  description: ''
  termsOfService: https://streamskill.pro/en/privacy_policy
  version: 1.0.0
  contact:
    email: streamskillpro@gmail.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.streamskill.pro/v1
    description: Production server - v1
security:
  - bearerAuth: []
paths:
  /purchases/{orderId}/edit-twitch-viewers:
    parameters:
      - $ref: '#/components/parameters/orderId'
      - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Edit Twitch Viewers
      description: >-
        Edit settings for a Twitch Viewers order. Only works for orders where
        order_type is 'viewers' and service is 'twitch'.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditTwitchViewersObject'
      responses:
        '200':
          $ref: '#/components/responses/ActionSuccess'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/NotAllowed'
        '409':
          $ref: '#/components/responses/PurchaseDone'
        '422':
          $ref: '#/components/responses/validationError'
        '500':
          $ref: '#/components/responses/ApiError'
components:
  parameters:
    orderId:
      name: orderId
      in: path
      required: true
      description: The ID of the order
      schema:
        type: integer
    Accept-Language:
      name: Accept-Language
      in: header
      required: false
      description: The language of the response
      schema:
        $ref: '#/components/schemas/LanguageObject'
  schemas:
    EditTwitchViewersObject:
      type: object
      description: >-
        All parameters are optional. Only pass the parameters you want to
        change. When online_mode is "manual" (or the order is already in manual
        mode), the manual_chart, manual_chart_randomization,
        manual_chart_end_action and manual_chart_end_param fields become
        required.
      properties:
        channel:
          type: string
          description: Twitch channel name (without https://www.twitch.tv/ prefix)
          example: twitch
        threads:
          type: integer
          description: Number of viewers (cannot exceed the originally purchased amount)
          example: 100
          minimum: 1
        stream_views:
          type: integer
          description: >-
            Stream views multiplier (1-10, or 1-30 if customX is enabled). Final
            value = stream_views * threads
          example: 5
          minimum: 1
          maximum: 30
        uniq_viewers:
          type: integer
          description: >-
            Unique viewers multiplier (1-10, or 1-30 if customX is enabled).
            Final value = uniq_viewers * threads
          example: 3
          minimum: 1
          maximum: 30
        raid:
          type: boolean
          description: Enable raid mode
          example: false
        raid_time:
          type: integer
          description: Raid duration in minutes
          example: 10
          minimum: 5
          maximum: 60
        connect_time:
          type: integer
          description: Viewer connection time in minutes (1 to min(60, threads))
          example: 5
          minimum: 1
          maximum: 60
        online_mode:
          type: string
          description: >-
            Online mode (replaces the removed floating_online flag).
            "smooth_only" — smooth connection only (equivalent of the old
            floating_online: false). "smooth_floating" — smooth connection plus
            floating viewers (equivalent of the old floating_online: true).
            "manual" — custom online chart, requires the manual_chart_* fields.
          enum:
            - smooth_only
            - smooth_floating
            - manual
          example: smooth_floating
        manual_chart:
          type: object
          description: >-
            Custom online chart. Required when online_mode is "manual" (or the
            order is already in manual mode). Map where keys are minutes
            (integers) and values are viewer counts. Must contain at least 2
            points, the first point must be at minute 0, and the chart duration
            (largest minute key) must be between 10 and 180 minutes.
          minProperties: 2
          additionalProperties:
            type: integer
            minimum: 0
          example:
            '0': 20
            '5': 100
            '30': 80
        manual_chart_randomization:
          type: integer
          description: >-
            Randomization percentage for the custom chart. Required when
            online_mode is "manual" (or the order is already in manual mode).
          example: 15
          minimum: 0
          maximum: 100
        manual_chart_end_action:
          type: string
          description: >-
            Action performed when the custom chart ends. Required when
            online_mode is "manual" (or the order is already in manual mode).
            "max_work" — keep running, "repeat" — replay the chart, "shutdown" —
            finish the order.
          enum:
            - max_work
            - repeat
            - shutdown
          example: repeat
        manual_chart_end_param:
          type: integer
          description: >-
            Duration in minutes of the end action. Required when online_mode is
            "manual" (or the order is already in manual mode). For "repeat" it
            must not exceed the chart duration. When manual_chart_end_action is
            "max_work" and this field is omitted, it defaults to 0.
          example: 10
          minimum: 0
          maximum: 60
        geo:
          type: string
          description: Country code for geo targeting
          enum:
            - auto
            - us
            - br
            - ru
            - mx
            - tr
            - de
            - gb
            - it
            - ca
            - ua
            - by
            - pt
            - ar
            - es
            - ae
            - pl
            - fr
            - ch
            - kz
            - ge
            - eg
            - sa
          example: auto
        geo_percent:
          type: integer
          description: Geo percentage
          example: 50
          minimum: 0
          maximum: 100
        chatlist:
          type: integer
          description: Chatlist percentage
          example: 30
          minimum: 0
          maximum: 100
    LanguageObject:
      type: string
      enum:
        - en
        - ru
      default: en
  responses:
    ActionSuccess:
      description: Action Success
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: ok
                description: The status of the action
    Unauthorized:
      description: Unauthorized
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: object
          example:
            name: Unauthorized
            message: Your request was made with invalid credentials.
            code: 0
            status: 401
            type: unauthorized_http_exception
    NotFound:
      description: Object not Found
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: object
          example:
            name: Purchase not found
            code: 0
            message: 'Object not found: {ID}'
            status: 404
            type: purchase_not_found_exception
    NotAllowed:
      description: Action is not allowed for specified purchase
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: object
          example:
            name: Method Not Allowed
            message: Action is unavailable for this order
            code: 0
            status: 405
            type: action_unavailable
    PurchaseDone:
      description: Action could not be completed because the purchase is already done
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: object
          example:
            name: Purchase Done
            message: Order already completed
            code: 0
            status: 409
            type: purchase_done
    validationError:
      description: Validation Error
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: object
          example:
            name: Bad Request
            errors:
              tarif.id:
                - Tarif not found
            code: 0
            status: 422
            type: validate_exception
    ApiError:
      description: API Error (Internal Server Error)
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: object
          example:
            name: Action failed
            message: Action not performed
            code: 0
            status: 500
            type: action_failed
  headers:
    Date:
      schema:
        type: string
        example: Sat, 25 May 2024 23:59:59 GMT
    Server:
      schema:
        type: string
        example: Apache/2.4.38 (Debian)
    Content-Length:
      schema:
        type: integer
        example: '100'
    Keep-Alive:
      schema:
        type: string
        example: timeout=5, max=100
    Connection:
      schema:
        type: string
        example: Keep-Alive
    Content-Type:
      schema:
        type: string
      example: application/json; charset=UTF-8
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````