{
  "openapi": "3.1.0",
  "info": {
    "title": "Totem API",
    "version": "1.0a",
    "summary": "Read-only export of a Totem Studio team: leads, calls, conversations, bookings and a changes feed.",
    "x-summary-es": "Exportación de solo lectura de un equipo de Totem Studio: leads, llamadas, conversaciones, citas y un feed de cambios.",
    "x-totem-stability": "beta",
    "x-totem-pending-components": []
  },
  "servers": [
    {
      "url": "https://api.totemstudio.ai/v1"
    }
  ],
  "externalDocs": {
    "url": "https://totemstudio.ai/developers"
  },
  "security": [
    {
      "secretKey": []
    }
  ],
  "tags": [
    {
      "name": "account",
      "description": "Your key and its integration, the teams the key reads and their members, and the health check.",
      "x-description-es": "Tu clave y su integración, los equipos que lee la clave y sus miembros, y la comprobación de estado."
    },
    {
      "name": "leads",
      "description": "Leads and clients, their activities, and the boards and stages they move through.",
      "x-description-es": "Los leads y los clientes, sus actividades y los tableros y etapas por los que pasan."
    },
    {
      "name": "calls",
      "description": "Calls with their direction, timing and a normalized outcome. No recordings or transcripts.",
      "x-description-es": "Las llamadas, con su dirección, su horario y un resultado normalizado. Sin grabaciones ni transcripciones."
    },
    {
      "name": "conversations",
      "description": "Conversations on every channel, with their status and timing. Never message content.",
      "x-description-es": "Las conversaciones de todos los canales, con su estado y sus horas. Nunca el contenido de los mensajes."
    },
    {
      "name": "bookings",
      "description": "Bookings and the bookable services customers book.",
      "x-description-es": "Las citas y los servicios reservables que piden los clientes."
    },
    {
      "name": "sync",
      "description": "The changes feed: an initial sync of every record, then each change as Totem records it.",
      "x-description-es": "El feed de cambios: una carga inicial de todos los registros y, después, cada cambio según Totem lo registra."
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "operationId": "me.get",
        "tags": [
          "account"
        ],
        "summary": "Get the integration behind this key",
        "x-summary-es": "Obtén la integración de esta clave",
        "description": "Returns the integration this key belongs to: its name, the last four characters of the key, the teams it reads today and its scopes. Call it first to check that a key works and to see which teams it reads; `GET /v1/teams` has their details.",
        "x-description-es": "Devuelve la integración a la que pertenece esta clave: su nombre, los cuatro últimos caracteres de la clave, los equipos que lee hoy y sus permisos. Llámalo primero para comprobar que la clave funciona y ver qué equipos lee; sus datos están en `GET /v1/teams`.",
        "responses": {
          "200": {
            "description": "Get the integration behind this key",
            "x-description-es": "Obtén la integración de esta clave",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                },
                "example": {
                  "object": "integration",
                  "id": "prn_m1NFIcoIU8smXfqR4ymgt6j07TfRF",
                  "livemode": false,
                  "name": "Example CRM sync",
                  "key": {
                    "last4": "Q7xZ"
                  },
                  "teams": [
                    "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR"
                  ],
                  "scopes": [
                    "teams:read",
                    "crm:read",
                    "calls:read",
                    "messages:read",
                    "calendar:read"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable"
        ],
        "x-totem-scopes": [],
        "x-totem-rate-class": "read",
        "x-totem-tenant-binding": "principal",
        "x-totem-stability": "beta"
      }
    },
    "/teams": {
      "get": {
        "operationId": "teams.list",
        "tags": [
          "account"
        ],
        "summary": "List the teams this key reads",
        "x-summary-es": "Lista los equipos que lee esta clave",
        "description": "Lists every team this key reads, in one response that is never paged, including teams that are restricted for now (their other endpoints answer `403`). Re-read it on every sync run: a team that is no longer listed has left the key, so delete its copy and its cursor.",
        "x-description-es": "Lista todos los equipos que lee esta clave, en una sola respuesta que nunca se pagina, incluidos los que están restringidos por ahora (sus otros endpoints responden `403`). Vuelve a leer esta lista en cada sincronización: un equipo que ya no aparece ha salido de la clave, así que borra su copia y su cursor.",
        "responses": {
          "200": {
            "description": "List the teams this key reads",
            "x-description-es": "Lista los equipos que lee esta clave",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamList",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list",
                      "description": "Always `list`.",
                      "x-description-es": "Siempre `list`."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Team"
                      },
                      "description": "Every team this key reads, restricted ones included.",
                      "x-description-es": "Todos los equipos que lee esta clave, incluidos los restringidos."
                    },
                    "has_more": {
                      "type": "boolean",
                      "const": false,
                      "description": "Always `false`: this list is never paged.",
                      "x-description-es": "Siempre `false`: esta lista nunca se pagina."
                    },
                    "next_cursor": {
                      "type": "null",
                      "description": "Always `null`: there is no next page.",
                      "x-description-es": "Siempre `null`: no hay página siguiente."
                    }
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "object": "team",
                      "livemode": false,
                      "name": "Example Dental",
                      "timezone": "America/New_York",
                      "default_country": "US"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "teams:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "principal",
        "x-totem-stability": "beta"
      }
    },
    "/teams/{id}": {
      "get": {
        "operationId": "teams.get",
        "tags": [
          "account"
        ],
        "summary": "Get a team",
        "x-summary-es": "Obtén un equipo",
        "description": "Returns one team this key reads: its name, time zone and default country. A team the key does not read answers `404 resource_missing`.",
        "x-description-es": "Devuelve un equipo que lee esta clave: su nombre, su zona horaria y su país predeterminado. Un equipo que la clave no lee responde `404 resource_missing`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The team's public id.",
            "x-description-es": "El identificador público del equipo.",
            "schema": {
              "type": "string",
              "pattern": "^team_[0-9A-Za-z]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a team",
            "x-description-es": "Obtén un equipo",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                },
                "example": {
                  "id": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                  "object": "team",
                  "livemode": false,
                  "name": "Example Dental",
                  "timezone": "America/New_York",
                  "default_country": "US"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "resource_missing",
          "team_state_restricted",
          "sector_restricted"
        ],
        "x-totem-scopes": [
          "teams:read"
        ],
        "x-totem-rate-class": "read",
        "x-totem-tenant-binding": "resource_id",
        "x-totem-stability": "beta"
      }
    },
    "/boards": {
      "get": {
        "operationId": "boards.list",
        "tags": [
          "leads"
        ],
        "summary": "List boards with their stages",
        "x-summary-es": "Lista los tableros con sus etapas",
        "description": "Returns a page of the team's boards, each with its stages in pipeline order. Boards also arrive in the changes feed; read this list when you need them at once, for example when a lead names a stage you have not seen yet.",
        "x-description-es": "Devuelve una página de tableros del equipo, cada uno con sus etapas en el orden del embudo. Los tableros también llegan por el feed de cambios; lee esta lista cuando los necesites al momento, por ejemplo cuando un lead indique una etapa que aún no conoces.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1–100. Defaults to 25.",
            "x-description-es": "Elementos por página, de 1 a 100. Por defecto, 25.",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` of the previous page. Omit it for the first page.",
            "x-description-es": "El `next_cursor` de la página anterior. Omítelo en la primera página.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "List boards with their stages",
            "x-description-es": "Lista los tableros con sus etapas",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                      "object": "board",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "name": "New patients",
                      "is_default": true,
                      "is_archived": false,
                      "appointment_booked_stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
                      "stages": [
                        {
                          "object": "stage",
                          "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
                          "name": "New",
                          "position": 0,
                          "is_default": true,
                          "is_final": false,
                          "is_archive": false,
                          "mode": "automated"
                        },
                        {
                          "object": "stage",
                          "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                          "name": "Contacted",
                          "position": 1,
                          "is_default": false,
                          "is_final": false,
                          "is_archive": false,
                          "mode": "supervised"
                        },
                        {
                          "object": "stage",
                          "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
                          "name": "Visit booked",
                          "position": 2,
                          "is_default": false,
                          "is_final": true,
                          "is_archive": false,
                          "mode": "standard"
                        }
                      ],
                      "version": 4,
                      "updated_at": "2026-09-02T16:40:00.000Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "crm:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/members": {
      "get": {
        "operationId": "members.list",
        "tags": [
          "account"
        ],
        "summary": "List team members",
        "x-summary-es": "Lista los miembros del equipo",
        "description": "Lists every member of the team in one response that is never paged and takes no `limit` or `cursor`. Members are not in the changes feed: read this list when you start syncing a team, again when an item names a member you do not know, and at least once a day. A member who leaves the team drops out of the list while older records keep naming its id, so keep a name you need from an earlier read.",
        "x-description-es": "Lista todos los miembros del equipo en una sola respuesta, que nunca se pagina y no admite `limit` ni `cursor`. Los miembros no llegan por el feed de cambios: lee esta lista al empezar a sincronizar un equipo, de nuevo cuando un elemento indique un miembro que no conoces y, como mínimo, una vez al día. Un miembro que deja el equipo sale de la lista, pero los registros anteriores siguen indicando su identificador, así que conserva de una lectura anterior el nombre que necesites.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "List team members",
            "x-description-es": "Lista los miembros del equipo",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberList",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list",
                      "description": "Always `list`.",
                      "x-description-es": "Siempre `list`."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Member"
                      },
                      "description": "Every member of the team.",
                      "x-description-es": "Todos los miembros del equipo."
                    },
                    "has_more": {
                      "type": "boolean",
                      "const": false,
                      "description": "Always `false`: this list is never paged.",
                      "x-description-es": "Siempre `false`: esta lista nunca se pagina."
                    },
                    "next_cursor": {
                      "type": "null",
                      "description": "Always `null`: there is no next page.",
                      "x-description-es": "Siempre `null`: no hay página siguiente."
                    }
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
                      "object": "member",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "display_name": "Sam Lee"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "teams:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/booking_services": {
      "get": {
        "operationId": "booking_services.list",
        "tags": [
          "bookings"
        ],
        "summary": "List bookable services",
        "x-summary-es": "Lista los servicios reservables",
        "description": "Lists every bookable service of the team in one response that is never paged and takes no `limit` or `cursor`. Bookable services are not in the changes feed: read this list when you start syncing a team, again when a booking names a service you do not know, and at least once a day. A deleted service drops out of the list while its bookings keep naming its id, so keep a service name you need from an earlier read.",
        "x-description-es": "Lista todos los servicios reservables del equipo en una sola respuesta, que nunca se pagina y no admite `limit` ni `cursor`. Los servicios reservables no llegan por el feed de cambios: lee esta lista al empezar a sincronizar un equipo, de nuevo cuando una cita indique un servicio que no conoces y, como mínimo, una vez al día. Un servicio borrado sale de la lista, pero sus citas siguen indicando su identificador, así que conserva de una lectura anterior el nombre de servicio que necesites.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "List bookable services",
            "x-description-es": "Lista los servicios reservables",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingServiceList",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list",
                      "description": "Always `list`.",
                      "x-description-es": "Siempre `list`."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BookingService"
                      },
                      "description": "Every bookable service of the team.",
                      "x-description-es": "Todos los servicios reservables del equipo."
                    },
                    "has_more": {
                      "type": "boolean",
                      "const": false,
                      "description": "Always `false`: this list is never paged.",
                      "x-description-es": "Siempre `false`: esta lista nunca se pagina."
                    },
                    "next_cursor": {
                      "type": "null",
                      "description": "Always `null`: there is no next page.",
                      "x-description-es": "Siempre `null`: no hay página siguiente."
                    }
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "svc_h42kgwwJGPzsm2Zoy1A1RBv1KIrX5",
                      "object": "booking_service",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "name": "First visit",
                      "meeting_type": "in_person"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "calendar:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/leads": {
      "get": {
        "operationId": "leads.list",
        "tags": [
          "leads"
        ],
        "summary": "List leads",
        "x-summary-es": "Lista los leads",
        "description": "Returns a page of the team's leads and clients, in a stable order that carries no meaning. Filter by at most one of `board`, `stage` or `status`; a board or stage the team does not have returns an empty page. To keep a copy up to date, follow the changes feed instead of re-reading this list.",
        "x-description-es": "Devuelve una página de leads y clientes del equipo, en un orden estable que no tiene significado. Filtra como máximo por uno de `board`, `stage` o `status`; un tablero o una etapa que el equipo no tiene devuelve una página vacía. Para mantener una copia al día, sigue el feed de cambios en lugar de volver a leer esta lista.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1–100. Defaults to 25.",
            "x-description-es": "Elementos por página, de 1 a 100. Por defecto, 25.",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` of the previous page. Omit it for the first page.",
            "x-description-es": "El `next_cursor` de la página anterior. Omítelo en la primera página.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "board",
            "in": "query",
            "required": false,
            "description": "Only leads on this board. At most one of `board`, `stage` and `status`.",
            "x-description-es": "Solo los leads de este tablero. Como máximo uno de `board`, `stage` y `status`.",
            "schema": {
              "type": "string",
              "pattern": "^brd_[0-9A-Za-z]+$"
            }
          },
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "description": "Only leads in this stage. At most one of `board`, `stage` and `status`.",
            "x-description-es": "Solo los leads de esta etapa. Como máximo uno de `board`, `stage` y `status`.",
            "schema": {
              "type": "string",
              "pattern": "^stg_[0-9A-Za-z]+$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only leads with this status. At most one of `board`, `stage` and `status`.",
            "x-description-es": "Solo los leads con este estado. Como máximo uno de `board`, `stage` y `status`.",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "contacted",
                "qualified",
                "negotiating",
                "converted",
                "lost",
                "archived",
                "unreachable"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "List leads",
            "x-description-es": "Lista los leads",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "object": "lead",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "record_kind": "lead",
                      "name": "Alex",
                      "surname": "Rivera",
                      "email": "alex.rivera@example.com",
                      "company": "Example Dental",
                      "phone": "+12025550123",
                      "phone_status": "valid",
                      "status": "contacted",
                      "status_set_by": "ai",
                      "archive_reason": null,
                      "archived_from_status": null,
                      "contact_permissions": {
                        "do_not_contact": false,
                        "email_opt_out": false,
                        "email_opt_out_at": null,
                        "whatsapp_consent": null,
                        "provenance": {
                          "do_not_contact": null,
                          "email_opt_out": null,
                          "whatsapp_consent": null
                        }
                      },
                      "merged_into": null,
                      "transferred_to": null,
                      "revived_at": null,
                      "pipeline_cleared": false,
                      "converted_at": null,
                      "value_at_conversion": null,
                      "priority": "high",
                      "tags": [
                        "spring-check-up"
                      ],
                      "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                      "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                      "assignees": [
                        "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
                      ],
                      "estimated_value": 1200,
                      "estimated_value_currency": null,
                      "source": "meta_lead_ads",
                      "source_channel": null,
                      "source_detail": null,
                      "source_provenance": "member_editable",
                      "created_at": "2026-09-28T10:15:00.000Z",
                      "version": 3,
                      "updated_at": "2026-09-28T10:20:01.250Z"
                    }
                  ],
                  "has_more": true,
                  "next_cursor": "eyJ2IjoxLCJrIjoibGVhZCIsImEiOiJsZWFkX3I3MkVmYlJOVXp1cU9SRkpSME84SHhBd0VYZDkzakdVVFlNYU1NWEtTRjBRYkxTOENpVUtKcEVQMzRMRlFHIiwicyI6ImYzNTI3NzI2MTkwYiJ93iHyRg"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "crm:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/leads/{id}": {
      "get": {
        "operationId": "leads.get",
        "tags": [
          "leads"
        ],
        "summary": "Get a lead with its attribution and response",
        "x-summary-es": "Obtén un lead con su atribución y su respuesta",
        "description": "Returns one lead with its two facets: `attribution` (where it came from) and `response` (how the team has answered it), each with its own `version`. A lead created moments ago can answer `404 resource_missing` until Totem has prepared it; the changes feed delivers it then.",
        "x-description-es": "Devuelve un lead con sus dos facetas: `attribution` (de dónde viene) y `response` (cómo le ha respondido el equipo), cada una con su propia `version`. Un lead creado hace un momento puede responder `404 resource_missing` hasta que Totem lo prepare; el feed de cambios lo entrega entonces.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The lead's public id.",
            "x-description-es": "El identificador público del lead.",
            "schema": {
              "type": "string",
              "pattern": "^lead_[0-9A-Za-z]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a lead with its attribution and response",
            "x-description-es": "Obtén un lead con su atribución y su respuesta",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadDetail"
                },
                "example": {
                  "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                  "object": "lead",
                  "livemode": false,
                  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                  "record_kind": "lead",
                  "name": "Alex",
                  "surname": "Rivera",
                  "email": "alex.rivera@example.com",
                  "company": "Example Dental",
                  "phone": "+12025550123",
                  "phone_status": "valid",
                  "status": "contacted",
                  "status_set_by": "ai",
                  "archive_reason": null,
                  "archived_from_status": null,
                  "contact_permissions": {
                    "do_not_contact": false,
                    "email_opt_out": false,
                    "email_opt_out_at": null,
                    "whatsapp_consent": null,
                    "provenance": {
                      "do_not_contact": null,
                      "email_opt_out": null,
                      "whatsapp_consent": null
                    }
                  },
                  "merged_into": null,
                  "transferred_to": null,
                  "revived_at": null,
                  "pipeline_cleared": false,
                  "converted_at": null,
                  "value_at_conversion": null,
                  "priority": "high",
                  "tags": [
                    "spring-check-up"
                  ],
                  "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                  "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                  "assignees": [
                    "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
                  ],
                  "estimated_value": 1200,
                  "estimated_value_currency": null,
                  "source": "meta_lead_ads",
                  "source_channel": null,
                  "source_detail": null,
                  "source_provenance": "member_editable",
                  "created_at": "2026-09-28T10:15:00.000Z",
                  "version": 3,
                  "updated_at": "2026-09-28T10:20:01.250Z",
                  "attribution": {
                    "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                    "object": "lead_attribution",
                    "livemode": false,
                    "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                    "original_capture": {
                      "capture": "at_creation",
                      "captured_at": "2026-09-28T10:15:00.000Z",
                      "source": "meta_lead_ads",
                      "source_hint": null,
                      "source_channel": null,
                      "external_provider": null,
                      "received_at": "2026-09-28T10:15:00.000Z",
                      "submitted_at": "2026-09-28T10:14:30.000Z",
                      "origin": null,
                      "campaign": {
                        "id": {
                          "value": "120210000000000101",
                          "provenance": "provider"
                        },
                        "name": {
                          "value": "Spring check-up",
                          "provenance": "provider"
                        }
                      },
                      "ad": {
                        "id": {
                          "value": "120210000000000303",
                          "provenance": "provider"
                        },
                        "name": {
                          "value": "Free first visit",
                          "provenance": "provider"
                        }
                      },
                      "ad_set": {
                        "id": {
                          "value": "120210000000000202",
                          "provenance": "provider"
                        },
                        "name": {
                          "value": "Families nearby",
                          "provenance": "provider"
                        }
                      },
                      "ad_group": {
                        "id": {
                          "value": null,
                          "provenance": "not_captured"
                        }
                      },
                      "form": {
                        "id": {
                          "value": "900000000000000404",
                          "provenance": "provider"
                        },
                        "name": {
                          "value": "Book a check-up",
                          "provenance": "provider"
                        }
                      },
                      "creative": {
                        "id": {
                          "value": null,
                          "provenance": "not_captured"
                        }
                      },
                      "asset_group": {
                        "id": {
                          "value": null,
                          "provenance": "not_captured"
                        }
                      },
                      "page": {
                        "id": {
                          "value": "100000000000000505",
                          "provenance": "provider"
                        },
                        "name": {
                          "value": "Example Dental",
                          "provenance": "provider"
                        }
                      },
                      "utm": null,
                      "click_network": {
                        "value": null,
                        "provenance": "not_captured"
                      },
                      "ad_referral": null,
                      "family_origin": null,
                      "audience": {
                        "value": null,
                        "missing_reason": "unsupported"
                      }
                    },
                    "original_capture_missing_reason": null,
                    "latest_submission": null,
                    "latest_submission_missing_reason": "not_captured",
                    "version": 1,
                    "updated_at": "2026-09-28T10:15:02.100Z"
                  },
                  "response": {
                    "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                    "object": "lead_response",
                    "livemode": false,
                    "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                    "last_inbound_at": "2026-10-01T08:58:00.000Z",
                    "last_outbound_at": "2026-10-01T08:59:30.000Z",
                    "awaiting_reply": false,
                    "last_answered_call_at": "2026-09-28T10:17:00.000Z",
                    "last_whatsapp_delivery_status": "read",
                    "coverage": {
                      "conversations": 2,
                      "calls": 1,
                      "channels_without_delivery_data": [
                        "email"
                      ],
                      "truncated": false
                    },
                    "version": 7,
                    "updated_at": "2026-10-01T08:59:31.040Z"
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "resource_missing",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready"
        ],
        "x-totem-scopes": [
          "crm:read"
        ],
        "x-totem-rate-class": "read",
        "x-totem-tenant-binding": "resource_id",
        "x-totem-stability": "beta"
      }
    },
    "/leads/search": {
      "post": {
        "operationId": "leads.search",
        "tags": [
          "leads"
        ],
        "summary": "Find leads by exact phone or email",
        "x-summary-es": "Busca leads por teléfono o correo exactos",
        "description": "Finds the team's leads whose phone or email matches exactly, including archived, merged and client records (follow `merged_into` to the lead that was kept). Send exactly one of `phone` or `email` in the JSON body, never in the URL. Returns at most 10 leads, chosen from the first 20 records that match, in one response that never paginates.",
        "x-description-es": "Busca los leads del equipo cuyo teléfono o correo electrónico coincida exactamente, incluidos los archivados, los fusionados y los clientes (sigue `merged_into` hasta el lead que se conservó). Envía exactamente uno de `phone` o `email` en el cuerpo JSON, nunca en la URL. Devuelve como máximo 10 leads, elegidos entre los 20 primeros registros que coincidan, en una sola respuesta que nunca se pagina.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "phone": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 40,
                        "description": "A phone number in E.164 (`+12025550123`). It finds the number stored in E.164, with or without the `+`, and in the layouts phone libraries write: `+1 202-555-0123`, `(202) 555-0123` and `2025550123`. Other layouts, such as `202 555 0123`, are not found.",
                        "x-description-es": "Un teléfono en formato E.164 (`+12025550123`). Encuentra el número guardado en E.164, con o sin `+`, y en los formatos que escriben las bibliotecas de teléfonos: `+1 202-555-0123`, `(202) 555-0123` y `2025550123`. Otros formatos, como `202 555 0123`, no aparecen."
                      }
                    },
                    "required": [
                      "phone"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 254,
                        "description": "An email address. It finds records stored exactly as sent, or stored in lowercase.",
                        "x-description-es": "Un correo electrónico. Encuentra los registros guardados exactamente igual o en minúsculas."
                      }
                    },
                    "required": [
                      "email"
                    ],
                    "additionalProperties": false
                  }
                ],
                "description": "Exactly one of `phone` or `email`, in the JSON body and never in the URL.",
                "x-description-es": "Exactamente uno de `phone` o `email`, en el cuerpo JSON y nunca en la URL."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Up to 10 matching leads, in one response.",
            "x-description-es": "Hasta 10 leads que coinciden, en una sola respuesta.",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadList",
                  "description": "The matching leads, in one response: a `LeadList` that never paginates.",
                  "x-description-es": "Los leads que coinciden, en una sola respuesta: una `LeadList` que nunca se pagina.",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list",
                      "description": "Always `list`.",
                      "x-description-es": "Siempre `list`."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Lead"
                      },
                      "description": "The matching leads: at most 10.",
                      "x-description-es": "Los leads que coinciden: como máximo 10.",
                      "maxItems": 10
                    },
                    "has_more": {
                      "type": "boolean",
                      "const": false,
                      "description": "Always `false`, even when more records match: search returns at most 10 leads and has no next page.",
                      "x-description-es": "Siempre `false`, aunque coincidan más registros: la búsqueda devuelve como máximo 10 leads y no tiene página siguiente."
                    },
                    "next_cursor": {
                      "type": "null",
                      "description": "Always `null`: search does not paginate.",
                      "x-description-es": "Siempre `null`: la búsqueda no se pagina."
                    }
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "object": "lead",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "record_kind": "lead",
                      "name": "Alex",
                      "surname": "Rivera",
                      "email": "alex.rivera@example.com",
                      "company": "Example Dental",
                      "phone": "+12025550123",
                      "phone_status": "valid",
                      "status": "contacted",
                      "status_set_by": "ai",
                      "archive_reason": null,
                      "archived_from_status": null,
                      "contact_permissions": {
                        "do_not_contact": false,
                        "email_opt_out": false,
                        "email_opt_out_at": null,
                        "whatsapp_consent": null,
                        "provenance": {
                          "do_not_contact": null,
                          "email_opt_out": null,
                          "whatsapp_consent": null
                        }
                      },
                      "merged_into": null,
                      "transferred_to": null,
                      "revived_at": null,
                      "pipeline_cleared": false,
                      "converted_at": null,
                      "value_at_conversion": null,
                      "priority": "high",
                      "tags": [
                        "spring-check-up"
                      ],
                      "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                      "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                      "assignees": [
                        "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
                      ],
                      "estimated_value": 1200,
                      "estimated_value_currency": null,
                      "source": "meta_lead_ads",
                      "source_channel": null,
                      "source_detail": null,
                      "source_provenance": "member_editable",
                      "created_at": "2026-09-28T10:15:00.000Z",
                      "version": 3,
                      "updated_at": "2026-09-28T10:20:01.250Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready"
        ],
        "x-totem-scopes": [
          "crm:read"
        ],
        "x-totem-rate-class": "read",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/leads/{id}/activities": {
      "get": {
        "operationId": "leads.activities",
        "tags": [
          "leads"
        ],
        "summary": "List a lead's activities",
        "x-summary-es": "Lista las actividades de un lead",
        "description": "Returns a page of the lead's activities: each change of its stage, status or assigned members, with when it happened and, when Totem recorded it, who made it. Pages are not in date order, so sort by `occurred_at`. Activities never change once written, and new ones also arrive in the changes feed.",
        "x-description-es": "Devuelve una página de actividades del lead: cada cambio de etapa, de estado o de miembros asignados, con cuándo ocurrió y, si Totem lo registró, quién lo hizo. Las páginas no van por fecha, así que ordena por `occurred_at`. Una actividad no cambia una vez escrita, y las nuevas también llegan por el feed de cambios.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The lead's public id.",
            "x-description-es": "El identificador público del lead.",
            "schema": {
              "type": "string",
              "pattern": "^lead_[0-9A-Za-z]+$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1–100. Defaults to 25.",
            "x-description-es": "Elementos por página, de 1 a 100. Por defecto, 25.",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` of the previous page. Omit it for the first page.",
            "x-description-es": "El `next_cursor` de la página anterior. Omítelo en la primera página.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a lead's activities",
            "x-description-es": "Lista las actividades de un lead",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "act_aBgzeetVKDEjpAAkXfEFF53ZGd2ZMmGhUDKgagqLbh6c7R1GqOl0xsFw7pyRhD3SqqYWGMdb371xxj",
                      "object": "activity",
                      "livemode": false,
                      "type": "stage_changed",
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "occurred_at": "2026-09-28T10:20:00.000Z",
                      "actor_kind": "ai",
                      "stage_snapshot": {
                        "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                        "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                        "name": "Contacted"
                      },
                      "value_snapshot": 1200,
                      "from": {
                        "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
                        "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
                      },
                      "to": {
                        "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                        "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
                      },
                      "version": 1,
                      "updated_at": "2026-09-28T10:20:01.500Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "resource_missing",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "crm:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "resource_id",
        "x-totem-stability": "beta"
      }
    },
    "/calls": {
      "get": {
        "operationId": "calls.list",
        "tags": [
          "calls"
        ],
        "summary": "List calls",
        "x-summary-es": "Lista las llamadas",
        "description": "Returns a page of the team's calls, each with its direction, start time, duration and a normalized outcome, and linked to its lead when there is one. Pass `lead` for one lead's calls. Recordings and transcripts are not exported.",
        "x-description-es": "Devuelve una página de llamadas del equipo, cada una con su dirección, su hora de inicio, su duración y un resultado normalizado, y vinculada a su lead cuando lo hay. Envía `lead` para obtener las llamadas de un lead. Las grabaciones y las transcripciones no se exportan.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1–100. Defaults to 25.",
            "x-description-es": "Elementos por página, de 1 a 100. Por defecto, 25.",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` of the previous page. Omit it for the first page.",
            "x-description-es": "El `next_cursor` de la página anterior. Omítelo en la primera página.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "lead",
            "in": "query",
            "required": false,
            "description": "Only the calls linked to this lead: every item's `lead` is this id. A lead of another team, or one that does not exist, matches nothing.",
            "x-description-es": "Solo las llamadas vinculadas a este lead: el `lead` de cada elemento es este identificador. Un lead de otro equipo, o que no existe, no coincide con nada.",
            "schema": {
              "type": "string",
              "pattern": "^lead_[0-9A-Za-z]+$"
            }
          },
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "List calls",
            "x-description-es": "Lista las llamadas",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
                      "object": "call",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "direction": "inbound",
                      "started_at": "2026-09-28T10:17:00.000Z",
                      "duration_seconds": 184,
                      "outcome": "answered_ai",
                      "outcome_basis": "inbound_verdict",
                      "version": 2,
                      "updated_at": "2026-09-28T10:21:04.010Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "calls:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/calls/{id}": {
      "get": {
        "operationId": "calls.get",
        "tags": [
          "calls"
        ],
        "summary": "Get a call",
        "x-summary-es": "Obtén una llamada",
        "description": "Returns one call by its id. A call this key cannot read, or one that was removed, answers `404 resource_missing`.",
        "x-description-es": "Devuelve una llamada por su identificador. Una llamada que esta clave no puede leer, o que se eliminó, responde `404 resource_missing`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The call's public id.",
            "x-description-es": "El identificador público de la llamada.",
            "schema": {
              "type": "string",
              "pattern": "^call_[0-9A-Za-z]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a call",
            "x-description-es": "Obtén una llamada",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                },
                "example": {
                  "id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
                  "object": "call",
                  "livemode": false,
                  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                  "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                  "direction": "inbound",
                  "started_at": "2026-09-28T10:17:00.000Z",
                  "duration_seconds": 184,
                  "outcome": "answered_ai",
                  "outcome_basis": "inbound_verdict",
                  "version": 2,
                  "updated_at": "2026-09-28T10:21:04.010Z"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "resource_missing",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready"
        ],
        "x-totem-scopes": [
          "calls:read"
        ],
        "x-totem-rate-class": "read",
        "x-totem-tenant-binding": "resource_id",
        "x-totem-stability": "beta"
      }
    },
    "/conversations": {
      "get": {
        "operationId": "conversations.list",
        "tags": [
          "conversations"
        ],
        "summary": "List conversations",
        "x-summary-es": "Lista las conversaciones",
        "description": "Returns a page of the team's conversations, one per channel, business account and contact address: channel, inbox status, assignee and the times of the latest inbound and outbound messages. Pass `lead` for one lead's conversations. Message content is never exported.",
        "x-description-es": "Devuelve una página de conversaciones del equipo, una por canal, cuenta de empresa y dirección de contacto: canal, estado en la bandeja de entrada, responsable y la hora de los últimos mensajes recibidos y enviados. Envía `lead` para obtener las conversaciones de un lead. El contenido de los mensajes nunca se exporta.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1–100. Defaults to 25.",
            "x-description-es": "Elementos por página, de 1 a 100. Por defecto, 25.",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` of the previous page. Omit it for the first page.",
            "x-description-es": "El `next_cursor` de la página anterior. Omítelo en la primera página.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "lead",
            "in": "query",
            "required": false,
            "description": "Only the conversations linked to this lead: every item's `lead` is this id. A lead of another team, or one that does not exist, matches nothing.",
            "x-description-es": "Solo las conversaciones vinculadas a este lead: el `lead` de cada elemento es este identificador. Un lead de otro equipo, o que no existe, no coincide con nada.",
            "schema": {
              "type": "string",
              "pattern": "^lead_[0-9A-Za-z]+$"
            }
          },
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "List conversations",
            "x-description-es": "Lista las conversaciones",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ",
                      "object": "conversation",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "channel_type": "whatsapp",
                      "status": "active",
                      "assignee": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
                      "reply_mode": "ai",
                      "created_at": "2026-09-28T10:16:00.000Z",
                      "last_inbound_at": "2026-10-01T08:58:00.000Z",
                      "last_outbound_at": "2026-10-01T08:59:30.000Z",
                      "version": 12,
                      "updated_at": "2026-10-01T08:59:31.040Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "messages:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/conversations/{id}": {
      "get": {
        "operationId": "conversations.get",
        "tags": [
          "conversations"
        ],
        "summary": "Get a conversation",
        "x-summary-es": "Obtén una conversación",
        "description": "Returns one conversation by its id, without message content. A conversation this key cannot read, or one that was removed, answers `404 resource_missing`.",
        "x-description-es": "Devuelve una conversación por su identificador, sin el contenido de los mensajes. Una conversación que esta clave no puede leer, o que se eliminó, responde `404 resource_missing`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The conversation's public id.",
            "x-description-es": "El identificador público de la conversación.",
            "schema": {
              "type": "string",
              "pattern": "^conv_[0-9A-Za-z]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a conversation",
            "x-description-es": "Obtén una conversación",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                },
                "example": {
                  "id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ",
                  "object": "conversation",
                  "livemode": false,
                  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                  "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                  "channel_type": "whatsapp",
                  "status": "active",
                  "assignee": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
                  "reply_mode": "ai",
                  "created_at": "2026-09-28T10:16:00.000Z",
                  "last_inbound_at": "2026-10-01T08:58:00.000Z",
                  "last_outbound_at": "2026-10-01T08:59:30.000Z",
                  "version": 12,
                  "updated_at": "2026-10-01T08:59:31.040Z"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "resource_missing",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready"
        ],
        "x-totem-scopes": [
          "messages:read"
        ],
        "x-totem-rate-class": "read",
        "x-totem-tenant-binding": "resource_id",
        "x-totem-stability": "beta"
      }
    },
    "/bookings": {
      "get": {
        "operationId": "bookings.list",
        "tags": [
          "bookings"
        ],
        "summary": "List bookings",
        "x-summary-es": "Lista las citas",
        "description": "Returns a page of the team's bookings: appointments for a bookable service, events from the connected calendar and bookings imported from other systems, each with its status and times. Pass `lead` for one lead's bookings.",
        "x-description-es": "Devuelve una página de citas del equipo: citas para un servicio reservable, eventos del calendario conectado y citas importadas de otros sistemas, cada una con su estado y su horario. Envía `lead` para obtener las citas de un lead.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1–100. Defaults to 25.",
            "x-description-es": "Elementos por página, de 1 a 100. Por defecto, 25.",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` of the previous page. Omit it for the first page.",
            "x-description-es": "El `next_cursor` de la página anterior. Omítelo en la primera página.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "lead",
            "in": "query",
            "required": false,
            "description": "Only the bookings linked to this lead: every item's `lead` is this id. A lead of another team, or one that does not exist, matches nothing.",
            "x-description-es": "Solo las citas vinculadas a este lead: el `lead` de cada elemento es este identificador. Un lead de otro equipo, o que no existe, no coincide con nada.",
            "schema": {
              "type": "string",
              "pattern": "^lead_[0-9A-Za-z]+$"
            }
          },
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "List bookings",
            "x-description-es": "Lista las citas",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "bkg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3ttMKHRR9ADk3N7Cr3NSuY0",
                      "object": "booking",
                      "livemode": false,
                      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                      "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "kind": "service_booking",
                      "service": "svc_h42kgwwJGPzsm2Zoy1A1RBv1KIrX5",
                      "status": "scheduled",
                      "starts_at": "2026-10-06T15:00:00.000Z",
                      "ends_at": "2026-10-06T15:30:00.000Z",
                      "meeting_type": "in_person",
                      "source": "ai",
                      "rescheduled_from": null,
                      "rescheduled_to": null,
                      "created_at": "2026-10-01T09:01:00.000Z",
                      "version": 1,
                      "updated_at": "2026-10-01T09:01:02.000Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded"
        ],
        "x-totem-scopes": [
          "calendar:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/bookings/{id}": {
      "get": {
        "operationId": "bookings.get",
        "tags": [
          "bookings"
        ],
        "summary": "Get a booking",
        "x-summary-es": "Obtén una cita",
        "description": "Returns one booking by its id. A booking this key cannot read, or one that was removed, answers `404 resource_missing`.",
        "x-description-es": "Devuelve una cita por su identificador. Una cita que esta clave no puede leer, o que se eliminó, responde `404 resource_missing`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The booking's public id.",
            "x-description-es": "El identificador público de la cita.",
            "schema": {
              "type": "string",
              "pattern": "^bkg_[0-9A-Za-z]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a booking",
            "x-description-es": "Obtén una cita",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                },
                "example": {
                  "id": "bkg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3ttMKHRR9ADk3N7Cr3NSuY0",
                  "object": "booking",
                  "livemode": false,
                  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                  "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                  "kind": "service_booking",
                  "service": "svc_h42kgwwJGPzsm2Zoy1A1RBv1KIrX5",
                  "status": "scheduled",
                  "starts_at": "2026-10-06T15:00:00.000Z",
                  "ends_at": "2026-10-06T15:30:00.000Z",
                  "meeting_type": "in_person",
                  "source": "ai",
                  "rescheduled_from": null,
                  "rescheduled_to": null,
                  "created_at": "2026-10-01T09:01:00.000Z",
                  "version": 1,
                  "updated_at": "2026-10-01T09:01:02.000Z"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "resource_missing",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready"
        ],
        "x-totem-scopes": [
          "calendar:read"
        ],
        "x-totem-rate-class": "read",
        "x-totem-tenant-binding": "resource_id",
        "x-totem-stability": "beta"
      }
    },
    "/sync/changes": {
      "get": {
        "operationId": "sync.changes",
        "tags": [
          "sync"
        ],
        "summary": "Read the changes feed of one team",
        "x-summary-es": "Lee el feed de cambios de un equipo",
        "description": "Returns the next page of one team's changes, in the order Totem recorded them: each item is a record's current state or its removal. Without `cursor` it starts an initial sync of every record; after applying each page, store its `next_cursor` and send it on the next call, even when the page is empty. A cursor expires 30 days after the point in the feed it reached or, while an initial sync is still running, 30 days after that sync started.",
        "x-description-es": "Devuelve la siguiente página de cambios de un equipo, en el orden en que Totem los registró: cada elemento es el estado actual de un registro o su eliminación. Sin `cursor` empieza una carga inicial de todos los registros; después de aplicar cada página, guarda su `next_cursor` y envíalo en la siguiente petición, aunque la página llegue vacía. Un cursor caduca 30 días después del punto del feed al que llegó o, mientras una carga inicial sigue en curso, 30 días después de que empezara.",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `next_cursor` of the previous page. Omit it to start an initial sync from the beginning.",
            "x-description-es": "El `next_cursor` de la página anterior. Omítelo para empezar una carga inicial desde el principio.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1–100. Defaults to 25.",
            "x-description-es": "Elementos por página, de 1 a 100. Por defecto, 25.",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "$ref": "#/components/parameters/TotemTeam"
          }
        ],
        "responses": {
          "200": {
            "description": "Read the changes feed of one team",
            "x-description-es": "Lee el feed de cambios de un equipo",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedPage"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "kind": "lead",
                      "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "version": 3,
                      "object": {
                        "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                        "object": "lead",
                        "livemode": false,
                        "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                        "record_kind": "lead",
                        "name": "Alex",
                        "surname": "Rivera",
                        "email": "alex.rivera@example.com",
                        "company": "Example Dental",
                        "phone": "+12025550123",
                        "phone_status": "valid",
                        "status": "contacted",
                        "status_set_by": "ai",
                        "archive_reason": null,
                        "archived_from_status": null,
                        "contact_permissions": {
                          "do_not_contact": false,
                          "email_opt_out": false,
                          "email_opt_out_at": null,
                          "whatsapp_consent": null,
                          "provenance": {
                            "do_not_contact": null,
                            "email_opt_out": null,
                            "whatsapp_consent": null
                          }
                        },
                        "merged_into": null,
                        "transferred_to": null,
                        "revived_at": null,
                        "pipeline_cleared": false,
                        "converted_at": null,
                        "value_at_conversion": null,
                        "priority": "high",
                        "tags": [
                          "spring-check-up"
                        ],
                        "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                        "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                        "assignees": [
                          "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
                        ],
                        "estimated_value": 1200,
                        "estimated_value_currency": null,
                        "source": "meta_lead_ads",
                        "source_channel": null,
                        "source_detail": null,
                        "source_provenance": "member_editable",
                        "created_at": "2026-09-28T10:15:00.000Z",
                        "version": 3,
                        "updated_at": "2026-09-28T10:20:01.250Z"
                      }
                    },
                    {
                      "kind": "call",
                      "id": "call_m1pf4APjJWVi3Z7ulyNaW8y3lUi7V",
                      "version": 5,
                      "removed": {
                        "reason": "deleted"
                      }
                    },
                    {
                      "kind": "lead_response",
                      "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                      "version": 7,
                      "object": {
                        "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                        "object": "lead_response",
                        "livemode": false,
                        "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                        "last_inbound_at": "2026-10-01T08:58:00.000Z",
                        "last_outbound_at": "2026-10-01T08:59:30.000Z",
                        "awaiting_reply": false,
                        "last_answered_call_at": "2026-09-28T10:17:00.000Z",
                        "last_whatsapp_delivery_status": "read",
                        "coverage": {
                          "conversations": 2,
                          "calls": 1,
                          "channels_without_delivery_data": [
                            "email"
                          ],
                          "truncated": false
                        },
                        "version": 7,
                        "updated_at": "2026-10-01T08:59:31.040Z"
                      }
                    }
                  ],
                  "has_more": false,
                  "next_cursor": "eyJ2IjoxLCJ0ZWFtIjoidGVhbV9yOXVZcklXNGdTRkpKNmhaUTlpcDFVSXBQYUFEMUNGN05SIiwiZXBvY2giOjAsInQiOnsicyI6MTc5MDg0NTE3MSwibnMiOjQwMDAwMDAwfSwibiI6IjVkMjJhMTVlM2E5MmNmYTE4NzUzZTVmYzkyZmVjNzI0MjQyNjIzZDE2MGIxZTUxMzRiYTM1ODE5MmUzNzM0ZjEiLCJicyI6bnVsbH01ZPX02"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "invalid_credentials",
          "key_expired",
          "insufficient_scope",
          "plan_not_entitled",
          "ip_not_allowed",
          "capability_disabled",
          "rate_limited",
          "internal_error",
          "api_disabled",
          "service_unavailable",
          "team_required",
          "team_not_accessible",
          "team_state_restricted",
          "sector_restricted",
          "capture_not_ready",
          "quota_exceeded",
          "resync_required",
          "sync_cursor_expired"
        ],
        "x-totem-scopes": [
          "crm:read",
          "calls:read",
          "messages:read",
          "calendar:read"
        ],
        "x-totem-rate-class": "sync",
        "x-totem-tenant-binding": "team_header",
        "x-totem-stability": "beta"
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "tags": [
          "account"
        ],
        "summary": "Check that the API is up",
        "x-summary-es": "Comprueba que la API está disponible",
        "description": "Tells you whether the API is up; call it with `GET`, because the firewall in front of the API answers any other method, `HEAD` included, with a plain `404`. It needs no key and takes no query string: any parameter, even a cache-buster, answers `400 invalid_request`. The `Totem-Release` response header names the release that answered.",
        "x-description-es": "Indica si la API está disponible; llama a este endpoint con `GET`, porque el cortafuegos que protege la API responde a cualquier otro método, `HEAD` incluido, con un `404` simple. No necesita clave ni admite cadena de consulta: cualquier parámetro, incluso uno para evitar la caché, recibe `400 invalid_request`. La cabecera de respuesta `Totem-Release` indica la versión que respondió.",
        "security": [],
        "responses": {
          "200": {
            "description": "Check that the API is up",
            "x-description-es": "Comprueba que la API está disponible",
            "headers": {
              "Totem-Request-Id": {
                "$ref": "#/components/headers/TotemRequestId"
              },
              "Totem-Release": {
                "$ref": "#/components/headers/TotemRelease"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "example": {
                  "object": "health",
                  "status": "ok"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "x-totem-errors": [
          "invalid_request",
          "secret_key_in_browser",
          "internal_error",
          "service_unavailable"
        ],
        "x-totem-scopes": [],
        "x-totem-rate-class": "none",
        "x-totem-tenant-binding": "none",
        "x-totem-stability": "beta"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "secretKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "tsk_live_…",
        "description": "A secret key (`tsk_live_…`) from Settings → Developers, sent as `Authorization: Bearer <key>`. Use it only from your server: a request that carries it from a browser is refused.",
        "x-description-es": "Una clave secreta (`tsk_live_…`) de Ajustes → Desarrolladores, enviada como `Authorization: Bearer <clave>`. Úsala solo desde tu servidor: una petición que la lleve desde un navegador se rechaza."
      }
    },
    "parameters": {
      "TotemTeam": {
        "name": "Totem-Team",
        "in": "header",
        "required": false,
        "description": "The team to read, as a `team_…` id. Omit it when the key reads one team; it is required when the key reads several (`400 team_required`). When you send it, it must name a team the key reads: a malformed id gets `400 invalid_request`, and a team outside the key gets `404 team_not_accessible`, as does a request without it once the key reads no team at all.",
        "x-description-es": "El equipo que se lee, como identificador `team_…`. Omítelo si la clave lee un solo equipo; es obligatorio si lee varios (`400 team_required`). Si lo envías, debe indicar un equipo que la clave lee: un identificador mal formado recibe `400 invalid_request`, y un equipo fuera de la clave, `404 team_not_accessible`, igual que una petición sin la cabecera cuando la clave ya no lee ningún equipo.",
        "schema": {
          "type": "string",
          "pattern": "^team_[0-9A-Za-z]+$"
        },
        "x-totem-team-header": "multi_team_key"
      }
    },
    "headers": {
      "TotemRequestId": {
        "description": "Unique id of this request. Quote it when you contact support.",
        "x-description-es": "Identificador único de esta petición. Indícalo cuando escribas a soporte.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Whole seconds to wait before retrying. Sent with every `429` problem response (`rate_limited`, `quota_exceeded`); for `quota_exceeded` it counts down to 00:00 UTC. A `429` from the firewall in front of the API has no problem body and no `Retry-After`: back off exponentially.",
        "x-description-es": "Segundos enteros que debes esperar antes de reintentar. Llega con cada respuesta de error `429` (`rate_limited`, `quota_exceeded`); con `quota_exceeded`, cuenta hasta las 00:00 UTC. Un `429` del cortafuegos que protege la API no trae cuerpo de error ni `Retry-After`: reintenta con una espera exponencial.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "TotemRelease": {
        "description": "The API release that answered. Quote it when you report an incident.",
        "x-description-es": "La versión de la API que respondió. Indícala cuando informes de una incidencia.",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Problem": {
        "description": "An error, as `application/problem+json` (RFC 9457). Branch on `code`; each operation's `x-totem-errors` lists the codes it can return.",
        "x-description-es": "Un error, como `application/problem+json` (RFC 9457). Decide según `code`; el `x-totem-errors` de cada operación enumera los códigos que puede devolver.",
        "headers": {
          "Totem-Request-Id": {
            "$ref": "#/components/headers/TotemRequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    },
    "schemas": {
      "Activity": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^act_[0-9A-Za-z]+$",
                "description": "Public id of the record.",
                "x-description-es": "Identificador público del registro."
              },
              "object": {
                "type": "string",
                "const": "activity",
                "description": "Always `activity`.",
                "x-description-es": "Siempre `activity`."
              },
              "livemode": {
                "type": "boolean",
                "description": "`true` for real data; `false` in example data.",
                "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
              },
              "type": {
                "type": "string",
                "enum": [
                  "status_changed",
                  "archived",
                  "unarchived",
                  "revived"
                ],
                "description": "`status_changed`, `archived`, `unarchived`, or `revived` (the contact came back on their own and reopened an archived lead).",
                "x-description-es": "`status_changed`, `archived`, `unarchived` o `revived` (el contacto volvió por su cuenta y reabrió un lead archivado)."
              },
              "team": {
                "type": "string",
                "pattern": "^team_[0-9A-Za-z]+$",
                "description": "The team the lead belongs to.",
                "x-description-es": "El equipo al que pertenece el lead."
              },
              "lead": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^lead_[0-9A-Za-z]+$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The lead that moved. Null only while Totem has not yet assigned the lead its id.",
                "x-description-es": "El lead que cambió. Null solo mientras Totem aún no ha asignado su id al lead."
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the change was saved.",
                "x-description-es": "Cuándo se guardó el cambio."
              },
              "actor_kind": {
                "type": "string",
                "enum": [
                  "human",
                  "ai",
                  "system",
                  "api",
                  "unknown"
                ],
                "description": "Who made the change: a person, the AI, Totem automation, an API caller, or unknown. Totem knows who made a change only when the same save wrote the lead's status, so a stage or assignee change made on its own reads unknown.",
                "x-description-es": "Quién hizo el cambio: una persona, la IA, la automatización de Totem, una llamada a la API o desconocido. Totem sabe quién hizo un cambio solo cuando el mismo guardado escribió el estado del lead, así que un cambio de etapa o de responsables hecho por sí solo es desconocido."
              },
              "stage_snapshot": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "stage": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^stg_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The stage.",
                        "x-description-es": "La etapa."
                      },
                      "board": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^brd_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Its board, or null for a legacy stage without one.",
                        "x-description-es": "Su tablero, o null en una etapa antigua sin tablero."
                      },
                      "name": {
                        "description": "The stage name when the change was recorded, or null when the stage was already deleted.",
                        "x-description-es": "El nombre de la etapa cuando se registró el cambio, o null si la etapa ya estaba borrada.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "stage",
                      "board",
                      "name"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The stage the lead was in after the change (for \"clear pipeline data\", the stage it left), or null.",
                "x-description-es": "La etapa en la que quedó el lead tras el cambio (al borrar los datos del embudo, la que dejó), o null."
              },
              "value_snapshot": {
                "description": "The estimated value at that moment, in major units, or null.",
                "x-description-es": "El valor estimado en ese momento, en unidades principales, o null.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "from": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "new",
                      "contacted",
                      "qualified",
                      "negotiating",
                      "converted",
                      "lost",
                      "archived",
                      "unreachable"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The status before, or null when there was none.",
                "x-description-es": "El estado anterior, o null si no había."
              },
              "to": {
                "type": "string",
                "enum": [
                  "new",
                  "contacted",
                  "qualified",
                  "negotiating",
                  "converted",
                  "lost",
                  "archived",
                  "unreachable"
                ],
                "description": "The status after.",
                "x-description-es": "El estado posterior."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
                "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
                "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
              }
            },
            "required": [
              "id",
              "object",
              "livemode",
              "type",
              "team",
              "lead",
              "occurred_at",
              "actor_kind",
              "stage_snapshot",
              "value_snapshot",
              "from",
              "to",
              "version",
              "updated_at"
            ],
            "description": "A status transition.",
            "x-description-es": "Una transición de estado."
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^act_[0-9A-Za-z]+$",
                "description": "Public id of the record.",
                "x-description-es": "Identificador público del registro."
              },
              "object": {
                "type": "string",
                "const": "activity",
                "description": "Always `activity`.",
                "x-description-es": "Siempre `activity`."
              },
              "livemode": {
                "type": "boolean",
                "description": "`true` for real data; `false` in example data.",
                "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
              },
              "type": {
                "type": "string",
                "const": "stage_changed",
                "description": "Always `stage_changed`.",
                "x-description-es": "Siempre `stage_changed`."
              },
              "team": {
                "type": "string",
                "pattern": "^team_[0-9A-Za-z]+$",
                "description": "The team the lead belongs to.",
                "x-description-es": "El equipo al que pertenece el lead."
              },
              "lead": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^lead_[0-9A-Za-z]+$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The lead that moved. Null only while Totem has not yet assigned the lead its id.",
                "x-description-es": "El lead que cambió. Null solo mientras Totem aún no ha asignado su id al lead."
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the change was saved.",
                "x-description-es": "Cuándo se guardó el cambio."
              },
              "actor_kind": {
                "type": "string",
                "enum": [
                  "human",
                  "ai",
                  "system",
                  "api",
                  "unknown"
                ],
                "description": "Who made the change: a person, the AI, Totem automation, an API caller, or unknown. Totem knows who made a change only when the same save wrote the lead's status, so a stage or assignee change made on its own reads unknown.",
                "x-description-es": "Quién hizo el cambio: una persona, la IA, la automatización de Totem, una llamada a la API o desconocido. Totem sabe quién hizo un cambio solo cuando el mismo guardado escribió el estado del lead, así que un cambio de etapa o de responsables hecho por sí solo es desconocido."
              },
              "stage_snapshot": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "stage": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^stg_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The stage.",
                        "x-description-es": "La etapa."
                      },
                      "board": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^brd_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Its board, or null for a legacy stage without one.",
                        "x-description-es": "Su tablero, o null en una etapa antigua sin tablero."
                      },
                      "name": {
                        "description": "The stage name when the change was recorded, or null when the stage was already deleted.",
                        "x-description-es": "El nombre de la etapa cuando se registró el cambio, o null si la etapa ya estaba borrada.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "stage",
                      "board",
                      "name"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The stage the lead was in after the change (for \"clear pipeline data\", the stage it left), or null.",
                "x-description-es": "La etapa en la que quedó el lead tras el cambio (al borrar los datos del embudo, la que dejó), o null."
              },
              "value_snapshot": {
                "description": "The estimated value at that moment, in major units, or null.",
                "x-description-es": "El valor estimado en ese momento, en unidades principales, o null.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "from": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "stage": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^stg_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The stage.",
                        "x-description-es": "La etapa."
                      },
                      "board": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^brd_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The board, or null for a legacy stage without one.",
                        "x-description-es": "El tablero, o null en una etapa antigua sin tablero."
                      }
                    },
                    "required": [
                      "stage",
                      "board"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The stage and board before, or null when the lead had neither.",
                "x-description-es": "La etapa y el tablero anteriores, o null si el lead no tenía ninguno."
              },
              "to": {
                "type": "object",
                "properties": {
                  "stage": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^stg_[0-9A-Za-z]+$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The stage.",
                    "x-description-es": "La etapa."
                  },
                  "board": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^brd_[0-9A-Za-z]+$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The board, or null for a legacy stage without one.",
                    "x-description-es": "El tablero, o null en una etapa antigua sin tablero."
                  }
                },
                "required": [
                  "stage",
                  "board"
                ],
                "description": "The stage and board after.",
                "x-description-es": "La etapa y el tablero posteriores."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
                "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
                "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
              }
            },
            "required": [
              "id",
              "object",
              "livemode",
              "type",
              "team",
              "lead",
              "occurred_at",
              "actor_kind",
              "stage_snapshot",
              "value_snapshot",
              "from",
              "to",
              "version",
              "updated_at"
            ],
            "description": "A stage move.",
            "x-description-es": "Un cambio de etapa."
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^act_[0-9A-Za-z]+$",
                "description": "Public id of the record.",
                "x-description-es": "Identificador público del registro."
              },
              "object": {
                "type": "string",
                "const": "activity",
                "description": "Always `activity`.",
                "x-description-es": "Siempre `activity`."
              },
              "livemode": {
                "type": "boolean",
                "description": "`true` for real data; `false` in example data.",
                "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
              },
              "type": {
                "type": "string",
                "const": "assignees_changed",
                "description": "Always `assignees_changed`.",
                "x-description-es": "Siempre `assignees_changed`."
              },
              "team": {
                "type": "string",
                "pattern": "^team_[0-9A-Za-z]+$",
                "description": "The team the lead belongs to.",
                "x-description-es": "El equipo al que pertenece el lead."
              },
              "lead": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^lead_[0-9A-Za-z]+$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The lead that moved. Null only while Totem has not yet assigned the lead its id.",
                "x-description-es": "El lead que cambió. Null solo mientras Totem aún no ha asignado su id al lead."
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the change was saved.",
                "x-description-es": "Cuándo se guardó el cambio."
              },
              "actor_kind": {
                "type": "string",
                "enum": [
                  "human",
                  "ai",
                  "system",
                  "api",
                  "unknown"
                ],
                "description": "Who made the change: a person, the AI, Totem automation, an API caller, or unknown. Totem knows who made a change only when the same save wrote the lead's status, so a stage or assignee change made on its own reads unknown.",
                "x-description-es": "Quién hizo el cambio: una persona, la IA, la automatización de Totem, una llamada a la API o desconocido. Totem sabe quién hizo un cambio solo cuando el mismo guardado escribió el estado del lead, así que un cambio de etapa o de responsables hecho por sí solo es desconocido."
              },
              "stage_snapshot": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "stage": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^stg_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The stage.",
                        "x-description-es": "La etapa."
                      },
                      "board": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^brd_[0-9A-Za-z]+$"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Its board, or null for a legacy stage without one.",
                        "x-description-es": "Su tablero, o null en una etapa antigua sin tablero."
                      },
                      "name": {
                        "description": "The stage name when the change was recorded, or null when the stage was already deleted.",
                        "x-description-es": "El nombre de la etapa cuando se registró el cambio, o null si la etapa ya estaba borrada.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "stage",
                      "board",
                      "name"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The stage the lead was in after the change (for \"clear pipeline data\", the stage it left), or null.",
                "x-description-es": "La etapa en la que quedó el lead tras el cambio (al borrar los datos del embudo, la que dejó), o null."
              },
              "value_snapshot": {
                "description": "The estimated value at that moment, in major units, or null.",
                "x-description-es": "El valor estimado en ese momento, en unidades principales, o null.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "from": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^mem_[0-9A-Za-z]+$",
                  "description": "A team member.",
                  "x-description-es": "Un miembro del equipo."
                },
                "description": "The assigned members before, sorted.",
                "x-description-es": "Los miembros asignados antes, ordenados."
              },
              "to": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^mem_[0-9A-Za-z]+$",
                  "description": "A team member.",
                  "x-description-es": "Un miembro del equipo."
                },
                "description": "The assigned members after, sorted.",
                "x-description-es": "Los miembros asignados después, ordenados."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
                "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
                "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
              }
            },
            "required": [
              "id",
              "object",
              "livemode",
              "type",
              "team",
              "lead",
              "occurred_at",
              "actor_kind",
              "stage_snapshot",
              "value_snapshot",
              "from",
              "to",
              "version",
              "updated_at"
            ],
            "description": "A change of assigned members.",
            "x-description-es": "Un cambio de miembros asignados."
          }
        ],
        "description": "One stage, status or assignee transition of a lead. Activities never change once written.",
        "x-description-es": "Una transición de etapa, estado o responsables de un lead. Una actividad no cambia una vez escrita.",
        "examples": [
          {
            "id": "act_aBgzeetVKDEjpAAkXfEFF53ZGd2ZMmGhUDKgagqLbh6c7R1GqOl0xsFw7pyRhD3SqqYWGMdb371xxj",
            "object": "activity",
            "livemode": false,
            "type": "stage_changed",
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "occurred_at": "2026-09-28T10:20:00.000Z",
            "actor_kind": "ai",
            "stage_snapshot": {
              "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
              "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
              "name": "Contacted"
            },
            "value_snapshot": 1200,
            "from": {
              "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
              "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
            },
            "to": {
              "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
              "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
            },
            "version": 1,
            "updated_at": "2026-09-28T10:20:01.500Z"
          }
        ]
      },
      "ActivityList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Activity"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "A page of Activity objects, in a stable order that carries no meaning.",
        "x-description-es": "Una página de objetos Activity, en un orden estable sin significado.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "act_aBgzeetVKDEjpAAkXfEFF53ZGd2ZMmGhUDKgagqLbh6c7R1GqOl0xsFw7pyRhD3SqqYWGMdb371xxj",
                "object": "activity",
                "livemode": false,
                "type": "stage_changed",
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                "occurred_at": "2026-09-28T10:20:00.000Z",
                "actor_kind": "ai",
                "stage_snapshot": {
                  "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                  "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                  "name": "Contacted"
                },
                "value_snapshot": 1200,
                "from": {
                  "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
                  "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
                },
                "to": {
                  "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                  "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
                },
                "version": 1,
                "updated_at": "2026-09-28T10:20:01.500Z"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      },
      "Board": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^brd_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "board",
            "description": "Always `board`.",
            "x-description-es": "Siempre `board`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team this record belongs to.",
            "x-description-es": "El equipo al que pertenece este registro."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "The board's name, or null when none is stored.",
            "x-description-es": "El nombre del tablero, o null si no hay ninguno guardado."
          },
          "is_default": {
            "type": "boolean",
            "description": "True for the team's default board, where new leads land unless routed elsewhere.",
            "x-description-es": "Verdadero en el tablero por defecto del equipo, donde llegan los leads nuevos salvo que se enruten a otro."
          },
          "is_archived": {
            "type": "boolean",
            "description": "True when the board is archived (hidden from the board selector). Its leads still export.",
            "x-description-es": "Verdadero si el tablero está archivado (oculto en el selector de tableros). Sus leads se siguen exportando."
          },
          "appointment_booked_stage": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^stg_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The stage of this board a lead moves to when its first appointment is confirmed, or null when none is set or it names no stage of this board.",
            "x-description-es": "La etapa de este tablero a la que pasa un lead cuando se confirma su primera cita, o null si no hay ninguna o no es una etapa de este tablero."
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "stage",
                  "description": "Always `stage`.",
                  "x-description-es": "Siempre `stage`."
                },
                "id": {
                  "type": "string",
                  "pattern": "^stg_[0-9A-Za-z]+$",
                  "description": "Public id of the stage; a lead's `stage` names it.",
                  "x-description-es": "Id público de la etapa; el `stage` de un lead la nombra."
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The stage's name, or null when none is stored.",
                  "x-description-es": "El nombre de la etapa, o null si no hay ninguno guardado."
                },
                "position": {
                  "description": "The stage's position on its board, left to right; null when the stored position is not a number. Stages are listed in this order.",
                  "x-description-es": "La posición de la etapa en su tablero, de izquierda a derecha; null si la posición guardada no es un número. Las etapas se listan en este orden.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "is_default": {
                  "type": "boolean",
                  "description": "True for the stage new leads of this board enter.",
                  "x-description-es": "Verdadero en la etapa a la que entran los leads nuevos de este tablero."
                },
                "is_final": {
                  "type": "boolean",
                  "description": "True for a final stage: moving a lead here marks it converted.",
                  "x-description-es": "Verdadero en una etapa final: mover un lead aquí lo marca como convertido."
                },
                "is_archive": {
                  "type": "boolean",
                  "description": "True for an archive stage, whose leads are hidden from the main board view.",
                  "x-description-es": "Verdadero en una etapa de archivo, cuyos leads no se muestran en la vista principal del tablero."
                },
                "mode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "standard",
                        "supervised",
                        "automated"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Who moves leads: `standard` (people only), `supervised` (AI may move leads in, people move them out) or `automated` (AI runs outreach and moves leads in and out); null for a value this version does not know.",
                  "x-description-es": "Quién mueve los leads: `standard` (solo personas), `supervised` (la IA puede meter leads, las personas los sacan) o `automated` (la IA hace el contacto y mete y saca leads); null si es un valor que esta versión no conoce."
                }
              },
              "required": [
                "object",
                "id",
                "name",
                "position",
                "is_default",
                "is_final",
                "is_archive",
                "mode"
              ],
              "description": "A stage of the board.",
              "x-description-es": "Una etapa del tablero."
            },
            "description": "The board's stages, ordered by position, then by id. A stage with no position stored at all is left out, although a lead can still name it.",
            "x-description-es": "Las etapas del tablero, ordenadas por posición y después por id. Una etapa sin ninguna posición guardada no aparece, aunque un lead puede seguir indicándola."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "name",
          "is_default",
          "is_archived",
          "appointment_booked_stage",
          "stages",
          "version",
          "updated_at"
        ],
        "description": "A board with its stages in pipeline order.",
        "x-description-es": "Un tablero con sus etapas en el orden del embudo.",
        "examples": [
          {
            "id": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
            "object": "board",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "name": "New patients",
            "is_default": true,
            "is_archived": false,
            "appointment_booked_stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
            "stages": [
              {
                "object": "stage",
                "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
                "name": "New",
                "position": 0,
                "is_default": true,
                "is_final": false,
                "is_archive": false,
                "mode": "automated"
              },
              {
                "object": "stage",
                "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                "name": "Contacted",
                "position": 1,
                "is_default": false,
                "is_final": false,
                "is_archive": false,
                "mode": "supervised"
              },
              {
                "object": "stage",
                "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
                "name": "Visit booked",
                "position": 2,
                "is_default": false,
                "is_final": true,
                "is_archive": false,
                "mode": "standard"
              }
            ],
            "version": 4,
            "updated_at": "2026-09-02T16:40:00.000Z"
          }
        ]
      },
      "BoardList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Board"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "A page of Board objects, in a stable order that carries no meaning.",
        "x-description-es": "Una página de objetos Board, en un orden estable sin significado.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                "object": "board",
                "livemode": false,
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "name": "New patients",
                "is_default": true,
                "is_archived": false,
                "appointment_booked_stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
                "stages": [
                  {
                    "object": "stage",
                    "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
                    "name": "New",
                    "position": 0,
                    "is_default": true,
                    "is_final": false,
                    "is_archive": false,
                    "mode": "automated"
                  },
                  {
                    "object": "stage",
                    "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                    "name": "Contacted",
                    "position": 1,
                    "is_default": false,
                    "is_final": false,
                    "is_archive": false,
                    "mode": "supervised"
                  },
                  {
                    "object": "stage",
                    "id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
                    "name": "Visit booked",
                    "position": 2,
                    "is_default": false,
                    "is_final": true,
                    "is_archive": false,
                    "mode": "standard"
                  }
                ],
                "version": 4,
                "updated_at": "2026-09-02T16:40:00.000Z"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^bkg_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "booking",
            "description": "Always `booking`.",
            "x-description-es": "Siempre `booking`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team this record belongs to.",
            "x-description-es": "El equipo al que pertenece este registro."
          },
          "lead": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The lead this booking belongs to, or null for a booking without a lead or when the lead no longer exists. Names and contact details appear only on the lead.",
            "x-description-es": "El lead al que pertenece la cita, o null si la cita no tiene lead o el lead ya no existe. El nombre y los datos de contacto solo aparecen en el lead."
          },
          "kind": {
            "type": "string",
            "enum": [
              "service_booking",
              "calendar_event",
              "external_import"
            ],
            "description": "`service_booking` (booked for a bookable service, by the AI, a customer or a person), `calendar_event` (an event from the connected calendar) or `external_import` (synced from an external booking system or read from a portal email). A booking from an origin this version does not know is reported as `calendar_event`.",
            "x-description-es": "`service_booking` (una cita de un servicio reservable, creada por la IA, un cliente o una persona), `calendar_event` (un evento del calendario conectado) o `external_import` (sincronizada desde un sistema de citas externo o leída de un correo electrónico de un portal). Una cita de un origen que esta versión no conoce aparece como `calendar_event`."
          },
          "service": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^svc_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The booked service (see `/booking_services`) on a `service_booking`; null otherwise.",
            "x-description-es": "El servicio de la cita (ver `/booking_services`) en una `service_booking`; null en otro caso."
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "scheduled",
                  "rescheduled",
                  "cancelled",
                  "postponed",
                  "attended",
                  "no_show",
                  "team_no_show"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`scheduled`, `rescheduled`, `cancelled`, `postponed`, `attended`, `no_show` or `team_no_show` (attendance is recorded only by people); null for a value this version does not know. `rescheduled` means the booking was moved in place and its times are the new ones; a booking the AI replaced with a new one reads `cancelled`, with `rescheduled_to` set.",
            "x-description-es": "`scheduled`, `rescheduled`, `cancelled`, `postponed`, `attended`, `no_show` o `team_no_show` (la asistencia solo la registran personas); null si es un valor que esta versión no conoce. `rescheduled` significa que la cita se movió sin cambiar de registro y sus horas son las nuevas; una cita que la IA sustituyó por otra queda en `cancelled`, con `rescheduled_to`."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the booking starts (UTC).",
            "x-description-es": "Cuándo empieza la cita (UTC)."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the booking ends (UTC).",
            "x-description-es": "Cuándo termina la cita (UTC)."
          },
          "meeting_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "online",
                  "in_person",
                  "phone"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`online`, `in_person` or `phone`; null when not stored.",
            "x-description-es": "`online`, `in_person` o `phone`; null si no está guardado."
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ai",
                  "customer",
                  "operator"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Who booked it: `ai`, `customer` or `operator`; null when not recorded.",
            "x-description-es": "Quién creó la cita: `ai`, `customer` u `operator`; null si no está registrado."
          },
          "rescheduled_from": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^bkg_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The booking this one replaced in a reschedule, or null. For a few seconds the replaced booking can still read `scheduled`; bookings rescheduled before Totem started recording this link may not have it.",
            "x-description-es": "La cita a la que esta sustituyó al reprogramar, o null. Durante unos segundos la cita sustituida puede seguir en `scheduled`; las citas reprogramadas antes de que Totem empezara a registrar este enlace pueden no tenerlo."
          },
          "rescheduled_to": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^bkg_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The booking that replaced this one in a reschedule, or null. When it is set, this booking reads `cancelled`.",
            "x-description-es": "La cita que sustituyó a esta al reprogramar, o null. Cuando está indicada, esta cita queda en `cancelled`."
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the booking was recorded in Totem (UTC).",
            "x-description-es": "Cuándo se registró la cita en Totem (UTC)."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "lead",
          "kind",
          "service",
          "status",
          "starts_at",
          "ends_at",
          "meeting_type",
          "source",
          "rescheduled_from",
          "rescheduled_to",
          "created_at",
          "version",
          "updated_at"
        ],
        "description": "A booking and its `kind`: an appointment for a bookable service, an event from the connected calendar, or a booking imported from another system.",
        "x-description-es": "Una cita y su tipo (`kind`): para un servicio reservable, un evento del calendario conectado o una cita importada de otro sistema.",
        "examples": [
          {
            "id": "bkg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3ttMKHRR9ADk3N7Cr3NSuY0",
            "object": "booking",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "kind": "service_booking",
            "service": "svc_h42kgwwJGPzsm2Zoy1A1RBv1KIrX5",
            "status": "scheduled",
            "starts_at": "2026-10-06T15:00:00.000Z",
            "ends_at": "2026-10-06T15:30:00.000Z",
            "meeting_type": "in_person",
            "source": "ai",
            "rescheduled_from": null,
            "rescheduled_to": null,
            "created_at": "2026-10-01T09:01:00.000Z",
            "version": 1,
            "updated_at": "2026-10-01T09:01:02.000Z"
          }
        ]
      },
      "BookingList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "A page of Booking objects, in a stable order that carries no meaning.",
        "x-description-es": "Una página de objetos Booking, en un orden estable sin significado.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "bkg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3ttMKHRR9ADk3N7Cr3NSuY0",
                "object": "booking",
                "livemode": false,
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                "kind": "service_booking",
                "service": "svc_h42kgwwJGPzsm2Zoy1A1RBv1KIrX5",
                "status": "scheduled",
                "starts_at": "2026-10-06T15:00:00.000Z",
                "ends_at": "2026-10-06T15:30:00.000Z",
                "meeting_type": "in_person",
                "source": "ai",
                "rescheduled_from": null,
                "rescheduled_to": null,
                "created_at": "2026-10-01T09:01:00.000Z",
                "version": 1,
                "updated_at": "2026-10-01T09:01:02.000Z"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      },
      "BookingService": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^svc_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "booking_service",
            "description": "Always `booking_service`.",
            "x-description-es": "Siempre `booking_service`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team this record belongs to.",
            "x-description-es": "El equipo al que pertenece este registro."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "The service's name, or null when none is stored.",
            "x-description-es": "El nombre del servicio, o null si no hay ninguno guardado."
          },
          "meeting_type": {
            "type": "string",
            "enum": [
              "online",
              "in_person",
              "phone"
            ],
            "description": "How the service happens: `online` (the default when none is stored), `in_person` or `phone`.",
            "x-description-es": "Cómo se presta el servicio: `online` (el valor por defecto si no hay ninguno guardado), `in_person` o `phone`."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "name",
          "meeting_type"
        ],
        "description": "A service customers can book, with its meeting type.",
        "x-description-es": "Un servicio que los clientes pueden reservar, con su tipo de reunión.",
        "examples": [
          {
            "id": "svc_h42kgwwJGPzsm2Zoy1A1RBv1KIrX5",
            "object": "booking_service",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "name": "First visit",
            "meeting_type": "in_person"
          }
        ]
      },
      "BookingServiceList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingService"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "Every BookingService object, in one response: this list is never paged.",
        "x-description-es": "Todos los objetos BookingService, en una sola respuesta: esta lista nunca se pagina.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "svc_h42kgwwJGPzsm2Zoy1A1RBv1KIrX5",
                "object": "booking_service",
                "livemode": false,
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "name": "First visit",
                "meeting_type": "in_person"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      },
      "Call": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^call_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "call",
            "description": "Always `call`.",
            "x-description-es": "Siempre `call`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team this record belongs to.",
            "x-description-es": "El equipo al que pertenece este registro."
          },
          "lead": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The lead this call is linked to, or null when it is unlinked or the lead no longer exists. Identity (name, phone) travels on the lead only.",
            "x-description-es": "El lead al que está vinculada la llamada, o null si no está vinculada o el lead ya no existe. El nombre y el teléfono solo aparecen en el lead."
          },
          "direction": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`inbound` or `outbound`; null when not stored.",
            "x-description-es": "`inbound` o `outbound`; null si no está guardada."
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the call started (UTC), or when it was recorded if the provider gave no start time.",
            "x-description-es": "Cuándo empezó la llamada (UTC), o cuándo se registró si el proveedor no dio hora de inicio."
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "description": "Whole seconds of the call (rounded down); null while the call is still live, or when not stored.",
            "x-description-es": "Segundos enteros de la llamada (redondeados hacia abajo); null mientras la llamada sigue en curso, o si no están guardados."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "answered_human",
              "answered_ai",
              "voicemail",
              "no_answer",
              "busy",
              "failed",
              "unknown"
            ],
            "description": "How the call ended: `answered_human`, `answered_ai`, `voicemail`, `no_answer`, `busy`, `failed`, or `unknown` (still live, or no evidence of who answered). Read it with `outcome_basis`.",
            "x-description-es": "Cómo terminó la llamada: `answered_human`, `answered_ai`, `voicemail`, `no_answer`, `busy`, `failed` o `unknown` (aún en curso, o sin pruebas de quién contestó). Léelo junto con `outcome_basis`."
          },
          "outcome_basis": {
            "type": "string",
            "enum": [
              "inbound_verdict",
              "ai_analysis",
              "duration_floor",
              "carrier_answer_only",
              "browser_session",
              "none"
            ],
            "description": "The evidence behind `outcome`: `inbound_verdict` (Totem's classification of an inbound call on its phone lines), `ai_analysis` (Totem's classification of the status, end reason and length that Retell reports), `duration_floor` (a call on a connected Zadarma PBX, where at least 10 seconds counts as answered), `carrier_answer_only` (only the carrier's answer signal, which never counts as answered, so a connected call reads `unknown`: every outbound call on Totem's phone lines, made by the AI or by a person, and an inbound one Totem has not classified), `browser_session` (a web voice session with the assistant), or `none` (no evidence, as for a call that is still live).",
            "x-description-es": "La prueba detrás de `outcome`: `inbound_verdict` (la clasificación de Totem de una llamada entrante en sus líneas de teléfono), `ai_analysis` (la clasificación que hace Totem del estado, el motivo de fin y la duración que informa Retell), `duration_floor` (una llamada en una centralita Zadarma conectada, donde al menos 10 segundos cuentan como contestada), `carrier_answer_only` (solo la señal de respuesta del operador, que nunca cuenta como contestada, así que una llamada conectada es `unknown`: todas las salientes en las líneas de Totem, las haga la IA o una persona, y una entrante que Totem no ha clasificado), `browser_session` (una sesión de voz web con el asistente) o `none` (ninguna prueba, como en una llamada que sigue en curso)."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "lead",
          "direction",
          "started_at",
          "duration_seconds",
          "outcome",
          "outcome_basis",
          "version",
          "updated_at"
        ],
        "description": "A call: its direction, timing and a normalized outcome. No recording or transcript.",
        "x-description-es": "Una llamada: su dirección, su horario y un resultado normalizado. Sin grabación ni transcripción.",
        "examples": [
          {
            "id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
            "object": "call",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "direction": "inbound",
            "started_at": "2026-09-28T10:17:00.000Z",
            "duration_seconds": 184,
            "outcome": "answered_ai",
            "outcome_basis": "inbound_verdict",
            "version": 2,
            "updated_at": "2026-09-28T10:21:04.010Z"
          }
        ]
      },
      "CallList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Call"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "A page of Call objects, in a stable order that carries no meaning.",
        "x-description-es": "Una página de objetos Call, en un orden estable sin significado.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
                "object": "call",
                "livemode": false,
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                "direction": "inbound",
                "started_at": "2026-09-28T10:17:00.000Z",
                "duration_seconds": 184,
                "outcome": "answered_ai",
                "outcome_basis": "inbound_verdict",
                "version": 2,
                "updated_at": "2026-09-28T10:21:04.010Z"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      },
      "Conversation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^conv_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "conversation",
            "description": "Always `conversation`.",
            "x-description-es": "Siempre `conversation`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team this record belongs to.",
            "x-description-es": "El equipo al que pertenece este registro."
          },
          "lead": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The lead this conversation is linked to, or null when it is unlinked or the lead no longer exists. Identity (name, phone, handle) travels on the lead only.",
            "x-description-es": "El lead al que está vinculada la conversación, o null si no está vinculada o el lead ya no existe. El nombre, el teléfono y el usuario solo aparecen en el lead."
          },
          "channel_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "sms",
                  "whatsapp",
                  "facebook",
                  "instagram",
                  "tiktok",
                  "chatbot",
                  "email"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The channel: `whatsapp`, `email`, `chatbot` (the web chat), `facebook`, `instagram`, `sms` or `tiktok`; null for a value this version does not know. A lead can have several conversations on the same channel and business account, one for each contact address (phone number, email address or handle) it has used, so key your copy on `id`.",
            "x-description-es": "El canal: `whatsapp`, `email`, `chatbot` (el chat web), `facebook`, `instagram`, `sms` o `tiktok`; null si es un valor que esta versión no conoce. Un lead puede tener varias conversaciones en el mismo canal y cuenta de empresa, una por cada dirección de contacto (teléfono, correo electrónico o usuario) que haya usado, así que usa el `id` como clave de tu copia."
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`active` or `archived` in the team's inbox; null for a value this version does not know.",
            "x-description-es": "`active` o `archived` en la bandeja del equipo; null si es un valor que esta versión no conoce."
          },
          "assignee": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^mem_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The team member assigned to the conversation (see `/members`), or null.",
            "x-description-es": "El miembro del equipo asignado a la conversación (ver `/members`), o null."
          },
          "reply_mode": {
            "type": "string",
            "enum": [
              "ai",
              "human"
            ],
            "description": "`human` while a person has taken the conversation over, including a WhatsApp chat answered from the WhatsApp Business app; `ai` otherwise. `ai` means no takeover is active, not that an assistant is set up or answering on this channel. A timed takeover returns to `ai` when it expires, and the record's version changes then.",
            "x-description-es": "`human` mientras una persona ha tomado la conversación, incluido un chat de WhatsApp que se atiende desde la app WhatsApp Business; `ai` en otro caso. `ai` significa que no hay una toma activa, no que haya un asistente configurado o respondiendo en este canal. Una toma temporal vuelve a `ai` cuando caduca, y la versión del registro cambia entonces."
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the conversation was created (UTC).",
            "x-description-es": "Cuándo se creó la conversación (UTC)."
          },
          "last_inbound_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest customer message (UTC). Not counted: erased messages, imported WhatsApp history and web-chat visitor turns, so a `chatbot` conversation reads null. Instagram shares cannot be told apart and count.",
            "x-description-es": "El último mensaje del cliente (UTC). No cuentan: mensajes borrados, historial de WhatsApp importado ni los turnos del visitante del chat web, así que una conversación `chatbot` da null. Los contenidos compartidos de Instagram no se distinguen y sí cuentan."
          },
          "last_outbound_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest message sent to the customer that did not fail (UTC), whoever sent it. Imported WhatsApp history counts.",
            "x-description-es": "El último mensaje enviado al cliente que no falló (UTC), lo enviara quien lo enviara. El historial de WhatsApp importado sí cuenta."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "lead",
          "channel_type",
          "status",
          "assignee",
          "reply_mode",
          "created_at",
          "last_inbound_at",
          "last_outbound_at",
          "version",
          "updated_at"
        ],
        "description": "A conversation on one channel: its status, assignee and the times of the latest messages, never their content.",
        "x-description-es": "Una conversación en un canal: su estado, su responsable y la hora de los últimos mensajes, nunca su contenido.",
        "examples": [
          {
            "id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ",
            "object": "conversation",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "channel_type": "whatsapp",
            "status": "active",
            "assignee": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
            "reply_mode": "ai",
            "created_at": "2026-09-28T10:16:00.000Z",
            "last_inbound_at": "2026-10-01T08:58:00.000Z",
            "last_outbound_at": "2026-10-01T08:59:30.000Z",
            "version": 12,
            "updated_at": "2026-10-01T08:59:31.040Z"
          }
        ]
      },
      "ConversationList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Conversation"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "A page of Conversation objects, in a stable order that carries no meaning.",
        "x-description-es": "Una página de objetos Conversation, en un orden estable sin significado.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ",
                "object": "conversation",
                "livemode": false,
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                "channel_type": "whatsapp",
                "status": "active",
                "assignee": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
                "reply_mode": "ai",
                "created_at": "2026-09-28T10:16:00.000Z",
                "last_inbound_at": "2026-10-01T08:58:00.000Z",
                "last_outbound_at": "2026-10-01T08:59:30.000Z",
                "version": 12,
                "updated_at": "2026-10-01T08:59:31.040Z"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      },
      "FeedItem": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "lead",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/Lead"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "lead_attribution",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/LeadAttribution"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "lead_response",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/LeadResponse"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "activity",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^act_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/Activity"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "call",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^call_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/Call"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "conversation",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^conv_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/Conversation"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "booking",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^bkg_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/Booking"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "board",
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^brd_[0-9A-Za-z]+$",
                "description": "Public id of the record; the facets `lead_attribution` and `lead_response` use their lead's id.",
                "x-description-es": "Identificador público del registro; las facetas `lead_attribution` y `lead_response` usan el de su lead."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "object": {
                "description": "The record as it is now.",
                "x-description-es": "El registro tal como está ahora.",
                "$ref": "#/components/schemas/Board"
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "object"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "lead",
                  "lead_attribution",
                  "lead_response",
                  "activity",
                  "call",
                  "conversation",
                  "booking",
                  "board"
                ],
                "description": "The kind of the record, such as `lead` or `call`.",
                "x-description-es": "El tipo del registro, como `lead` o `call`."
              },
              "id": {
                "type": "string",
                "pattern": "^(lead|act|call|conv|bkg|brd)_[0-9A-Za-z]+$",
                "description": "Public id of the removed record.",
                "x-description-es": "Identificador público del registro eliminado."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The record's version. Apply the item only when it is greater than the version you hold.",
                "x-description-es": "La versión del registro. Aplica el elemento solo si es mayor que la versión que guardas."
              },
              "removed": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "erased",
                      "deleted"
                    ],
                    "description": "`erased` after an erasure, which is also what deleting a lead, call or conversation in Totem does: erasing a lead erases its calls, conversations and merged duplicates too, while its bookings stay with `lead` set to `null`. `deleted` for any other removal. Either way, delete your copy and keep this version, so an older copy delivered later is ignored.",
                    "x-description-es": "`erased` tras una supresión, que es también lo que hace borrar un lead, una llamada o una conversación en Totem: suprimir un lead suprime también sus llamadas, sus conversaciones y sus duplicados fusionados, mientras que sus citas se conservan con `lead` a `null`. `deleted` en cualquier otra eliminación. En ambos casos, borra tu copia y conserva esta versión para ignorar una copia anterior que llegue después."
                  }
                },
                "required": [
                  "reason"
                ],
                "description": "Present only on a removal.",
                "x-description-es": "Presente solo en una eliminación."
              }
            },
            "required": [
              "kind",
              "id",
              "version",
              "removed"
            ]
          }
        ],
        "description": "One change: the record's current state, or its removal.",
        "x-description-es": "Un cambio: el estado actual del registro, o su eliminación.",
        "examples": [
          {
            "kind": "lead",
            "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "version": 3,
            "object": {
              "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
              "object": "lead",
              "livemode": false,
              "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
              "record_kind": "lead",
              "name": "Alex",
              "surname": "Rivera",
              "email": "alex.rivera@example.com",
              "company": "Example Dental",
              "phone": "+12025550123",
              "phone_status": "valid",
              "status": "contacted",
              "status_set_by": "ai",
              "archive_reason": null,
              "archived_from_status": null,
              "contact_permissions": {
                "do_not_contact": false,
                "email_opt_out": false,
                "email_opt_out_at": null,
                "whatsapp_consent": null,
                "provenance": {
                  "do_not_contact": null,
                  "email_opt_out": null,
                  "whatsapp_consent": null
                }
              },
              "merged_into": null,
              "transferred_to": null,
              "revived_at": null,
              "pipeline_cleared": false,
              "converted_at": null,
              "value_at_conversion": null,
              "priority": "high",
              "tags": [
                "spring-check-up"
              ],
              "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
              "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
              "assignees": [
                "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
              ],
              "estimated_value": 1200,
              "estimated_value_currency": null,
              "source": "meta_lead_ads",
              "source_channel": null,
              "source_detail": null,
              "source_provenance": "member_editable",
              "created_at": "2026-09-28T10:15:00.000Z",
              "version": 3,
              "updated_at": "2026-09-28T10:20:01.250Z"
            }
          }
        ]
      },
      "FeedPage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedItem"
            },
            "description": "Changes in the order Totem recorded them. A record can appear more than once during an initial sync.",
            "x-description-es": "Cambios en el orden en que Totem los registró. Durante una carga inicial, un registro puede aparecer más de una vez."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when more changes are ready now; `false` once you have caught up.",
            "x-description-es": "`true` si ya hay más cambios listos; `false` cuando estás al día."
          },
          "next_cursor": {
            "type": "string",
            "description": "Always present, even on an empty page. Store it after applying the page and send it on the next call.",
            "x-description-es": "Siempre presente, también en una página vacía. Guárdalo después de aplicar la página y envíalo en la siguiente petición."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "A page of the changes feed.",
        "x-description-es": "Una página del feed de cambios.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "kind": "lead",
                "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                "version": 3,
                "object": {
                  "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                  "object": "lead",
                  "livemode": false,
                  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                  "record_kind": "lead",
                  "name": "Alex",
                  "surname": "Rivera",
                  "email": "alex.rivera@example.com",
                  "company": "Example Dental",
                  "phone": "+12025550123",
                  "phone_status": "valid",
                  "status": "contacted",
                  "status_set_by": "ai",
                  "archive_reason": null,
                  "archived_from_status": null,
                  "contact_permissions": {
                    "do_not_contact": false,
                    "email_opt_out": false,
                    "email_opt_out_at": null,
                    "whatsapp_consent": null,
                    "provenance": {
                      "do_not_contact": null,
                      "email_opt_out": null,
                      "whatsapp_consent": null
                    }
                  },
                  "merged_into": null,
                  "transferred_to": null,
                  "revived_at": null,
                  "pipeline_cleared": false,
                  "converted_at": null,
                  "value_at_conversion": null,
                  "priority": "high",
                  "tags": [
                    "spring-check-up"
                  ],
                  "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                  "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                  "assignees": [
                    "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
                  ],
                  "estimated_value": 1200,
                  "estimated_value_currency": null,
                  "source": "meta_lead_ads",
                  "source_channel": null,
                  "source_detail": null,
                  "source_provenance": "member_editable",
                  "created_at": "2026-09-28T10:15:00.000Z",
                  "version": 3,
                  "updated_at": "2026-09-28T10:20:01.250Z"
                }
              },
              {
                "kind": "call",
                "id": "call_m1pf4APjJWVi3Z7ulyNaW8y3lUi7V",
                "version": 5,
                "removed": {
                  "reason": "deleted"
                }
              },
              {
                "kind": "lead_response",
                "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                "version": 7,
                "object": {
                  "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                  "object": "lead_response",
                  "livemode": false,
                  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                  "last_inbound_at": "2026-10-01T08:58:00.000Z",
                  "last_outbound_at": "2026-10-01T08:59:30.000Z",
                  "awaiting_reply": false,
                  "last_answered_call_at": "2026-09-28T10:17:00.000Z",
                  "last_whatsapp_delivery_status": "read",
                  "coverage": {
                    "conversations": 2,
                    "calls": 1,
                    "channels_without_delivery_data": [
                      "email"
                    ],
                    "truncated": false
                  },
                  "version": 7,
                  "updated_at": "2026-10-01T08:59:31.040Z"
                }
              }
            ],
            "has_more": false,
            "next_cursor": "eyJ2IjoxLCJ0ZWFtIjoidGVhbV9yOXVZcklXNGdTRkpKNmhaUTlpcDFVSXBQYUFEMUNGN05SIiwiZXBvY2giOjAsInQiOnsicyI6MTc5MDg0NTE3MSwibnMiOjQwMDAwMDAwfSwibiI6IjVkMjJhMTVlM2E5MmNmYTE4NzUzZTVmYzkyZmVjNzI0MjQyNjIzZDE2MGIxZTUxMzRiYTM1ODE5MmUzNzM0ZjEiLCJicyI6bnVsbH01ZPX02"
          }
        ]
      },
      "Health": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "health",
            "description": "Always `health`.",
            "x-description-es": "Siempre `health`."
          },
          "status": {
            "type": "string",
            "const": "ok",
            "description": "Always `ok`: when the API is not available, the answer is an error instead.",
            "x-description-es": "Siempre `ok`: si la API no está disponible, la respuesta es un error."
          }
        },
        "required": [
          "object",
          "status"
        ],
        "description": "The API is up.",
        "x-description-es": "La API está disponible.",
        "examples": [
          {
            "object": "health",
            "status": "ok"
          }
        ]
      },
      "Lead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^lead_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "lead",
            "description": "Always `lead`.",
            "x-description-es": "Siempre `lead`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team the record belongs to.",
            "x-description-es": "El equipo al que pertenece el registro."
          },
          "record_kind": {
            "type": "string",
            "enum": [
              "lead",
              "client"
            ],
            "description": "`lead` when the record has a pipeline status, otherwise `client`. A lead whose status this version does not know reads `status: null`.",
            "x-description-es": "`lead` si el registro tiene un estado del embudo; si no, `client`. Un lead cuyo estado no conoce esta versión trae `status: null`."
          },
          "name": {
            "description": "First name or display name, or null.",
            "x-description-es": "Nombre o nombre visible, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "surname": {
            "description": "Surname, or null.",
            "x-description-es": "Apellidos, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "Email address as stored, or null.",
            "x-description-es": "Email tal como está guardado, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "Company, or null.",
            "x-description-es": "Empresa, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "Phone in E.164, only when the stored number validates; otherwise null.",
            "x-description-es": "Teléfono en E.164, solo si el número guardado es válido; si no, null.",
            "type": [
              "string",
              "null"
            ]
          },
          "phone_status": {
            "type": "string",
            "enum": [
              "valid",
              "invalid",
              "missing"
            ],
            "description": "`valid` (see `phone`), `invalid` (a number is stored but does not validate, for example one stored without its country prefix) or `missing`.",
            "x-description-es": "`valid` (ver `phone`), `invalid` (hay un número guardado que no es válido, por ejemplo uno guardado sin prefijo de país) o `missing`."
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "new",
                  "contacted",
                  "qualified",
                  "negotiating",
                  "converted",
                  "lost",
                  "archived",
                  "unreachable"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Pipeline status; null for a client record, or for a status this version does not know. `converted` is not \"won\".",
            "x-description-es": "Estado en el embudo; null en un cliente o si es un estado que esta versión no conoce. `converted` no significa \"ganado\"."
          },
          "status_set_by": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "human",
                  "ai",
                  "system",
                  "api",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Who set the current status: a person, the AI, Totem automation, an API caller, or unknown (no recorded transition lands on it). Null when `status` is null.",
            "x-description-es": "Quién fijó el estado actual: una persona, la IA, la automatización de Totem, una llamada a la API o desconocido (ninguna transición registrada llega a él). Null cuando `status` es null."
          },
          "archive_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "opt_out",
                  "no_consent",
                  "not_interested",
                  "not_qualified",
                  "no_contact",
                  "merged",
                  "family_transfer",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the record was archived, as a closed code; stored free text is `other`. Null when none is stored.",
            "x-description-es": "Por qué se archivó el registro, como código cerrado; el texto libre guardado es `other`. Null si no hay ninguno."
          },
          "archived_from_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "new",
                  "contacted",
                  "qualified",
                  "negotiating",
                  "converted",
                  "lost",
                  "archived",
                  "unreachable"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The status the lead had before its current archive; null while it is not archived or when unknown.",
            "x-description-es": "El estado que tenía el lead antes de su archivo actual; null si no está archivado o si se desconoce."
          },
          "contact_permissions": {
            "type": "object",
            "properties": {
              "do_not_contact": {
                "type": "boolean",
                "description": "True when the person asked never to be contacted (the `opt_out` archive reason). Stop every channel.",
                "x-description-es": "Verdadero cuando la persona pidió no ser contactada nunca (motivo de archivo `opt_out`). Detén todos los canales."
              },
              "email_opt_out": {
                "type": "boolean",
                "description": "True when the person unsubscribed from marketing and follow-up email.",
                "x-description-es": "Verdadero cuando la persona se dio de baja del correo electrónico comercial y de seguimiento."
              },
              "email_opt_out_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "When the email opt-out was recorded, or null.",
                "x-description-es": "Cuándo se registró la baja del correo electrónico, o null."
              },
              "whatsapp_consent": {
                "description": "WhatsApp consent: false when refused, true when recorded, null when unknown.",
                "x-description-es": "Consentimiento de WhatsApp: false si se rechazó, true si consta, null si se desconoce.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "provenance": {
                "type": "object",
                "properties": {
                  "do_not_contact": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "archive_reason"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Where `do_not_contact` comes from, or null when it is false.",
                    "x-description-es": "De dónde viene `do_not_contact`, o null cuando es falso."
                  },
                  "email_opt_out": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "unsubscribe_link",
                          "manual",
                          "unknown"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Who recorded the email opt-out: the unsubscribe link, a person in Totem, or unknown. Null when there is none.",
                    "x-description-es": "Quién registró la baja del correo electrónico: el enlace de baja, una persona en Totem o desconocido. Null si no hay baja."
                  },
                  "whatsapp_consent": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "stored",
                          "archive_reason"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "`archive_reason` when a refusal is recorded as the archive reason; `stored` for the value kept on the record, which team members can edit. Null when unknown.",
                    "x-description-es": "`archive_reason` si el rechazo consta como motivo de archivo; `stored` para el valor guardado en la ficha, que el equipo puede editar. Null si se desconoce."
                  }
                },
                "required": [
                  "do_not_contact",
                  "email_opt_out",
                  "whatsapp_consent"
                ],
                "description": "The source of each permission.",
                "x-description-es": "El origen de cada permiso."
              }
            },
            "required": [
              "do_not_contact",
              "email_opt_out",
              "email_opt_out_at",
              "whatsapp_consent",
              "provenance"
            ],
            "description": "Contact permissions. Apply them before any outreach from your own systems.",
            "x-description-es": "Permisos de contacto. Aplícalos antes de cualquier contacto desde tus propios sistemas."
          },
          "merged_into": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The lead this record was merged into, or null (also when that lead no longer exists).",
            "x-description-es": "El lead en el que se fusionó este registro, o null (también si ese lead ya no existe)."
          },
          "transferred_to": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "team": {
                    "type": "string",
                    "pattern": "^team_[0-9A-Za-z]+$",
                    "description": "The destination team.",
                    "x-description-es": "El equipo de destino."
                  },
                  "lead": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^lead_[0-9A-Za-z]+$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The destination lead, or null when its id cannot be named across teams: an assistant handoff created it, or the transfer landed on an existing lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id.",
                    "x-description-es": "El lead de destino, o null si su id no puede nombrarse entre equipos: lo creó el traspaso de un asistente, o el traspaso cayó en un lead existente de anuncios (Meta, Google Ads o LinkedIn) u otro lead con id fijo."
                  }
                },
                "required": [
                  "team",
                  "lead"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Where a transfer to another team of your organization sent this lead, or null. The team may be one your key does not read.",
            "x-description-es": "Adónde se traspasó este lead dentro de tu organización, o null. El equipo puede ser uno que tu clave no lee."
          },
          "revived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the contact last came back on their own and revived an archived lead, or null.",
            "x-description-es": "Cuándo volvió el contacto por su cuenta y reactivó un lead archivado por última vez, o null."
          },
          "pipeline_cleared": {
            "type": "boolean",
            "description": "True when the lead was converted with \"clear pipeline data\": board, stage, priority, assignees, estimated value and the source fields other than `source_channel` are null because they were cleared.",
            "x-description-es": "Verdadero si el lead se convirtió con \"borrar datos del embudo\": tablero, etapa, prioridad, responsables, valor estimado y los campos de origen salvo `source_channel` son null porque se borraron."
          },
          "converted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the lead was converted, while its status is `converted`; otherwise null.",
            "x-description-es": "Cuándo se convirtió el lead, mientras su estado es `converted`; si no, null."
          },
          "value_at_conversion": {
            "description": "The estimated value when it was converted, in major units. Survives \"clear pipeline data\".",
            "x-description-es": "El valor estimado al convertirlo, en unidades principales. Se conserva al borrar los datos del embudo.",
            "type": [
              "number",
              "null"
            ]
          },
          "priority": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "urgent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Priority, or null.",
            "x-description-es": "Prioridad, o null."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Labels as stored. `lead` and `booking` are system labels.",
            "x-description-es": "Etiquetas tal como están guardadas. `lead` y `booking` son etiquetas del sistema."
          },
          "board": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^brd_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The board, resolved through the stage when it has one; or null.",
            "x-description-es": "El tablero, resuelto a través de la etapa si la hay; o null."
          },
          "stage": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^stg_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The stage, or null.",
            "x-description-es": "La etapa, o null."
          },
          "assignees": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^mem_[0-9A-Za-z]+$",
                  "description": "A team member.",
                  "x-description-es": "Un miembro del equipo."
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Assigned members, sorted. Null when the record has no pipeline data.",
            "x-description-es": "Miembros asignados, ordenados. Null cuando el registro no tiene datos del embudo."
          },
          "estimated_value": {
            "description": "Estimated value in major units as stored (decimals allowed), or null.",
            "x-description-es": "Valor estimado en unidades principales tal como está guardado (con decimales), o null.",
            "type": [
              "number",
              "null"
            ]
          },
          "estimated_value_currency": {
            "type": "null",
            "description": "Always null: Totem stores no currency with the value.",
            "x-description-es": "Siempre null: Totem no guarda moneda con el valor."
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "meta_lead_ads",
                  "manual",
                  "website_form",
                  "booking_page",
                  "csv_import",
                  "api",
                  "chatbot",
                  "google_ads",
                  "linkedin",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The stored lead source; `api` also covers leads created by Totem itself (for example from a conversation or a call), see `source_detail`. Null when none is stored.",
            "x-description-es": "El origen guardado del lead; `api` cubre también los leads que crea el propio Totem (por ejemplo, desde una conversación o una llamada), ver `source_detail`. Null si no hay ninguno."
          },
          "source_channel": {
            "description": "The channel the record started on (for example `whatsapp`, `phone`, `widget`), or null. Team members can edit it.",
            "x-description-es": "El canal por el que empezó el registro (por ejemplo `whatsapp`, `phone`, `widget`), o null. El equipo puede editarlo.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_detail": {
            "description": "`conversation`, `call`, `external:<provider>`, `gated_ad:<source>`, `family_handoff`, `api_intake` or `unknown`; null when `source` needs no detail.",
            "x-description-es": "`conversation`, `call`, `external:<proveedor>`, `gated_ad:<origen>`, `family_handoff`, `api_intake` o `unknown`; null cuando `source` no necesita detalle.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_provenance": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "server_written",
                  "member_editable"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`server_written` when Totem set the source from what the ad platform reported; otherwise `member_editable` (team members can change it). Null with `source`.",
            "x-description-es": "`server_written` si Totem fijó el origen a partir de lo que informó la plataforma de anuncios; si no, `member_editable` (el equipo puede cambiarlo). Null junto con `source`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the record was created.",
            "x-description-es": "Cuándo se creó el registro."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "record_kind",
          "name",
          "surname",
          "email",
          "company",
          "phone",
          "phone_status",
          "status",
          "status_set_by",
          "archive_reason",
          "archived_from_status",
          "contact_permissions",
          "merged_into",
          "transferred_to",
          "revived_at",
          "pipeline_cleared",
          "converted_at",
          "value_at_conversion",
          "priority",
          "tags",
          "board",
          "stage",
          "assignees",
          "estimated_value",
          "estimated_value_currency",
          "source",
          "source_channel",
          "source_detail",
          "source_provenance",
          "created_at",
          "version",
          "updated_at"
        ],
        "description": "A lead or client record: lead fields only.",
        "x-description-es": "Un lead o cliente: solo los campos del lead.",
        "examples": [
          {
            "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "object": "lead",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "record_kind": "lead",
            "name": "Alex",
            "surname": "Rivera",
            "email": "alex.rivera@example.com",
            "company": "Example Dental",
            "phone": "+12025550123",
            "phone_status": "valid",
            "status": "contacted",
            "status_set_by": "ai",
            "archive_reason": null,
            "archived_from_status": null,
            "contact_permissions": {
              "do_not_contact": false,
              "email_opt_out": false,
              "email_opt_out_at": null,
              "whatsapp_consent": null,
              "provenance": {
                "do_not_contact": null,
                "email_opt_out": null,
                "whatsapp_consent": null
              }
            },
            "merged_into": null,
            "transferred_to": null,
            "revived_at": null,
            "pipeline_cleared": false,
            "converted_at": null,
            "value_at_conversion": null,
            "priority": "high",
            "tags": [
              "spring-check-up"
            ],
            "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
            "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
            "assignees": [
              "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
            ],
            "estimated_value": 1200,
            "estimated_value_currency": null,
            "source": "meta_lead_ads",
            "source_channel": null,
            "source_detail": null,
            "source_provenance": "member_editable",
            "created_at": "2026-09-28T10:15:00.000Z",
            "version": 3,
            "updated_at": "2026-09-28T10:20:01.250Z"
          }
        ]
      },
      "LeadAttribution": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^lead_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "lead_attribution",
            "description": "Always `lead_attribution`.",
            "x-description-es": "Siempre `lead_attribution`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team the lead belongs to.",
            "x-description-es": "El equipo al que pertenece el lead."
          },
          "original_capture": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "capture": {
                    "type": "string",
                    "enum": [
                      "at_creation",
                      "at_activation"
                    ],
                    "description": "`at_creation`: frozen from the lead as it was first saved. `at_activation`: copied once from the lead as it was when the API was activated, for a lead with no capture record (created before Totem started recording attribution, or whose creation was not recorded).",
                    "x-description-es": "`at_creation`: fijado con el lead tal como se guardó por primera vez. `at_activation`: copiado una vez del lead tal como estaba al activar la API, para un lead sin registro de captura (creado antes de que Totem empezara a registrar la atribución, o cuya creación no se registró)."
                  },
                  "captured_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the record was written.",
                    "x-description-es": "Cuándo se escribió el registro."
                  },
                  "source": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "meta_lead_ads",
                          "manual",
                          "website_form",
                          "booking_page",
                          "csv_import",
                          "api",
                          "chatbot",
                          "google_ads",
                          "linkedin",
                          "other"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The lead source at capture, from the same set as the lead's `source`; `api` also covers leads created by Totem itself (for example from a conversation or a call, see `origin`). Null when none was stored.",
                    "x-description-es": "El origen del lead en la captura, del mismo conjunto que el `source` del lead; `api` cubre también los leads que crea el propio Totem (por ejemplo, desde una conversación o una llamada, ver `origin`). Null si no había ninguno."
                  },
                  "source_hint": {
                    "description": "The real source of a gated ad lead stored as `api`, or null.",
                    "x-description-es": "El origen real de un lead de anuncios restringido guardado como `api`, o null.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "source_channel": {
                    "description": "The channel at capture, or null.",
                    "x-description-es": "El canal en la captura, o null.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "external_provider": {
                    "description": "The portal or booking platform of a forwarded or synced lead, or null.",
                    "x-description-es": "El portal o la plataforma de citas de un lead reenviado o sincronizado, o null.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "received_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the lead was received, as first written, or null.",
                    "x-description-es": "Cuándo se recibió el lead, tal como se escribió la primera vez, o null."
                  },
                  "submitted_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the ad platform says the form was submitted, or null.",
                    "x-description-es": "Cuándo dice la plataforma de anuncios que se envió el formulario, o null."
                  },
                  "origin": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "conversation",
                              "call"
                            ],
                            "description": "`conversation` or `call`.",
                            "x-description-es": "`conversation` o `call`."
                          },
                          "channel": {
                            "description": "Its channel, or null.",
                            "x-description-es": "Su canal, o null.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "channel"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The conversation or call that created the lead (never its id), or null (also for an origin of another kind).",
                    "x-description-es": "La conversación o llamada que creó el lead (nunca su id), o null (también para un origen de otro tipo)."
                  },
                  "campaign": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The campaign.",
                    "x-description-es": "La campaña."
                  },
                  "ad": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The ad.",
                    "x-description-es": "El anuncio."
                  },
                  "ad_set": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The Meta ad set.",
                    "x-description-es": "El conjunto de anuncios de Meta."
                  },
                  "ad_group": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "description": "The Google Ads ad group.",
                    "x-description-es": "El grupo de anuncios de Google Ads."
                  },
                  "form": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The lead form.",
                    "x-description-es": "El formulario de clientes potenciales."
                  },
                  "creative": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "description": "The creative.",
                    "x-description-es": "La creatividad."
                  },
                  "asset_group": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "description": "The Google Ads asset group.",
                    "x-description-es": "El grupo de recursos de Google Ads."
                  },
                  "page": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The Facebook page.",
                    "x-description-es": "La página de Facebook."
                  },
                  "utm": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_source`.",
                            "x-description-es": "`utm_source`."
                          },
                          "medium": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_medium`.",
                            "x-description-es": "`utm_medium`."
                          },
                          "campaign": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_campaign`.",
                            "x-description-es": "`utm_campaign`."
                          },
                          "term": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_term`.",
                            "x-description-es": "`utm_term`."
                          },
                          "content": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_content`.",
                            "x-description-es": "`utm_content`."
                          }
                        },
                        "required": [
                          "source",
                          "medium",
                          "campaign",
                          "term",
                          "content"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The five standard UTM keys, or null when none was captured.",
                    "x-description-es": "Las cinco claves UTM estándar, o null si no se capturó ninguna."
                  },
                  "click_network": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "description": "The value, or null when it was not captured.",
                        "x-description-es": "El valor, o null si no se capturó.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "provenance": {
                        "type": "string",
                        "enum": [
                          "provider",
                          "team_alias",
                          "stored_metadata",
                          "stored_metadata_at_activation",
                          "not_captured"
                        ],
                        "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                        "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                      }
                    },
                    "required": [
                      "value",
                      "provenance"
                    ],
                    "description": "The network of the first click id (`google` or `meta`). The click id itself is never kept.",
                    "x-description-es": "La red del primer identificador de clic (`google` o `meta`). El identificador nunca se guarda."
                  },
                  "ad_referral": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "channel": {
                            "type": "string",
                            "enum": [
                              "whatsapp",
                              "facebook",
                              "instagram"
                            ],
                            "description": "The channel.",
                            "x-description-es": "El canal."
                          },
                          "source_type": {
                            "type": "string",
                            "enum": [
                              "ad",
                              "post",
                              "link",
                              "other"
                            ],
                            "description": "What opened the conversation.",
                            "x-description-es": "Qué abrió la conversación."
                          },
                          "ad_id": {
                            "description": "The ad or post id, or null.",
                            "x-description-es": "El id del anuncio o la publicación, o null.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "referred_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Meta's time for the referral.",
                            "x-description-es": "La hora de Meta del referido."
                          },
                          "provenance": {
                            "type": "string",
                            "const": "provider",
                            "description": "Always `provider`: only the signed Meta webhooks write it.",
                            "x-description-es": "Siempre `provider`: solo lo escriben los webhooks firmados de Meta."
                          }
                        },
                        "required": [
                          "channel",
                          "source_type",
                          "ad_id",
                          "referred_at",
                          "provenance"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The first Meta ad referral of the conversation that created the lead, or null.",
                    "x-description-es": "El primer referido de anuncio de Meta de la conversación que creó el lead, o null."
                  },
                  "family_origin": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "team": {
                            "type": "string",
                            "pattern": "^team_[0-9A-Za-z]+$",
                            "description": "The team of your organization the lead came from.",
                            "x-description-es": "El equipo de tu organización del que vino el lead."
                          },
                          "lead": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^lead_[0-9A-Za-z]+$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Its lead there, or null when that id cannot be named across teams: an assistant handed off a caller without one, or the lead there is a lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id. `automated` tells an assistant's handoff from a move made by a person.",
                            "x-description-es": "Su lead allí, o null si ese id no puede nombrarse entre equipos: un asistente traspasó a alguien que no lo tenía, o el lead de allí es un lead de anuncios (Meta, Google Ads o LinkedIn) u otro lead con id fijo. `automated` distingue el traspaso de un asistente del que hace una persona."
                          },
                          "automated": {
                            "type": "boolean",
                            "description": "True for an assistant's handoff.",
                            "x-description-es": "Verdadero en el traspaso de un asistente."
                          }
                        },
                        "required": [
                          "team",
                          "lead",
                          "automated"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The transfer from another team of your organization that created the lead, or null.",
                    "x-description-es": "El traspaso desde otro equipo de tu organización que creó el lead, o null."
                  },
                  "audience": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "null",
                        "description": "Always null.",
                        "x-description-es": "Siempre null."
                      },
                      "missing_reason": {
                        "type": "string",
                        "const": "unsupported",
                        "description": "Totem does not record audiences; an ad set is not one.",
                        "x-description-es": "Totem no registra audiencias; un conjunto de anuncios no lo es."
                      }
                    },
                    "required": [
                      "value",
                      "missing_reason"
                    ],
                    "description": "Not available in this version.",
                    "x-description-es": "No disponible en esta versión."
                  }
                },
                "required": [
                  "capture",
                  "captured_at",
                  "source",
                  "source_hint",
                  "source_channel",
                  "external_provider",
                  "received_at",
                  "submitted_at",
                  "origin",
                  "campaign",
                  "ad",
                  "ad_set",
                  "ad_group",
                  "form",
                  "creative",
                  "asset_group",
                  "page",
                  "utm",
                  "click_network",
                  "ad_referral",
                  "family_origin",
                  "audience"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How the lead first entered the CRM, frozen once; null when it was not captured. \"Original\" is the first time the contact entered the CRM, not the first ad it answered.",
            "x-description-es": "Cómo entró el lead en el CRM por primera vez, fijado una sola vez; null si no se capturó. \"Original\" es la primera vez que el contacto entró en el CRM, no el primer anuncio al que respondió."
          },
          "original_capture_missing_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "not_captured"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`not_captured` when `original_capture` is null, otherwise null.",
            "x-description-es": "`not_captured` cuando `original_capture` es null; si no, null."
          },
          "latest_submission": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "meta",
                      "google_ads",
                      "linkedin"
                    ],
                    "description": "The ad platform.",
                    "x-description-es": "La plataforma de anuncios."
                  },
                  "submitted_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When the platform says it was submitted, or null.",
                    "x-description-es": "Cuándo dice la plataforma que se envió, o null."
                  },
                  "campaign": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The campaign.",
                    "x-description-es": "La campaña."
                  },
                  "ad": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The ad.",
                    "x-description-es": "El anuncio."
                  },
                  "ad_set": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The Meta ad set.",
                    "x-description-es": "El conjunto de anuncios de Meta."
                  },
                  "ad_group": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "description": "The Google Ads ad group.",
                    "x-description-es": "El grupo de anuncios de Google Ads."
                  },
                  "form": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its name.",
                        "x-description-es": "Su nombre."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "description": "The lead form.",
                    "x-description-es": "El formulario de clientes potenciales."
                  },
                  "creative": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "description": "The creative.",
                    "x-description-es": "La creatividad."
                  },
                  "asset_group": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "description": "The value, or null when it was not captured.",
                            "x-description-es": "El valor, o null si no se capturó.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "team_alias",
                              "stored_metadata",
                              "stored_metadata_at_activation",
                              "not_captured"
                            ],
                            "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                            "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                          }
                        },
                        "required": [
                          "value",
                          "provenance"
                        ],
                        "description": "Its id.",
                        "x-description-es": "Su id."
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "description": "The Google Ads asset group.",
                    "x-description-es": "El grupo de recursos de Google Ads."
                  },
                  "utm": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_source`.",
                            "x-description-es": "`utm_source`."
                          },
                          "medium": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_medium`.",
                            "x-description-es": "`utm_medium`."
                          },
                          "campaign": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_campaign`.",
                            "x-description-es": "`utm_campaign`."
                          },
                          "term": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_term`.",
                            "x-description-es": "`utm_term`."
                          },
                          "content": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "description": "The value, or null when it was not captured.",
                                "x-description-es": "El valor, o null si no se capturó.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "provenance": {
                                "type": "string",
                                "enum": [
                                  "provider",
                                  "team_alias",
                                  "stored_metadata",
                                  "stored_metadata_at_activation",
                                  "not_captured"
                                ],
                                "description": "`provider` (reported by the ad platform), `team_alias` (typed by staff), `stored_metadata` (editable lead data), `stored_metadata_at_activation` (copied once when the API was activated, for a lead created before capture), or `not_captured` exactly when `value` is null.",
                                "x-description-es": "`provider` (lo informó la plataforma de anuncios), `team_alias` (lo escribió el equipo), `stored_metadata` (datos editables del lead), `stored_metadata_at_activation` (copiado una vez al activar la API, para un lead anterior a la captura) o `not_captured` exactamente cuando `value` es null."
                              }
                            },
                            "required": [
                              "value",
                              "provenance"
                            ],
                            "description": "`utm_content`.",
                            "x-description-es": "`utm_content`."
                          }
                        },
                        "required": [
                          "source",
                          "medium",
                          "campaign",
                          "term",
                          "content"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Its UTM keys, or null.",
                    "x-description-es": "Sus claves UTM, o null."
                  },
                  "expires_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "When this submission stops being readable (Google Ads and LinkedIn keep it 90 days); null for Meta.",
                    "x-description-es": "Cuándo deja de poder leerse este envío (Google Ads y LinkedIn lo guardan 90 días); null en Meta."
                  }
                },
                "required": [
                  "provider",
                  "submitted_at",
                  "campaign",
                  "ad",
                  "ad_set",
                  "ad_group",
                  "form",
                  "creative",
                  "asset_group",
                  "utm",
                  "expires_at"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The newest ad submission recorded for this lead, including a repeat on an existing contact; null when none is recorded. A submission the ad platform reports deleted (a LinkedIn member deleting their form response) is no longer shown, and once the newest one expires or is withdrawn an older one can show instead.",
            "x-description-es": "El envío de anuncio más reciente registrado para este lead, incluida una repetición sobre un contacto existente; null si no hay ninguno. Un envío que la plataforma de anuncios informa como borrado (un miembro de LinkedIn que borra su respuesta al formulario) deja de mostrarse, y cuando el más reciente caduca o se retira puede mostrarse uno anterior."
          },
          "latest_submission_missing_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "not_captured"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`not_captured` when `latest_submission` is null, otherwise null.",
            "x-description-es": "`not_captured` cuando `latest_submission` es null; si no, null."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "original_capture",
          "original_capture_missing_reason",
          "latest_submission",
          "latest_submission_missing_reason",
          "version",
          "updated_at"
        ],
        "description": "Where a lead came from: its original capture and latest submission.",
        "x-description-es": "De dónde viene un lead: su captura original y su último envío.",
        "examples": [
          {
            "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "object": "lead_attribution",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "original_capture": {
              "capture": "at_creation",
              "captured_at": "2026-09-28T10:15:00.000Z",
              "source": "meta_lead_ads",
              "source_hint": null,
              "source_channel": null,
              "external_provider": null,
              "received_at": "2026-09-28T10:15:00.000Z",
              "submitted_at": "2026-09-28T10:14:30.000Z",
              "origin": null,
              "campaign": {
                "id": {
                  "value": "120210000000000101",
                  "provenance": "provider"
                },
                "name": {
                  "value": "Spring check-up",
                  "provenance": "provider"
                }
              },
              "ad": {
                "id": {
                  "value": "120210000000000303",
                  "provenance": "provider"
                },
                "name": {
                  "value": "Free first visit",
                  "provenance": "provider"
                }
              },
              "ad_set": {
                "id": {
                  "value": "120210000000000202",
                  "provenance": "provider"
                },
                "name": {
                  "value": "Families nearby",
                  "provenance": "provider"
                }
              },
              "ad_group": {
                "id": {
                  "value": null,
                  "provenance": "not_captured"
                }
              },
              "form": {
                "id": {
                  "value": "900000000000000404",
                  "provenance": "provider"
                },
                "name": {
                  "value": "Book a check-up",
                  "provenance": "provider"
                }
              },
              "creative": {
                "id": {
                  "value": null,
                  "provenance": "not_captured"
                }
              },
              "asset_group": {
                "id": {
                  "value": null,
                  "provenance": "not_captured"
                }
              },
              "page": {
                "id": {
                  "value": "100000000000000505",
                  "provenance": "provider"
                },
                "name": {
                  "value": "Example Dental",
                  "provenance": "provider"
                }
              },
              "utm": null,
              "click_network": {
                "value": null,
                "provenance": "not_captured"
              },
              "ad_referral": null,
              "family_origin": null,
              "audience": {
                "value": null,
                "missing_reason": "unsupported"
              }
            },
            "original_capture_missing_reason": null,
            "latest_submission": null,
            "latest_submission_missing_reason": "not_captured",
            "version": 1,
            "updated_at": "2026-09-28T10:15:02.100Z"
          }
        ]
      },
      "LeadDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^lead_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "lead",
            "description": "Always `lead`.",
            "x-description-es": "Siempre `lead`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team the record belongs to.",
            "x-description-es": "El equipo al que pertenece el registro."
          },
          "record_kind": {
            "type": "string",
            "enum": [
              "lead",
              "client"
            ],
            "description": "`lead` when the record has a pipeline status, otherwise `client`. A lead whose status this version does not know reads `status: null`.",
            "x-description-es": "`lead` si el registro tiene un estado del embudo; si no, `client`. Un lead cuyo estado no conoce esta versión trae `status: null`."
          },
          "name": {
            "description": "First name or display name, or null.",
            "x-description-es": "Nombre o nombre visible, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "surname": {
            "description": "Surname, or null.",
            "x-description-es": "Apellidos, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "Email address as stored, or null.",
            "x-description-es": "Email tal como está guardado, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "Company, or null.",
            "x-description-es": "Empresa, o null.",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "Phone in E.164, only when the stored number validates; otherwise null.",
            "x-description-es": "Teléfono en E.164, solo si el número guardado es válido; si no, null.",
            "type": [
              "string",
              "null"
            ]
          },
          "phone_status": {
            "type": "string",
            "enum": [
              "valid",
              "invalid",
              "missing"
            ],
            "description": "`valid` (see `phone`), `invalid` (a number is stored but does not validate, for example one stored without its country prefix) or `missing`.",
            "x-description-es": "`valid` (ver `phone`), `invalid` (hay un número guardado que no es válido, por ejemplo uno guardado sin prefijo de país) o `missing`."
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "new",
                  "contacted",
                  "qualified",
                  "negotiating",
                  "converted",
                  "lost",
                  "archived",
                  "unreachable"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Pipeline status; null for a client record, or for a status this version does not know. `converted` is not \"won\".",
            "x-description-es": "Estado en el embudo; null en un cliente o si es un estado que esta versión no conoce. `converted` no significa \"ganado\"."
          },
          "status_set_by": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "human",
                  "ai",
                  "system",
                  "api",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Who set the current status: a person, the AI, Totem automation, an API caller, or unknown (no recorded transition lands on it). Null when `status` is null.",
            "x-description-es": "Quién fijó el estado actual: una persona, la IA, la automatización de Totem, una llamada a la API o desconocido (ninguna transición registrada llega a él). Null cuando `status` es null."
          },
          "archive_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "opt_out",
                  "no_consent",
                  "not_interested",
                  "not_qualified",
                  "no_contact",
                  "merged",
                  "family_transfer",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the record was archived, as a closed code; stored free text is `other`. Null when none is stored.",
            "x-description-es": "Por qué se archivó el registro, como código cerrado; el texto libre guardado es `other`. Null si no hay ninguno."
          },
          "archived_from_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "new",
                  "contacted",
                  "qualified",
                  "negotiating",
                  "converted",
                  "lost",
                  "archived",
                  "unreachable"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The status the lead had before its current archive; null while it is not archived or when unknown.",
            "x-description-es": "El estado que tenía el lead antes de su archivo actual; null si no está archivado o si se desconoce."
          },
          "contact_permissions": {
            "type": "object",
            "properties": {
              "do_not_contact": {
                "type": "boolean",
                "description": "True when the person asked never to be contacted (the `opt_out` archive reason). Stop every channel.",
                "x-description-es": "Verdadero cuando la persona pidió no ser contactada nunca (motivo de archivo `opt_out`). Detén todos los canales."
              },
              "email_opt_out": {
                "type": "boolean",
                "description": "True when the person unsubscribed from marketing and follow-up email.",
                "x-description-es": "Verdadero cuando la persona se dio de baja del correo electrónico comercial y de seguimiento."
              },
              "email_opt_out_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "When the email opt-out was recorded, or null.",
                "x-description-es": "Cuándo se registró la baja del correo electrónico, o null."
              },
              "whatsapp_consent": {
                "description": "WhatsApp consent: false when refused, true when recorded, null when unknown.",
                "x-description-es": "Consentimiento de WhatsApp: false si se rechazó, true si consta, null si se desconoce.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "provenance": {
                "type": "object",
                "properties": {
                  "do_not_contact": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "archive_reason"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Where `do_not_contact` comes from, or null when it is false.",
                    "x-description-es": "De dónde viene `do_not_contact`, o null cuando es falso."
                  },
                  "email_opt_out": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "unsubscribe_link",
                          "manual",
                          "unknown"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Who recorded the email opt-out: the unsubscribe link, a person in Totem, or unknown. Null when there is none.",
                    "x-description-es": "Quién registró la baja del correo electrónico: el enlace de baja, una persona en Totem o desconocido. Null si no hay baja."
                  },
                  "whatsapp_consent": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "stored",
                          "archive_reason"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "`archive_reason` when a refusal is recorded as the archive reason; `stored` for the value kept on the record, which team members can edit. Null when unknown.",
                    "x-description-es": "`archive_reason` si el rechazo consta como motivo de archivo; `stored` para el valor guardado en la ficha, que el equipo puede editar. Null si se desconoce."
                  }
                },
                "required": [
                  "do_not_contact",
                  "email_opt_out",
                  "whatsapp_consent"
                ],
                "description": "The source of each permission.",
                "x-description-es": "El origen de cada permiso."
              }
            },
            "required": [
              "do_not_contact",
              "email_opt_out",
              "email_opt_out_at",
              "whatsapp_consent",
              "provenance"
            ],
            "description": "Contact permissions. Apply them before any outreach from your own systems.",
            "x-description-es": "Permisos de contacto. Aplícalos antes de cualquier contacto desde tus propios sistemas."
          },
          "merged_into": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^lead_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The lead this record was merged into, or null (also when that lead no longer exists).",
            "x-description-es": "El lead en el que se fusionó este registro, o null (también si ese lead ya no existe)."
          },
          "transferred_to": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "team": {
                    "type": "string",
                    "pattern": "^team_[0-9A-Za-z]+$",
                    "description": "The destination team.",
                    "x-description-es": "El equipo de destino."
                  },
                  "lead": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^lead_[0-9A-Za-z]+$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The destination lead, or null when its id cannot be named across teams: an assistant handoff created it, or the transfer landed on an existing lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id.",
                    "x-description-es": "El lead de destino, o null si su id no puede nombrarse entre equipos: lo creó el traspaso de un asistente, o el traspaso cayó en un lead existente de anuncios (Meta, Google Ads o LinkedIn) u otro lead con id fijo."
                  }
                },
                "required": [
                  "team",
                  "lead"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Where a transfer to another team of your organization sent this lead, or null. The team may be one your key does not read.",
            "x-description-es": "Adónde se traspasó este lead dentro de tu organización, o null. El equipo puede ser uno que tu clave no lee."
          },
          "revived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the contact last came back on their own and revived an archived lead, or null.",
            "x-description-es": "Cuándo volvió el contacto por su cuenta y reactivó un lead archivado por última vez, o null."
          },
          "pipeline_cleared": {
            "type": "boolean",
            "description": "True when the lead was converted with \"clear pipeline data\": board, stage, priority, assignees, estimated value and the source fields other than `source_channel` are null because they were cleared.",
            "x-description-es": "Verdadero si el lead se convirtió con \"borrar datos del embudo\": tablero, etapa, prioridad, responsables, valor estimado y los campos de origen salvo `source_channel` son null porque se borraron."
          },
          "converted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the lead was converted, while its status is `converted`; otherwise null.",
            "x-description-es": "Cuándo se convirtió el lead, mientras su estado es `converted`; si no, null."
          },
          "value_at_conversion": {
            "description": "The estimated value when it was converted, in major units. Survives \"clear pipeline data\".",
            "x-description-es": "El valor estimado al convertirlo, en unidades principales. Se conserva al borrar los datos del embudo.",
            "type": [
              "number",
              "null"
            ]
          },
          "priority": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "urgent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Priority, or null.",
            "x-description-es": "Prioridad, o null."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Labels as stored. `lead` and `booking` are system labels.",
            "x-description-es": "Etiquetas tal como están guardadas. `lead` y `booking` son etiquetas del sistema."
          },
          "board": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^brd_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The board, resolved through the stage when it has one; or null.",
            "x-description-es": "El tablero, resuelto a través de la etapa si la hay; o null."
          },
          "stage": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^stg_[0-9A-Za-z]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The stage, or null.",
            "x-description-es": "La etapa, o null."
          },
          "assignees": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^mem_[0-9A-Za-z]+$",
                  "description": "A team member.",
                  "x-description-es": "Un miembro del equipo."
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Assigned members, sorted. Null when the record has no pipeline data.",
            "x-description-es": "Miembros asignados, ordenados. Null cuando el registro no tiene datos del embudo."
          },
          "estimated_value": {
            "description": "Estimated value in major units as stored (decimals allowed), or null.",
            "x-description-es": "Valor estimado en unidades principales tal como está guardado (con decimales), o null.",
            "type": [
              "number",
              "null"
            ]
          },
          "estimated_value_currency": {
            "type": "null",
            "description": "Always null: Totem stores no currency with the value.",
            "x-description-es": "Siempre null: Totem no guarda moneda con el valor."
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "meta_lead_ads",
                  "manual",
                  "website_form",
                  "booking_page",
                  "csv_import",
                  "api",
                  "chatbot",
                  "google_ads",
                  "linkedin",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The stored lead source; `api` also covers leads created by Totem itself (for example from a conversation or a call), see `source_detail`. Null when none is stored.",
            "x-description-es": "El origen guardado del lead; `api` cubre también los leads que crea el propio Totem (por ejemplo, desde una conversación o una llamada), ver `source_detail`. Null si no hay ninguno."
          },
          "source_channel": {
            "description": "The channel the record started on (for example `whatsapp`, `phone`, `widget`), or null. Team members can edit it.",
            "x-description-es": "El canal por el que empezó el registro (por ejemplo `whatsapp`, `phone`, `widget`), o null. El equipo puede editarlo.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_detail": {
            "description": "`conversation`, `call`, `external:<provider>`, `gated_ad:<source>`, `family_handoff`, `api_intake` or `unknown`; null when `source` needs no detail.",
            "x-description-es": "`conversation`, `call`, `external:<proveedor>`, `gated_ad:<origen>`, `family_handoff`, `api_intake` o `unknown`; null cuando `source` no necesita detalle.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_provenance": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "server_written",
                  "member_editable"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`server_written` when Totem set the source from what the ad platform reported; otherwise `member_editable` (team members can change it). Null with `source`.",
            "x-description-es": "`server_written` si Totem fijó el origen a partir de lo que informó la plataforma de anuncios; si no, `member_editable` (el equipo puede cambiarlo). Null junto con `source`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the record was created.",
            "x-description-es": "Cuándo se creó el registro."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          },
          "attribution": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LeadAttribution"
              },
              {
                "type": "null"
              }
            ],
            "description": "The lead's attribution facet, or null while Totem is still preparing it.",
            "x-description-es": "La faceta de atribución del lead, o null mientras Totem aún la prepara."
          },
          "response": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LeadResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "The lead's response facet, or null while Totem is still preparing it.",
            "x-description-es": "La faceta de respuesta del lead, o null mientras Totem aún la prepara."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "record_kind",
          "name",
          "surname",
          "email",
          "company",
          "phone",
          "phone_status",
          "status",
          "status_set_by",
          "archive_reason",
          "archived_from_status",
          "contact_permissions",
          "merged_into",
          "transferred_to",
          "revived_at",
          "pipeline_cleared",
          "converted_at",
          "value_at_conversion",
          "priority",
          "tags",
          "board",
          "stage",
          "assignees",
          "estimated_value",
          "estimated_value_currency",
          "source",
          "source_channel",
          "source_detail",
          "source_provenance",
          "created_at",
          "version",
          "updated_at",
          "attribution",
          "response"
        ],
        "description": "A lead with its `attribution` and `response` facets, each with its own `version`. A facet is `null` only while Totem is still preparing it.",
        "x-description-es": "Un lead con sus facetas `attribution` y `response`, cada una con su propia `version`. Una faceta es `null` solo mientras Totem aún la prepara.",
        "examples": [
          {
            "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "object": "lead",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "record_kind": "lead",
            "name": "Alex",
            "surname": "Rivera",
            "email": "alex.rivera@example.com",
            "company": "Example Dental",
            "phone": "+12025550123",
            "phone_status": "valid",
            "status": "contacted",
            "status_set_by": "ai",
            "archive_reason": null,
            "archived_from_status": null,
            "contact_permissions": {
              "do_not_contact": false,
              "email_opt_out": false,
              "email_opt_out_at": null,
              "whatsapp_consent": null,
              "provenance": {
                "do_not_contact": null,
                "email_opt_out": null,
                "whatsapp_consent": null
              }
            },
            "merged_into": null,
            "transferred_to": null,
            "revived_at": null,
            "pipeline_cleared": false,
            "converted_at": null,
            "value_at_conversion": null,
            "priority": "high",
            "tags": [
              "spring-check-up"
            ],
            "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
            "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
            "assignees": [
              "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
            ],
            "estimated_value": 1200,
            "estimated_value_currency": null,
            "source": "meta_lead_ads",
            "source_channel": null,
            "source_detail": null,
            "source_provenance": "member_editable",
            "created_at": "2026-09-28T10:15:00.000Z",
            "version": 3,
            "updated_at": "2026-09-28T10:20:01.250Z",
            "attribution": {
              "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
              "object": "lead_attribution",
              "livemode": false,
              "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
              "original_capture": {
                "capture": "at_creation",
                "captured_at": "2026-09-28T10:15:00.000Z",
                "source": "meta_lead_ads",
                "source_hint": null,
                "source_channel": null,
                "external_provider": null,
                "received_at": "2026-09-28T10:15:00.000Z",
                "submitted_at": "2026-09-28T10:14:30.000Z",
                "origin": null,
                "campaign": {
                  "id": {
                    "value": "120210000000000101",
                    "provenance": "provider"
                  },
                  "name": {
                    "value": "Spring check-up",
                    "provenance": "provider"
                  }
                },
                "ad": {
                  "id": {
                    "value": "120210000000000303",
                    "provenance": "provider"
                  },
                  "name": {
                    "value": "Free first visit",
                    "provenance": "provider"
                  }
                },
                "ad_set": {
                  "id": {
                    "value": "120210000000000202",
                    "provenance": "provider"
                  },
                  "name": {
                    "value": "Families nearby",
                    "provenance": "provider"
                  }
                },
                "ad_group": {
                  "id": {
                    "value": null,
                    "provenance": "not_captured"
                  }
                },
                "form": {
                  "id": {
                    "value": "900000000000000404",
                    "provenance": "provider"
                  },
                  "name": {
                    "value": "Book a check-up",
                    "provenance": "provider"
                  }
                },
                "creative": {
                  "id": {
                    "value": null,
                    "provenance": "not_captured"
                  }
                },
                "asset_group": {
                  "id": {
                    "value": null,
                    "provenance": "not_captured"
                  }
                },
                "page": {
                  "id": {
                    "value": "100000000000000505",
                    "provenance": "provider"
                  },
                  "name": {
                    "value": "Example Dental",
                    "provenance": "provider"
                  }
                },
                "utm": null,
                "click_network": {
                  "value": null,
                  "provenance": "not_captured"
                },
                "ad_referral": null,
                "family_origin": null,
                "audience": {
                  "value": null,
                  "missing_reason": "unsupported"
                }
              },
              "original_capture_missing_reason": null,
              "latest_submission": null,
              "latest_submission_missing_reason": "not_captured",
              "version": 1,
              "updated_at": "2026-09-28T10:15:02.100Z"
            },
            "response": {
              "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
              "object": "lead_response",
              "livemode": false,
              "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
              "last_inbound_at": "2026-10-01T08:58:00.000Z",
              "last_outbound_at": "2026-10-01T08:59:30.000Z",
              "awaiting_reply": false,
              "last_answered_call_at": "2026-09-28T10:17:00.000Z",
              "last_whatsapp_delivery_status": "read",
              "coverage": {
                "conversations": 2,
                "calls": 1,
                "channels_without_delivery_data": [
                  "email"
                ],
                "truncated": false
              },
              "version": 7,
              "updated_at": "2026-10-01T08:59:31.040Z"
            }
          }
        ]
      },
      "LeadList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Lead"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "A page of Lead objects, in a stable order that carries no meaning.",
        "x-description-es": "Una página de objetos Lead, en un orden estable sin significado.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
                "object": "lead",
                "livemode": false,
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "record_kind": "lead",
                "name": "Alex",
                "surname": "Rivera",
                "email": "alex.rivera@example.com",
                "company": "Example Dental",
                "phone": "+12025550123",
                "phone_status": "valid",
                "status": "contacted",
                "status_set_by": "ai",
                "archive_reason": null,
                "archived_from_status": null,
                "contact_permissions": {
                  "do_not_contact": false,
                  "email_opt_out": false,
                  "email_opt_out_at": null,
                  "whatsapp_consent": null,
                  "provenance": {
                    "do_not_contact": null,
                    "email_opt_out": null,
                    "whatsapp_consent": null
                  }
                },
                "merged_into": null,
                "transferred_to": null,
                "revived_at": null,
                "pipeline_cleared": false,
                "converted_at": null,
                "value_at_conversion": null,
                "priority": "high",
                "tags": [
                  "spring-check-up"
                ],
                "board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
                "stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
                "assignees": [
                  "mem_h548E7UiYhutHhucVrQCzkM0eaea0"
                ],
                "estimated_value": 1200,
                "estimated_value_currency": null,
                "source": "meta_lead_ads",
                "source_channel": null,
                "source_detail": null,
                "source_provenance": "member_editable",
                "created_at": "2026-09-28T10:15:00.000Z",
                "version": 3,
                "updated_at": "2026-09-28T10:20:01.250Z"
              }
            ],
            "has_more": true,
            "next_cursor": "eyJ2IjoxLCJrIjoibGVhZCIsImEiOiJsZWFkX3I3MkVmYlJOVXp1cU9SRkpSME84SHhBd0VYZDkzakdVVFlNYU1NWEtTRjBRYkxTOENpVUtKcEVQMzRMRlFHIiwicyI6ImYzNTI3NzI2MTkwYiJ93iHyRg"
          }
        ]
      },
      "LeadResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^lead_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "lead_response",
            "description": "Always `lead_response`.",
            "x-description-es": "Siempre `lead_response`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team this record belongs to.",
            "x-description-es": "El equipo al que pertenece este registro."
          },
          "last_inbound_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest message from the customer on any of the lead's conversations (UTC), or null. Not counted: erased messages, imported WhatsApp history and web-chat visitor turns. Instagram shares cannot be told apart and count.",
            "x-description-es": "El último mensaje del cliente en cualquiera de las conversaciones del lead (UTC), o null. No cuentan: mensajes borrados, historial de WhatsApp importado ni los turnos del visitante del chat web. Los contenidos compartidos de Instagram no se distinguen y sí cuentan."
          },
          "last_outbound_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest message sent to the customer that did not fail, on any of the lead's conversations and whoever sent it (UTC), or null. Imported WhatsApp history counts.",
            "x-description-es": "El último mensaje enviado al cliente que no falló, en cualquiera de las conversaciones del lead y lo enviara quien lo enviara (UTC), o null. El historial de WhatsApp importado sí cuenta."
          },
          "awaiting_reply": {
            "type": "boolean",
            "description": "True when `last_inbound_at` is newer than the latest reply on any of the lead's conversations. A reply is a sent message that did not fail and was recorded as a conversation reply or with no purpose; outreach, transactional messages (such as reminders) and imported history do not count. Most stored messages carry no purpose, so an automated send recorded without one also counts as a reply. False when the customer has never written.",
            "x-description-es": "Verdadero cuando `last_inbound_at` es posterior a la última respuesta en cualquiera de las conversaciones del lead. Una respuesta es un mensaje enviado que no falló y que se registró como respuesta de conversación o sin propósito; no cuentan la prospección, los mensajes transaccionales (como los recordatorios) ni el historial importado. La mayoría de los mensajes guardados no tienen propósito, así que un envío automático registrado sin él también cuenta como respuesta. Falso si el cliente nunca ha escrito."
          },
          "last_answered_call_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the latest of the lead's calls whose `outcome` is `answered_human` or `answered_ai` started (UTC), or null. A connected outbound call on Totem's phone lines reads `unknown`, so it is not counted.",
            "x-description-es": "Cuándo empezó la última llamada del lead cuyo `outcome` es `answered_human` o `answered_ai` (UTC), o null. Una saliente conectada en las líneas de teléfono de Totem es `unknown`, así que no cuenta."
          },
          "last_whatsapp_delivery_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "delivered",
                  "read",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`delivered`, `read` or `failed` for the latest message sent to the lead on WhatsApp. Null when that message has no receipt yet (`sent` is never stored) or the lead has no message sent on WhatsApp.",
            "x-description-es": "`delivered`, `read` o `failed` del último mensaje enviado al lead por WhatsApp. Null si ese mensaje aún no tiene confirmación (`sent` nunca se guarda) o si al lead no se le ha enviado ningún mensaje por WhatsApp."
          },
          "coverage": {
            "type": "object",
            "properties": {
              "conversations": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20,
                "description": "The lead's conversations these facts were computed from, newest first; at most 20.",
                "x-description-es": "Las conversaciones del lead con las que se calcularon estos datos, de la más reciente a la más antigua; como máximo 20."
              },
              "calls": {
                "type": "integer",
                "minimum": 0,
                "maximum": 50,
                "description": "The lead's calls `last_answered_call_at` was computed from, newest first; at most 50.",
                "x-description-es": "Las llamadas del lead con las que se calculó `last_answered_call_at`, de la más reciente a la más antigua; como máximo 50."
              },
              "channels_without_delivery_data": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "sms",
                    "facebook",
                    "instagram",
                    "tiktok",
                    "chatbot",
                    "email"
                  ]
                },
                "description": "The channels of those conversations that store no delivery receipts (every channel but WhatsApp), sorted.",
                "x-description-es": "Los canales de esas conversaciones que no guardan confirmaciones de entrega (todos menos WhatsApp), ordenados."
              },
              "truncated": {
                "type": "boolean",
                "description": "True when a read limit was reached (20 conversations, 200 messages or 50 calls): older activity was not read, so a time can be null or older than the truth, and `awaiting_reply` can miss an older reply.",
                "x-description-es": "Verdadero si se alcanzó un límite de lectura (20 conversaciones, 200 mensajes o 50 llamadas): la actividad más antigua no se leyó, así que una hora puede ser null o anterior a la real, y `awaiting_reply` puede no ver una respuesta más antigua."
              }
            },
            "required": [
              "conversations",
              "calls",
              "channels_without_delivery_data",
              "truncated"
            ],
            "description": "What these facts were computed from.",
            "x-description-es": "De qué se calcularon estos datos."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.",
            "x-description-es": "Aumenta cada vez que cambia alguno de los campos exportados del registro. Aplica un cambio solo si su versión es mayor que la que guardas."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Totem recorded this version (UTC). It is not the time the business event happened.",
            "x-description-es": "Cuándo registró Totem esta versión (UTC). No es la hora en que ocurrió el hecho."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "last_inbound_at",
          "last_outbound_at",
          "awaiting_reply",
          "last_answered_call_at",
          "last_whatsapp_delivery_status",
          "coverage",
          "version",
          "updated_at"
        ],
        "description": "How the team has answered a lead across its conversations and calls: the latest messages each way and whether a reply is due. It uses its lead's id.",
        "x-description-es": "Cómo ha respondido el equipo a un lead en sus conversaciones y llamadas: los últimos mensajes en cada sentido y si tiene una respuesta pendiente. Usa el identificador de su lead.",
        "examples": [
          {
            "id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
            "object": "lead_response",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "last_inbound_at": "2026-10-01T08:58:00.000Z",
            "last_outbound_at": "2026-10-01T08:59:30.000Z",
            "awaiting_reply": false,
            "last_answered_call_at": "2026-09-28T10:17:00.000Z",
            "last_whatsapp_delivery_status": "read",
            "coverage": {
              "conversations": 2,
              "calls": 1,
              "channels_without_delivery_data": [
                "email"
              ],
              "truncated": false
            },
            "version": 7,
            "updated_at": "2026-10-01T08:59:31.040Z"
          }
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "integration",
            "description": "Always `integration`.",
            "x-description-es": "Siempre `integration`."
          },
          "id": {
            "type": "string",
            "pattern": "^prn_[0-9A-Za-z]+$",
            "description": "Public id of the integration.",
            "x-description-es": "Identificador público de la integración."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for a real key; `false` in example data.",
            "x-description-es": "`true` con una clave real; `false` en los datos de ejemplo."
          },
          "name": {
            "type": "string",
            "description": "The name an administrator gave the integration.",
            "x-description-es": "El nombre que un administrador dio a la integración."
          },
          "key": {
            "type": "object",
            "properties": {
              "last4": {
                "type": "string",
                "minLength": 4,
                "maxLength": 4,
                "description": "The last four characters of the key used for this request.",
                "x-description-es": "Los cuatro últimos caracteres de la clave usada en esta petición."
              }
            },
            "required": [
              "last4"
            ],
            "description": "The key used for this request.",
            "x-description-es": "La clave usada en esta petición."
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^team_[0-9A-Za-z]+$",
              "description": "A team id.",
              "x-description-es": "Un identificador de equipo."
            },
            "description": "The teams this key reads today. Their details are in `GET /v1/teams`.",
            "x-description-es": "Los equipos que lee esta clave hoy. Sus datos están en `GET /v1/teams`."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "teams:read",
                "crm:read",
                "calls:read",
                "messages:read",
                "calendar:read"
              ]
            },
            "description": "The key's scopes: the fixed read set in v1.0a.",
            "x-description-es": "Los permisos de la clave: el conjunto fijo de lectura en v1.0a."
          }
        },
        "required": [
          "object",
          "id",
          "livemode",
          "name",
          "key",
          "teams",
          "scopes"
        ],
        "description": "The integration that owns the key, with the teams the key reads.",
        "x-description-es": "La integración propietaria de la clave, con los equipos que lee.",
        "examples": [
          {
            "object": "integration",
            "id": "prn_m1NFIcoIU8smXfqR4ymgt6j07TfRF",
            "livemode": false,
            "name": "Example CRM sync",
            "key": {
              "last4": "Q7xZ"
            },
            "teams": [
              "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR"
            ],
            "scopes": [
              "teams:read",
              "crm:read",
              "calls:read",
              "messages:read",
              "calendar:read"
            ]
          }
        ]
      },
      "Member": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^mem_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "member",
            "description": "Always `member`.",
            "x-description-es": "Siempre `member`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "team": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "The team this record belongs to.",
            "x-description-es": "El equipo al que pertenece este registro."
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's display name, or first and last name, or null when none is stored. Totem exports no email, phone or role.",
            "x-description-es": "El nombre visible del miembro, o su nombre y apellido, o null si no hay ninguno guardado. Totem no exporta su correo electrónico, su teléfono ni su rol."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "team",
          "display_name"
        ],
        "description": "A team member, by display name only: Totem exports no email, phone or role.",
        "x-description-es": "Un miembro del equipo, solo por su nombre visible: Totem no exporta su correo electrónico, su teléfono ni su rol.",
        "examples": [
          {
            "id": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
            "object": "member",
            "livemode": false,
            "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "display_name": "Sam Lee"
          }
        ]
      },
      "MemberList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "Every Member object, in one response: this list is never paged.",
        "x-description-es": "Todos los objetos Member, en una sola respuesta: esta lista nunca se pagina.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
                "object": "member",
                "livemode": false,
                "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "display_name": "Sam Lee"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      },
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A link to this error's entry in the docs; equal to `doc_url`.",
            "x-description-es": "Enlace a la entrada de este error en la documentación; igual que `doc_url`."
          },
          "title": {
            "type": "string",
            "description": "A short summary of the error, in English. It can change: branch on `code`.",
            "x-description-es": "Resumen breve del error, en inglés. Puede cambiar: decide según `code`."
          },
          "status": {
            "type": "integer",
            "minimum": 400,
            "maximum": 599,
            "description": "The HTTP status.",
            "x-description-es": "El estado HTTP."
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "team_required",
                  "secret_key_in_browser",
                  "invalid_credentials",
                  "key_expired",
                  "insufficient_scope",
                  "plan_not_entitled",
                  "ip_not_allowed",
                  "team_state_restricted",
                  "sector_restricted",
                  "capability_disabled",
                  "resource_missing",
                  "team_not_accessible",
                  "resync_required",
                  "capture_not_ready",
                  "sync_cursor_expired",
                  "rate_limited",
                  "quota_exceeded",
                  "internal_error",
                  "api_disabled",
                  "service_unavailable"
                ]
              },
              {
                "type": "string"
              }
            ],
            "description": "Machine-readable error code. New codes may appear: handle an unknown one by its status.",
            "x-description-es": "Código de error para máquinas. Pueden aparecer códigos nuevos: trata uno desconocido según su estado."
          },
          "request_id": {
            "type": "string",
            "description": "The `Totem-Request-Id` of the request. Quote it when you contact support.",
            "x-description-es": "El `Totem-Request-Id` de la petición. Indícalo cuando escribas a soporte."
          },
          "param": {
            "description": "The parameter, header or body field at fault, when there is one. Never its value.",
            "x-description-es": "El parámetro, la cabecera o el campo del cuerpo que ha fallado, si lo hay. Nunca su valor.",
            "type": "string"
          },
          "doc_url": {
            "type": "string",
            "description": "The docs entry for this code: when it happens and what to do.",
            "x-description-es": "La entrada de la documentación de este código: cuándo ocurre y qué hacer."
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "request_id",
          "doc_url"
        ],
        "description": "An error, as `application/problem+json` (RFC 9457).",
        "x-description-es": "Un error, como `application/problem+json` (RFC 9457).",
        "examples": [
          {
            "type": "https://totemstudio.ai/developers/errors#resource_missing",
            "title": "Resource not found",
            "status": 404,
            "code": "resource_missing",
            "request_id": "req_0f6b2c1e-8d4a-4b7e-9c3f-5a2d1e7b9c40",
            "doc_url": "https://totemstudio.ai/developers/errors#resource_missing"
          }
        ]
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^team_[0-9A-Za-z]+$",
            "description": "Public id of the record.",
            "x-description-es": "Identificador público del registro."
          },
          "object": {
            "type": "string",
            "const": "team",
            "description": "Always `team`.",
            "x-description-es": "Siempre `team`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` for real data; `false` in example data.",
            "x-description-es": "`true` en datos reales; `false` en los datos de ejemplo."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "The team's name as it appears in Totem, or null when none is stored.",
            "x-description-es": "El nombre del equipo tal como aparece en Totem, o null si no hay ninguno guardado."
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "description": "The team's IANA time zone: its business-hours zone when that is valid, otherwise its default country's (Europe/Madrid when neither is set). Interpret the team's local times with it.",
            "x-description-es": "La zona horaria IANA del equipo: la de su horario comercial si es válida; si no, la de su país por defecto (Europe/Madrid si no hay ninguna). Úsala para interpretar las horas locales del equipo."
          },
          "default_country": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The team's default country (ISO 3166-1 alpha-2), which Totem uses when someone types a phone number without a prefix; null when none is set. The API does not apply it: `Lead.phone` is validated without a default country, so a number stored without its country prefix reads `phone_status: invalid`.",
            "x-description-es": "El país por defecto del equipo (ISO 3166-1 alfa-2), que Totem usa cuando alguien escribe un teléfono sin prefijo; null si no hay ninguno. La API no lo aplica: `Lead.phone` se valida sin país por defecto, así que un número guardado sin prefijo de país tiene `phone_status: invalid`."
          }
        },
        "required": [
          "id",
          "object",
          "livemode",
          "name",
          "timezone",
          "default_country"
        ],
        "description": "A team this key reads, with its time zone and default country.",
        "x-description-es": "Un equipo que lee esta clave, con su zona horaria y su país predeterminado.",
        "examples": [
          {
            "id": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
            "object": "team",
            "livemode": false,
            "name": "Example Dental",
            "timezone": "America/New_York",
            "default_country": "US"
          }
        ]
      },
      "TeamList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Always `list`.",
            "x-description-es": "Siempre `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            },
            "description": "The items of this page.",
            "x-description-es": "Los elementos de esta página."
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page follows: fetch it with `next_cursor`, even if this page holds fewer items than `limit`.",
            "x-description-es": "`true` si hay otra página: pídela con `next_cursor`, aunque esta traiga menos elementos que `limit`."
          },
          "next_cursor": {
            "description": "Opaque cursor for the next page, or null on the last page. Never parse it.",
            "x-description-es": "Cursor opaco de la página siguiente, o null en la última. No lo interpretes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "description": "Every Team object, in one response: this list is never paged.",
        "x-description-es": "Todos los objetos Team, en una sola respuesta: esta lista nunca se pagina.",
        "examples": [
          {
            "object": "list",
            "data": [
              {
                "id": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
                "object": "team",
                "livemode": false,
                "name": "Example Dental",
                "timezone": "America/New_York",
                "default_country": "US"
              }
            ],
            "has_more": false,
            "next_cursor": null
          }
        ]
      }
    }
  },
  "x-totem-policy": {
    "ACTIVATION_MARGIN_MS": 60000,
    "ADMIN_ACCESS_DISCLOSURE_VERSION": "2026-10-17",
    "AUDIT_RETENTION_DAYS": 365,
    "AUTH_FAILURE_LIMITS": {
      "perIpPerMinute": 60,
      "perLookupIdPerMinute": 20,
      "banMs": 600000
    },
    "CAPTURE_LAG_FLOOR_MS": 300000,
    "CAPTURE_LAG_P99_MS": null,
    "CURSOR_MAX_AGE_DAYS": 30,
    "DIRTY_TTL_DAYS": 30,
    "FAMILY_TEAM_SCOPE": "explicit_list",
    "FAMILY_TEAM_SCOPE_OPTIONS": [
      "explicit_list",
      "all_family_teams"
    ],
    "FEED_SETTLE_LAG_MS": 10000,
    "GATE_REFRESH_MS": 60000,
    "INTEGRATION_NAME_LENGTH": {
      "min": 2,
      "max": 80
    },
    "INTEGRATION_PURPOSE_LENGTH": {
      "min": 1,
      "max": 280
    },
    "KEY_CACHE_TTL_MS": 5000,
    "KEY_STATS_RETENTION_DAYS": 90,
    "LEAD_RESPONSE_READ_BUDGET": {
      "conversations": 20,
      "messageReads": 200,
      "calls": 50
    },
    "LIST_SCAN_MAX": 1000,
    "MAX_FAMILY_INTEGRATION_TEAMS": 30,
    "MAX_INTEGRATIONS_PER_FAMILY": 10,
    "MAX_IP_ALLOWLIST": 20,
    "PAGE_LIMIT": {
      "default": 25,
      "max": 100
    },
    "PLATFORM_CONFIG_TTL_MS": 15000,
    "REMOVAL_RETENTION_DAYS": 45,
    "REQUEST_BODY_MAX_BYTES": 16384,
    "ROLL_GRACE_DEFAULT_HOURS": 24,
    "ROLL_GRACE_HOURS": [
      0,
      1,
      24,
      168
    ],
    "SEARCH_MAX_RESULTS": 10,
    "SENSITIVE_SECTOR_POLICY": "exclude",
    "SENSITIVE_SECTOR_POLICY_OPTIONS": [
      "exclude",
      "allow"
    ],
    "SYNC_DAILY_BUDGET": {
      "floor": 250000,
      "recordsMultiplier": 3
    },
    "SYNC_VELOCITY": {
      "perMinute": 2000,
      "burst": 10000
    },
    "TEAM_CACHE_TTL_MS": 30000
  },
  "x-totem-errors": {
    "invalid_request": {
      "status": 400,
      "title": "Invalid request",
      "x-title-es": "Petición no válida",
      "action": "fix_request",
      "description": "Something in the request is not valid: an unknown, repeated or out-of-range query parameter, a query string or body on an endpoint that takes none, a cursor issued for another endpoint, filter or team, a malformed `Totem-Team` header, or a body that is not the JSON this endpoint expects. `param` names the parameter, header or field at fault. A conversations cursor is also refused once the conversation it points at has been erased.",
      "x-description-es": "Algo de la petición no es válido: un parámetro de consulta desconocido, repetido o fuera de rango, una cadena de consulta o un cuerpo en un endpoint que no los admite, un cursor emitido para otro endpoint, otros filtros u otro equipo, una cabecera `Totem-Team` mal formada o un cuerpo que no es el JSON que espera el endpoint. `param` indica el parámetro, la cabecera o el campo que ha fallado. Un cursor de conversaciones también se rechaza cuando se suprime la conversación a la que apunta.",
      "fix": "Correct what `param` names before you retry: the same request fails the same way. For a cursor, send the `next_cursor` you received from the same endpoint, with the same filters and team. If a conversations cursor you did not change is refused, start that list again from the first page.",
      "x-fix-es": "Corrige lo que indica `param` antes de reintentar: la misma petición falla igual. Si es un cursor, envía el `next_cursor` que recibiste del mismo endpoint, con los mismos filtros y el mismo equipo. Si se rechaza un cursor de conversaciones que no cambiaste, vuelve a empezar esa lista desde la primera página.",
      "doc_url": "https://totemstudio.ai/developers/errors#invalid_request"
    },
    "team_required": {
      "status": 400,
      "title": "Team required",
      "x-title-es": "Falta el equipo",
      "action": "fix_request",
      "description": "The key reads more than one team and this endpoint reads one team's data, but the request does not say which team.",
      "x-description-es": "La clave lee más de un equipo y este endpoint lee los datos de uno, pero la petición no indica cuál.",
      "fix": "Send the team's id (`team_…`, as listed by `GET /v1/teams`) in the `Totem-Team` header.",
      "x-fix-es": "Envía el identificador del equipo (`team_…`, tal como aparece en `GET /v1/teams`) en la cabecera `Totem-Team`.",
      "doc_url": "https://totemstudio.ai/developers/errors#team_required"
    },
    "secret_key_in_browser": {
      "status": 400,
      "title": "Secret key sent from a browser",
      "x-title-es": "Clave secreta enviada desde un navegador",
      "action": "fix_request",
      "description": "The request carried a secret key together with an `Origin` header, which means it came from a browser. Totem refuses it before reading anything.",
      "x-description-es": "La petición llevaba una clave secreta junto con una cabecera `Origin`, lo que indica que salió de un navegador. Totem la rechaza sin leer nada.",
      "fix": "Call the API only from your server. If the key has been in a web page, a mobile app or a browser extension, treat it as leaked: roll it and mark it as compromised, so the old key stops working at once.",
      "x-fix-es": "Llama a la API solo desde tu servidor. Si la clave ha estado en una página web, una aplicación móvil o una extensión del navegador, dala por filtrada: rótala y márcala como comprometida para que la antigua deje de funcionar al instante.",
      "doc_url": "https://totemstudio.ai/developers/errors#secret_key_in_browser"
    },
    "invalid_credentials": {
      "status": 401,
      "title": "Invalid credentials",
      "x-title-es": "Credenciales no válidas",
      "action": "check_credentials",
      "description": "The `Authorization` header is missing or malformed, or the key is unknown, wrong or revoked, or its integration is no longer active.",
      "x-description-es": "Falta la cabecera `Authorization` o está mal formada, o la clave no existe, es incorrecta o está revocada, o su integración ya no está activa.",
      "fix": "Send `Authorization: Bearer <key>` with a current secret key. Do not retry in a loop: repeated failures from one IP address, or against one key, lock it out for a while with `429 rate_limited`.",
      "x-fix-es": "Envía `Authorization: Bearer <clave>` con una clave secreta vigente. No reintentes en bucle: muchos fallos desde la misma dirección IP, o con la misma clave, la bloquean durante un tiempo con `429 rate_limited`.",
      "doc_url": "https://totemstudio.ai/developers/errors#invalid_credentials"
    },
    "key_expired": {
      "status": 401,
      "title": "Key expired",
      "x-title-es": "Clave caducada",
      "action": "check_credentials",
      "description": "The key was rolled and its grace period is over.",
      "x-description-es": "La clave se rotó y su periodo de gracia ha terminado.",
      "fix": "Deploy the key that replaced it: the old key is past its grace period and will not work again. If there is no replacement, create a new key in Settings → Developers.",
      "x-fix-es": "Despliega la clave que la sustituyó: la antigua ya superó su periodo de gracia y no volverá a funcionar. Si no hay ninguna que la sustituya, crea una clave nueva en Ajustes → Desarrolladores.",
      "doc_url": "https://totemstudio.ai/developers/errors#key_expired"
    },
    "insufficient_scope": {
      "status": 403,
      "title": "Insufficient scope",
      "x-title-es": "Permisos insuficientes",
      "action": "contact_support",
      "description": "The key lacks a permission this endpoint needs. Every v1.0a key holds the full read set, so this should not happen.",
      "x-description-es": "A la clave le falta un permiso que necesita este endpoint. Todas las claves de la versión 1.0a tienen el conjunto completo de lectura, así que no debería ocurrir.",
      "fix": "Contact support and quote the `Totem-Request-Id` of the response.",
      "x-fix-es": "Escribe a soporte e indica el `Totem-Request-Id` de la respuesta.",
      "doc_url": "https://totemstudio.ai/developers/errors#insufficient_scope"
    },
    "plan_not_entitled": {
      "status": 403,
      "title": "Plan not entitled",
      "x-title-es": "El plan no incluye la API",
      "action": "keep_and_retry",
      "description": "The organization's plan does not include the Totem API at the moment.",
      "x-description-es": "El plan de la organización no incluye ahora mismo la API de Totem.",
      "fix": "Keep your data and cursors, and pause calls until the customer has a plan with API access again; then continue where you left off. While access is refused, the feed delivers nothing for the key's teams, removals included: if the refusal lasts longer than your retention policy allows, delete your copy.",
      "x-fix-es": "Conserva tus datos y tus cursores y deja de llamar hasta que el cliente vuelva a tener un plan con acceso a la API; después, continúa donde lo dejaste. Mientras el acceso está denegado, el feed no entrega nada de los equipos de la clave, tampoco eliminaciones: si la denegación dura más de lo que permite tu política de conservación, borra tu copia.",
      "doc_url": "https://totemstudio.ai/developers/errors#plan_not_entitled"
    },
    "ip_not_allowed": {
      "status": 403,
      "title": "IP address not allowed",
      "x-title-es": "Dirección IP no permitida",
      "action": "check_credentials",
      "description": "The key is valid, but the request came from an IP address outside the integration's allowlist.",
      "x-description-es": "La clave es válida, pero la petición salió de una dirección IP que no está en la lista de IP permitidas de la integración.",
      "fix": "Call from an allowed address, or ask an administrator to add yours to the allowlist in Settings → Developers.",
      "x-fix-es": "Llama desde una dirección permitida o pide a un administrador que añada la tuya a la lista en Ajustes → Desarrolladores.",
      "doc_url": "https://totemstudio.ai/developers/errors#ip_not_allowed"
    },
    "team_state_restricted": {
      "status": 403,
      "title": "Team restricted",
      "x-title-es": "Equipo restringido",
      "action": "keep_and_retry",
      "description": "The team is restricted for now: it is disabled (for example, suspended for non-payment), archived or billing-only, or its API access is paused. `GET /v1/teams` still lists it.",
      "x-description-es": "El equipo está restringido por ahora: está desactivado (por ejemplo, suspendido por impago), archivado o es solo de facturación, o tiene pausado el acceso a la API. `GET /v1/teams` lo sigue mostrando.",
      "fix": "Keep the team's data and cursor, skip it for this run and try again later. The key's other teams are not affected. While the team is restricted, the feed delivers nothing for it, removals included: if the restriction lasts longer than your retention policy allows, delete the team's copy.",
      "x-fix-es": "Conserva los datos y el cursor del equipo, omítelo en esta ejecución y vuelve a intentarlo más tarde. Los demás equipos de la clave no se ven afectados. Mientras el equipo está restringido, el feed no entrega nada de él, tampoco eliminaciones: si la restricción dura más de lo que permite tu política de conservación, borra la copia del equipo.",
      "doc_url": "https://totemstudio.ai/developers/errors#team_state_restricted"
    },
    "sector_restricted": {
      "status": 403,
      "title": "Sector restricted",
      "x-title-es": "Sector restringido",
      "action": "keep_and_retry",
      "description": "Totem does not export this team's data through the API because the team works in a sensitive sector, such as health care, where its records can reveal health information.",
      "x-description-es": "Totem no exporta los datos de este equipo por la API porque el equipo trabaja en un sector sensible, como el sanitario, en el que sus registros pueden revelar información de salud.",
      "fix": "Skip the team: waiting does not change this. The feed delivers nothing for it, removals included, so keep what you already have only as long as your retention policy allows, then delete the team's copy. Talk to the customer or to Totem if you need its data.",
      "x-fix-es": "Omite el equipo: esperar no lo cambia. El feed no entrega nada de él, tampoco eliminaciones, así que conserva lo que ya tengas solo mientras lo permita tu política de conservación y después borra la copia del equipo. Si necesitas sus datos, habla con el cliente o con Totem.",
      "doc_url": "https://totemstudio.ai/developers/errors#sector_restricted"
    },
    "capability_disabled": {
      "status": 403,
      "title": "Capability disabled",
      "x-title-es": "Función desactivada",
      "action": "keep_and_retry",
      "description": "Totem has temporarily switched this endpoint off for every key.",
      "x-description-es": "Totem ha desactivado temporalmente este endpoint para todas las claves.",
      "fix": "Keep your data and cursors and try again later; the other endpoints keep working.",
      "x-fix-es": "Conserva tus datos y tus cursores y vuelve a intentarlo más tarde; el resto de endpoints sigue funcionando.",
      "doc_url": "https://totemstudio.ai/developers/errors#capability_disabled"
    },
    "resource_missing": {
      "status": 404,
      "title": "Resource not found",
      "x-title-es": "Recurso no encontrado",
      "action": "fix_request",
      "description": "The record does not exist, was removed, belongs to a team this key does not read, or was created so recently that Totem has not prepared it yet. A `GET` or `POST` under `/v1/` that matches no endpoint also gets this code. Any other method, and any path outside `/v1/`, gets a plain `404` from the firewall in front of the API, with no problem body and no `Totem-Request-Id`.",
      "x-description-es": "El registro no existe, se eliminó, pertenece a un equipo que esta clave no lee o se creó hace tan poco que Totem aún no lo ha preparado. Un `GET` o un `POST` bajo `/v1/` que no corresponde a ningún endpoint también recibe este código. Cualquier otro método, y cualquier ruta fuera de `/v1/`, recibe un `404` simple del cortafuegos que protege la API, sin cuerpo de error ni `Totem-Request-Id`.",
      "fix": "Check the id and the path. If the record was created moments ago, do not retry in a loop: the changes feed delivers it as soon as it is ready.",
      "x-fix-es": "Comprueba el identificador y la ruta. Si el registro se acaba de crear, no reintentes en bucle: el feed de cambios lo entregará en cuanto esté listo.",
      "doc_url": "https://totemstudio.ai/developers/errors#resource_missing"
    },
    "team_not_accessible": {
      "status": 404,
      "title": "Team not accessible",
      "x-title-es": "Equipo no accesible",
      "action": "drop_team",
      "description": "The `Totem-Team` header names a team this key does not read: one it never covered, one removed from the key or from the organization, or one that was deleted. Without the header, it means the key no longer reads any team.",
      "x-description-es": "La cabecera `Totem-Team` indica un equipo que esta clave no lee: uno que nunca incluyó, uno que se quitó de la clave o de la organización, o uno que se eliminó. Sin la cabecera, significa que la clave ya no lee ningún equipo.",
      "fix": "Re-read `GET /v1/teams` before you act. If the team is no longer listed, delete its copy and its cursor; if it is still listed, keep everything and try again on the next run.",
      "x-fix-es": "Vuelve a leer `GET /v1/teams` antes de actuar. Si el equipo ya no aparece, borra su copia y su cursor; si sigue apareciendo, conserva todo y vuelve a intentarlo en la siguiente ejecución.",
      "doc_url": "https://totemstudio.ai/developers/errors#team_not_accessible"
    },
    "resync_required": {
      "status": 409,
      "title": "Resync required",
      "x-title-es": "Hay que volver a sincronizar",
      "action": "resync",
      "description": "Totem cannot continue the feed from this cursor: the data was restored from a backup, or a gap was found in the team's changes.",
      "x-description-es": "Totem no puede continuar el feed desde este cursor: los datos se restauraron desde una copia de seguridad o se detectó un hueco en los cambios del equipo.",
      "fix": "Run a full resync: forget the versions you stored for the team, read the feed again without a cursor, and once it has caught up delete every local record of the team it did not deliver. Keep using your current copy until then.",
      "x-fix-es": "Haz una resincronización completa: olvida las versiones que guardaste del equipo, vuelve a leer el feed sin cursor y, cuando estés al día, borra los registros locales del equipo que no hayan llegado. Hasta entonces, sigue usando tu copia actual.",
      "doc_url": "https://totemstudio.ai/developers/errors#resync_required"
    },
    "capture_not_ready": {
      "status": 409,
      "title": "Team data is still being prepared",
      "x-title-es": "Los datos del equipo aún se están preparando",
      "action": "wait_capture",
      "description": "Totem is still preparing this team's data for the API. This happens once per team, after it is first added to any key; adding it to another key later does not repeat it.",
      "x-description-es": "Totem aún está preparando los datos de este equipo para la API. Ocurre una sola vez por equipo, después de que se añada por primera vez a una clave; añadirlo después a otra clave no lo repite.",
      "fix": "Keep whatever you hold for the team and try again in a few minutes; the key's other teams keep syncing meanwhile.",
      "x-fix-es": "Conserva lo que tengas del equipo y vuelve a intentarlo dentro de unos minutos; mientras tanto, los demás equipos de la clave siguen sincronizándose.",
      "doc_url": "https://totemstudio.ai/developers/errors#capture_not_ready"
    },
    "sync_cursor_expired": {
      "status": 410,
      "title": "Sync cursor expired",
      "x-title-es": "Cursor de sincronización caducado",
      "action": "resync",
      "description": "The cursor is more than 30 days old, counted from the point in the feed it reached (or, while an initial sync is still running, from when that sync started).",
      "x-description-es": "El cursor tiene más de 30 días, contados desde el punto del feed al que llegó (o, mientras una carga inicial sigue en curso, desde que empezó).",
      "fix": "Run a full resync, as for `resync_required`. To prevent it, save the `next_cursor` of every page, empty pages included: the cursor of a team you poll regularly never ages out.",
      "x-fix-es": "Haz una resincronización completa, como con `resync_required`. Para evitarlo, guarda el `next_cursor` de cada página, también de las vacías: el cursor de un equipo que consultas con regularidad nunca caduca.",
      "doc_url": "https://totemstudio.ai/developers/errors#sync_cursor_expired"
    },
    "rate_limited": {
      "status": 429,
      "title": "Rate limited",
      "x-title-es": "Límite de frecuencia superado",
      "action": "retry_after",
      "description": "The key went over its rate limit (items per minute), or too many failed authentication attempts from this IP address or against this key have locked it out for a while.",
      "x-description-es": "La clave ha superado su límite de frecuencia (elementos por minuto), o demasiados intentos de autenticación fallidos desde esta dirección IP o con esta clave la han bloqueado durante un tiempo.",
      "fix": "Wait the seconds in `Retry-After`, then retry the same request. Each request sets aside its full `limit` up front and gives back what it does not use, so a smaller `limit` keeps a nearly spent allowance moving.",
      "x-fix-es": "Espera los segundos que indica `Retry-After` y repite la misma petición. Cada petición aparta su `limit` completo al empezar y devuelve lo que no usa, así que con un `limit` más pequeño avanzas aunque quede poco margen.",
      "doc_url": "https://totemstudio.ai/developers/errors#rate_limited"
    },
    "quota_exceeded": {
      "status": 429,
      "title": "Daily quota exceeded",
      "x-title-es": "Cuota diaria superada",
      "action": "retry_after",
      "description": "The key has spent its daily quota of items. Every item returned by the changes feed and by every list counts toward it, including `GET /v1/teams`, `GET /v1/members`, `GET /v1/booking_services` and a lead's activities. The quota resets at 00:00 UTC.",
      "x-description-es": "La clave ha consumido su cuota diaria de elementos. Para la cuota cuenta cada elemento que devuelven el feed de cambios y todas las listas, incluidas `GET /v1/teams`, `GET /v1/members`, `GET /v1/booking_services` y las actividades de un lead. La cuota se renueva a las 00:00 UTC.",
      "fix": "Stop syncing until 00:00 UTC (`Retry-After` counts the seconds) and resume then with the same cursor: nothing is lost. Requests for one record, such as `GET /v1/leads/{id}`, search and `GET /v1/me` do not count toward the quota and keep working.",
      "x-fix-es": "Deja de sincronizar hasta las 00:00 UTC (`Retry-After` indica los segundos que faltan) y continúa entonces con el mismo cursor: no se pierde nada. Las peticiones de un solo registro, como `GET /v1/leads/{id}`, la búsqueda y `GET /v1/me` no cuentan para la cuota y siguen funcionando.",
      "doc_url": "https://totemstudio.ai/developers/errors#quota_exceeded"
    },
    "internal_error": {
      "status": 500,
      "title": "Internal error",
      "x-title-es": "Error interno",
      "action": "backoff",
      "description": "Something went wrong inside Totem while answering this request.",
      "x-description-es": "Algo ha fallado dentro de Totem al responder a esta petición.",
      "fix": "Retry with exponential backoff. If it keeps failing, contact support and quote the `Totem-Request-Id`.",
      "x-fix-es": "Reintenta con una espera exponencial. Si sigue fallando, escribe a soporte e indica el `Totem-Request-Id`.",
      "doc_url": "https://totemstudio.ai/developers/errors#internal_error"
    },
    "api_disabled": {
      "status": 503,
      "title": "API disabled",
      "x-title-es": "API desactivada",
      "action": "backoff",
      "description": "Totem has temporarily switched the API off for every key.",
      "x-description-es": "Totem ha desactivado temporalmente la API para todas las claves.",
      "fix": "Keep your data and cursors and retry later with exponential backoff.",
      "x-fix-es": "Conserva tus datos y tus cursores y reintenta más tarde con una espera exponencial.",
      "doc_url": "https://totemstudio.ai/developers/errors#api_disabled"
    },
    "service_unavailable": {
      "status": 503,
      "title": "Service unavailable",
      "x-title-es": "Servicio no disponible",
      "action": "backoff",
      "description": "Reserved: the API itself does not return this code today. A `503` from the load balancer or the hosting platform in front of the API arrives without a problem body; treat it like this code.",
      "x-description-es": "Reservado: la API no devuelve hoy este código. Un `503` del balanceador de carga o de la plataforma que aloja la API llega sin cuerpo de error; trátalo como este código.",
      "fix": "Retry with exponential backoff; your data and cursors stay valid.",
      "x-fix-es": "Reintenta con una espera exponencial; tus datos y tus cursores siguen siendo válidos.",
      "doc_url": "https://totemstudio.ai/developers/errors#service_unavailable"
    }
  }
}
