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

# Atualizar upsell

> Edita um upsell

Requer o escopo `upsells:write` e o header HTTP `Idempotency-Key`.

<ResponseExample>
  ```json Resposta theme={null}
  {
    "data": {
      "id": 12,
      "product_id": 3256,
      "funnel_id": 4,
      "name": "Oferta especial",
      "status": "active",
      "accept_text": "Sim, quero!",
      "refuse_text": "Não, obrigado",
      "accept_page": null,
      "refuse_page": null,
      "accept_redirect": null,
      "refuse_redirect": null,
      "created_at": "2026-06-01T10:00:00-03:00",
      "updated_at": "2026-06-01T10:00:00-03:00"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml PUT /upsells/{id}
openapi: 3.1.0
info:
  title: SpeedSellX API
  version: 1.0.0
  description: >-
    API pública da SpeedSellX para consultar e atualizar, por integração, os
    dados da sua conta: produtos, pedidos, vendas, assinaturas, métricas,
    checkouts, upsells e webhooks. Autentique com `Authorization: Bearer
    sk_live_...` e gere chaves no painel, em Desenvolvedores. Requisições que
    alteram dados exigem o header HTTP `Idempotency-Key`. Listagens aceitam
    `page`/`per_page` e retornam `{ data, meta }`.
servers:
  - url: https://api.speedsellx.io/seller/v1
    description: Produção
security: []
tags:
  - name: Produtos
  - name: Pedidos
  - name: Vendas
  - name: Assinaturas
  - name: Métricas
  - name: Upsells
  - name: Checkouts
paths:
  /upsells/{id}:
    put:
      tags:
        - Upsells
      summary: Atualizar upsell
      description: Atualiza um upsell da conta. Requer Idempotency-Key.
      operationId: v1.upsells.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUpsellRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/UpsellResource'
                required:
                  - data
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        const: not_found
                      message:
                        type: string
                        const: Resource not found.
                    required:
                      - type
                      - message
                required:
                  - error
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateUpsellRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        status:
          type: string
          maxLength: 50
        accept_text:
          type:
            - string
            - 'null'
          maxLength: 255
        refuse_text:
          type:
            - string
            - 'null'
          maxLength: 255
        accept_page:
          type:
            - string
            - 'null'
          maxLength: 255
        refuse_page:
          type:
            - string
            - 'null'
          maxLength: 255
        accept_redirect:
          type:
            - string
            - 'null'
          maxLength: 2048
        refuse_redirect:
          type:
            - string
            - 'null'
          maxLength: 2048
      title: UpdateUpsellRequest
    UpsellResource:
      type: object
      properties:
        id:
          type: integer
        product_id:
          type:
            - integer
            - 'null'
        funnel_id:
          type:
            - integer
            - 'null'
        name:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
        accept_text:
          type:
            - string
            - 'null'
        refuse_text:
          type:
            - string
            - 'null'
        accept_page:
          type:
            - string
            - 'null'
        refuse_page:
          type:
            - string
            - 'null'
        accept_redirect:
          type:
            - string
            - 'null'
        refuse_redirect:
          type:
            - string
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - product_id
        - funnel_id
        - name
        - status
        - accept_text
        - refuse_text
        - accept_page
        - refuse_page
        - accept_redirect
        - refuse_redirect
        - created_at
        - updated_at
      title: UpsellResource
  responses:
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````