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

# Crear o reemplazar una oferta

> Hace upsert por `key`. El agente nunca escribe un precio; vive aquí y el servidor lo formatea.



## OpenAPI

````yaml /openapi.es.json post /v1/offers
openapi: 3.0.0
info:
  title: API para desarrolladores de wondeya
  description: >-
    La API REST pública para construir sobre wondeya: agentes, proyectos,
    páginas, conocimiento, recursos, marca, tema, uso, recuperación y chat,
    autenticada mediante una clave de API del espacio de trabajo
    (`Authorization: Bearer wdy_live_…`).
  version: 0.1.0
  contact:
    name: wondeya
    url: https://wondeya.com
    email: team@wondeya.com
  license:
    name: Proprietary
    url: https://wondeya.com/terms
servers:
  - url: https://api.wondeya.com
    description: Producción
  - url: http://localhost:8080
    description: Desarrollo
security: []
tags:
  - name: Identity
  - name: Agents
  - name: Projects
  - name: Pages
  - name: Knowledge
  - name: Assets
  - name: Brand
  - name: Usage
  - name: Chat
paths:
  /v1/offers:
    post:
      tags:
        - Offers
      summary: Crear o reemplazar una oferta
      description: >-
        Hace upsert por `key`. El agente nunca escribe un precio; vive aquí y el
        servidor lo formatea.
      operationId: PublicOffersController_upsert_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertOfferDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOfferDto'
        '409':
          description: Se alcanzó el límite de ofertas
      security:
        - api-key: []
components:
  schemas:
    UpsertOfferDto:
      type: object
      properties:
        key:
          type: string
          description: El id en kebab-case que emite el modelo.
        agentId:
          type: object
          nullable: true
          description: >-
            El agente al que pertenece esta oferta; `null` = el pool del espacio
            de trabajo.
        name:
          $ref: '#/components/schemas/LocalizedTextDto'
        description:
          type: string
          maxLength: 600
          description: 'EN INGLÉS, orientada al prompt: cuándo ofrecerla.'
        descriptionLocale:
          type: string
          enum:
            - es
            - en
          description: >-
            Idioma de las instrucciones proporcionadas. El valor predeterminado
            es inglés para clientes existentes.
        price:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferPriceDto'
        features:
          maxItems: 6
          type: array
          items:
            $ref: '#/components/schemas/LocalizedTextDto'
        highlight:
          type: boolean
        ctaLinkId:
          type: object
          nullable: true
          description: Un id de link del agente, hacia donde lleva el botón.
        ctaLabel:
          nullable: true
          description: >-
            Texto localizado del botón CTA. El idioma principal es obligatorio;
            las traducciones automáticas de otros idiomas pueden llegar después.
          type: object
          allOf:
            - $ref: '#/components/schemas/LocalizedTextDto'
      required:
        - key
        - name
        - description
    PublicOfferDto:
      type: object
      properties:
        id:
          type: string
        agentId:
          type: object
          nullable: true
        key:
          type: string
        name:
          $ref: '#/components/schemas/LocalizedTextDto'
        description:
          type: string
        price:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferPriceDto'
        features:
          type: array
          items:
            $ref: '#/components/schemas/LocalizedTextDto'
        highlight:
          type: boolean
        ctaLinkId:
          type: object
          nullable: true
        ctaLabel:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/LocalizedTextDto'
        status:
          type: string
          enum:
            - active
            - archived
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - agentId
        - key
        - name
        - description
        - features
        - highlight
        - ctaLinkId
        - status
        - createdAt
        - updatedAt
    LocalizedTextDto:
      type: object
      properties:
        es:
          type: string
          maxLength: 200
        en:
          type: string
          maxLength: 200
    OfferPriceDto:
      type: object
      properties:
        amount:
          type: number
          description: La cifra que el servidor formatea; nunca el modelo.
        currency:
          type: string
          enum:
            - USD
            - EUR
            - CLP
            - MXN
            - ARS
            - COP
            - PEN
            - BRL
            - UYU
            - GBP
        period:
          type: string
          enum:
            - month
            - year
            - once
          nullable: true
      required:
        - amount
        - currency
        - period
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: opaque
      type: http
      description: >-
        Una clave de API del espacio de trabajo: wdy_live_… / wdy_test_…. Se
        crea en POST /workspaces/{tenantId}/keys y se muestra exactamente una
        vez.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.