Accueil / API Labrika : modèles de données et métadonnées

API Labrika : modèles de données et métadonnées

API Labrika : modèles de données et métadonnées. Requêtes HTTP, paramètres, schémas de réponse et procédures Labrika.

Dans cet article

Référence des méthodes API — Meta

Choisissez une méthode dans le sommaire. Vérifiez la méthode HTTP, le chemin, les autorisations, les paramètres obligatoires et le corps. Les blocs JSON contenant schema, properties et $ref décrivent le contrat ; ne les envoyez pas comme corps de requête. Les exemples de requêtes et les schémas de réponse sont identifiés séparément.

Méthodes de cette section

GET /public-api/v1/account/balances

Consultez le solde du compte et les limites restantes. Le bac à sable renvoie des données de démonstration.

Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · AccountBalances · ErrorResponse

Autorisations: account-balances:read

Réponses

200

Consultez le solde du compte et les limites restantes. Le bac à sable renvoie des données de démonstration.

{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountBalances"
          }
        }
      }
    }
  }
}
401

Sans clé valide, les en-têtes de limite concernent les tentatives échouées par IP. Après authentification, ils concernent la clé ou le compte. Ils peuvent être absents en cas de blocage préalable ou de compteur indisponible. X-RateLimit-Reset est un horodatage Unix en secondes ; Retry-After pour 429 est un délai en secondes.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}
403
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}
429
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}
500
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/me

Réponses

Modèles de données associés: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · MeResponse

200

Contexte de la clé API.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MeResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

Retour au sommaire

Modèles de données

Cette section définit les paramètres, en-têtes, réponses et objets. Un $ref renvoie à la définition du même nom. Conservez exactement les noms de champs, les valeurs enum et les champs obligatoires ; example est une illustration, pas une donnée de votre compte.

Modèles de données associés

CacheControl

Réponse privée qui ne doit pas être stockée.

{
  "schema": {
    "type": "string",
    "example": "private, no-store"
  }
}

RateLimitLimit

Requêtes autorisées dans la fenêtre actuelle.

{
  "schema": {
    "type": "integer"
  }
}

RateLimitRemaining

Requêtes restantes dans la fenêtre actuelle.

{
  "schema": {
    "type": "integer"
  }
}

RateLimitResetAt

Horodatage Unix de la réinitialisation de la limite actuelle de requêtes.

{
  "schema": {
    "type": "integer",
    "format": "int64"
  }
}

RetryAfter

Délai en secondes avant de réessayer une requête soumise à une limitation de fréquence.

{
  "schema": {
    "type": "integer",
    "minimum": 1
  }
}

XRequestID

Identifiant de requête pour le diagnostic.

{
  "schema": {
    "type": "string"
  }
}

CollectedAt

Répétez ce paramètre pour 1 à 51 dates uniques renvoyées par listSitePositionDates, ou transmettez `last` une seule fois.

{
  "name": "collected_at",
  "in": "query",
  "required": true,
  "style": "form",
  "explode": true,
  "schema": {
    "type": "array",
    "minItems": 1,
    "maxItems": 51,
    "uniqueItems": true,
    "items": {
      "$ref": "#/components/schemas/CollectedAtValue"
    }
  }
}

CreatedFrom

{
  "name": "created_from",
  "in": "query",
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

CreatedTo

{
  "name": "created_to",
  "in": "query",
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

DatesLimit

{
  "name": "limit",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 100,
    "default": 100
  }
}

DiffProjectID

{
  "name": "id",
  "in": "path",
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

DryRun

{
  "name": "dry_run",
  "in": "query",
  "schema": {
    "type": "boolean",
    "default": false
  }
}

IdempotencyKey

{
  "name": "Idempotency-Key",
  "in": "header",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 255
  }
}

IncludeState

{
  "name": "include_state",
  "in": "query",
  "schema": {
    "type": "boolean",
    "default": false
  }
}

KeywordSearch

{
  "name": "search",
  "in": "query",
  "schema": {
    "type": "string",
    "maxLength": 256
  }
}

Limit

{
  "name": "limit",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}

Offset

{
  "name": "offset",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

OperationIdempotencyKey

{
  "name": "Idempotency-Key",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._:-]+$"
  }
}

PositionsLimit

{
  "name": "limit",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 100,
    "default": 100
  }
}

ReportIDOrLast

Xid du rapport ou valeur littérale last. La valeur last est acceptée uniquement dans ce paramètre de chemin.

{
  "name": "report_id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}

RuleID

{
  "name": "rule_id",
  "in": "path",
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

RunID

{
  "name": "run_id",
  "in": "path",
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

RunsLimit

{
  "name": "limit",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 100
  }
}

SearchEngineID

{
  "name": "search_engine_id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "integer",
    "format": "int64",
    "minimum": 1
  }
}

SiteUUID

Identifiant opaque du site Labrika renvoyé par listSites.

{
  "name": "site_uuid",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[a-f0-9]{32}$"
  }
}

SitesLimit

{
  "name": "limit",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 100,
    "default": 100
  }
}

SuggestionRunID

{
  "name": "run_id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[0-9a-v]{20}$"
  }
}

TodoItemID

{
  "name": "item_id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[0-9a-v]{20}$"
  }
}

TriggerCode

{
  "name": "trigger_code",
  "in": "query",
  "schema": {
    "type": "string"
  }
}

URLMD5

{
  "name": "url_md5",
  "in": "path",
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/URLMD5"
  }
}

DiffAlertListHTTP

Alertes.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertListResponse"
      }
    }
  }
}

DiffAlertSummaryHTTP

Synthèse des alertes.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertSummaryResponse"
      }
    }
  }
}

DiffAlertTimeseriesHTTP

Séries temporelles des alertes.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertTimeseriesResponse"
      }
    }
  }
}

DiffBalanceHTTP

Solde et options de paiement.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffBalanceResponse"
      }
    }
  }
}

DiffCostHTTP

Estimation du coût signée.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffCostResponse"
      }
    }
  }
}

DiffPageDetailHTTP

Détails de la page Diff.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffPageDetailResponse"
      }
    }
  }
}

DiffProjectListHTTP

Projets Diff.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffProjectListResponse"
      }
    }
  }
}

DiffReportGraphHTTP

Graphique du rapport Diff.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportGraphResponse"
      }
    }
  }
}

DiffReportListHTTP

Rapports Diff.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportListResponse"
      }
    }
  }
}

DiffReportRowsHTTP

Lignes du rapport Diff.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportRowsResponse"
      }
    }
  }
}

DiffRuleExpectedHTTPStatusesHTTP

Statuts HTTP attendus.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleExpectedHTTPStatusesResponse"
      }
    }
  }
}

DiffRuleHTTP

Règle d’alerte.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleResponse"
      }
    }
  }
}

DiffRuleListHTTP

Règles d’alerte.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleListResponse"
      }
    }
  }
}

DiffRunHTTP

Exécution Diff.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunResponse"
      }
    }
  }
}

DiffRunListHTTP

Exécutions Diff.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunListResponse"
      }
    }
  }
}

DiffURLAddHTTP

Résultat de l’ajout d’URL.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLAddResponse"
      }
    }
  }
}

DiffURLListHTTP

URL surveillées.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLListResponse"
      }
    }
  }
}

DiffURLRulePatchHTTP

Résultat de l’attribution d’une règle à une URL.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLRulePatchResponse"
      }
    }
  }
}

ErrorHTTP

Sans clé valide, les en-têtes de limite concernent les tentatives échouées par IP. Après authentification, ils concernent la clé ou le compte. Ils peuvent être absents en cas de blocage préalable ou de compteur indisponible. X-RateLimit-Reset est un horodatage Unix en secondes ; Retry-After pour 429 est un délai en secondes.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

ErrorHeadHTTP

Erreur de l’API publique.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  }
}

MainReportRateLimitHTTP

Erreur de l’API publique.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MainReportRateLimitErrorResponse"
      }
    }
  }
}

MeHTTP

Contexte de la clé API.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MeResponse"
      }
    }
  }
}

PrometheusMetricsHTTP

Format texte Prometheus avec uniquement des étiquettes de faible cardinalité.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "text/plain": {
      "schema": {
        "type": "string"
      }
    }
  }
}

SERPDateListHTTP

Dates disponibles de vérification des positions.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SERPDateListResponse"
      }
    }
  }
}

SERPPositionListHTTP

Mots-clés et positions pour les dates demandées.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SERPPositionListResponse"
      }
    }
  }
}

SERPSiteListHTTP

Sites disponibles pour le suivi des positions.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SERPSiteListResponse"
      },
      "example": {
        "data": [
          {
            "site_uuid": "b97da53fc2d0465db8830d543082b5f5",
            "host": "example.com",
            "title": "Exemple",
            "search_engines": [
              {
                "id": 12345,
                "engine_title": "Google",
                "region_title": "United States",
                "device": "desktop"
              }
            ]
          }
        ],
        "pagination": {
          "limit": 100,
          "offset": 0,
          "next_offset": null,
          "has_more": false
        }
      }
    }
  }
}

AIVisibilityCostInput

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "payment_option": {
      "type": "string",
      "enum": [
        "ai_credits",
        "money_balance"
      ]
    },
    "settings": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "domain",
        "brand",
        "prompts",
        "models"
      ],
      "properties": {
        "domain": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "example": "example.com"
        },
        "brand": {
          "type": "string",
          "minLength": 3,
          "maxLength": 50,
          "example": "Example"
        },
        "aliases": {
          "type": "array",
          "maxItems": 8,
          "items": {
            "type": "string",
            "minLength": 3,
            "maxLength": 50
          }
        },
        "prompts": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2000,
          "items": {
            "type": "string",
            "minLength": 10,
            "maxLength": 255
          }
        },
        "models": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "type": "string"
          }
        },
        "competitors": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "domain"
            ],
            "properties": {
              "domain": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "brand": {
                "type": "string",
                "minLength": 3,
                "maxLength": 50
              },
              "aliases": {
                "type": "array",
                "maxItems": 8,
                "items": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 50
                }
              }
            }
          }
        }
      }
    }
  }
}

AIVisibilityEstimateResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "ai_credits",
        "money_equivalent_minor",
        "amount_minor",
        "currency",
        "idempotency_key",
        "cost_estimate_id",
        "expires_at",
        "can_start",
        "details"
      ],
      "properties": {
        "ai_credits": {
          "type": "integer",
          "format": "int64"
        },
        "money_equivalent_minor": {
          "type": "integer",
          "format": "int64"
        },
        "amount_minor": {
          "type": "integer",
          "format": "int64"
        },
        "currency": {
          "type": "string"
        },
        "can_start": {
          "type": "boolean"
        },
        "idempotency_key": {
          "type": "string"
        },
        "cost_estimate_id": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "details": {
          "type": "object",
          "properties": {
            "credits_payment_available": {
              "type": "boolean"
            },
            "money_payment_available": {
              "type": "boolean"
            },
            "updates_settings": {
              "type": "boolean"
            }
          }
        }
      }
    }
  }
}

AIVisibilityModelsResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "model",
          "title",
          "selected"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "selected": {
            "type": "boolean"
          }
        }
      }
    }
  }
}

AIVisibilityRunResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "site_uuid",
        "report_id",
        "started",
        "report_url"
      ],
      "properties": {
        "site_uuid": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$"
        },
        "report_id": {
          "type": "string",
          "pattern": "^[0-9a-v]{20}$"
        },
        "started": {
          "type": "boolean",
          "enum": [
            true
          ]
        },
        "report_url": {
          "type": "string"
        }
      }
    }
  }
}

AIVisibilitySiteInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "host",
    "report_type"
  ],
  "properties": {
    "host": {
      "type": "string",
      "minLength": 3,
      "maxLength": 2048,
      "example": "example.com"
    },
    "title": {
      "type": "string",
      "maxLength": 250
    },
    "report_type": {
      "type": "string",
      "enum": [
        "ai_visibility"
      ]
    },
    "create_new": {
      "type": "boolean",
      "description": "Créer explicitement un autre projet pour un domaine existant."
    }
  }
}

AIWriterBalance

{
  "type": "object",
  "required": [
    "total_credits"
  ],
  "properties": {
    "total_credits": {
      "type": "integer",
      "minimum": 0
    }
  }
}

AIWriterOptimizationCost

{
  "type": "object",
  "required": [
    "cost",
    "total_credits",
    "remaining_credits",
    "has_enough_credits"
  ],
  "properties": {
    "cost": {
      "type": "integer"
    },
    "total_credits": {
      "type": "integer"
    },
    "remaining_credits": {
      "type": "integer",
      "minimum": 0
    },
    "has_enough_credits": {
      "type": "boolean"
    }
  }
}

AIWriterOptimizationDocument

{
  "type": "object",
  "required": [
    "document_id",
    "status"
  ],
  "properties": {
    "document_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "success",
        "error"
      ]
    },
    "retry_after_seconds": {
      "type": "integer"
    },
    "progress_percent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "h1": {
      "type": "string"
    },
    "content": {
      "type": "string"
    },
    "annotated_content": {
      "type": "string",
      "description": "Copie du HTML optimisé pour la relecture. L’attribut data-labrika-seo des éléments mark identifie les mots-clés et la sémantique latente. Renvoyée après une optimisation réussie.",
      "example": "<p><mark data-labrika-seo=\"keyword\">coffee maker</mark> with a <mark data-labrika-seo=\"hidden-semantic\">reusable filter</mark></p>"
    },
    "credits_spent": {
      "type": "integer",
      "minimum": 0,
      "description": "Crédits AI Writer réellement débités après une optimisation réussie. Renvoyé uniquement lorsque status=success."
    },
    "seo_score": {
      "type": "number",
      "format": "double",
      "minimum": 0,
      "maximum": 100,
      "multipleOf": 0.01,
      "description": "Score SEO de 0 à 100, arrondi à deux décimales."
    },
    "recommended_words_min": {
      "type": "integer"
    },
    "recommended_words_max": {
      "type": "integer"
    },
    "actual_words": {
      "type": "integer"
    },
    "error_code": {
      "type": "string"
    }
  }
}

AIWriterOptimizationEstimate

{
  "allOf": [
    {
      "$ref": "#/components/schemas/AIWriterOptimizationCost"
    },
    {
      "type": "object",
      "required": [
        "estimate_id",
        "expires_at"
      ],
      "properties": {
        "estimate_id": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  ]
}

AIWriterOptimizationEstimatePending

{
  "type": "object",
  "required": [
    "estimate_id",
    "expires_at",
    "retry_after_seconds"
  ],
  "properties": {
    "estimate_id": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "retry_after_seconds": {
      "type": "integer"
    }
  }
}

AIWriterOptimizationRequest

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "keywords",
    "search_engine",
    "region_code",
    "language",
    "title",
    "description",
    "h1",
    "content"
  ],
  "properties": {
    "estimate_id": {
      "type": "string",
      "pattern": "^[0-9a-v]{20}$",
      "description": "Requis pour démarrer avec adjust_text_length=true. Utilisez la réponse de coût prête pour une demande identique ; valable une heure et pour un seul lancement."
    },
    "keywords": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10,
      "items": {
        "type": "string"
      }
    },
    "search_engine": {
      "$ref": "#/components/schemas/SearchEngine"
    },
    "region_code": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[0-9]+$",
      "description": "Identifiant numérique de la cible géographique pour le moteur de recherche sélectionné. Pour Google, utilisez le Criteria ID disponible sur https://developers.google.com/google-ads/api/data/geotargets."
    },
    "language": {
      "$ref": "#/components/schemas/SiteLanguage"
    },
    "title": {
      "type": "string",
      "maxLength": 256
    },
    "description": {
      "type": "string",
      "maxLength": 500
    },
    "h1": {
      "type": "string",
      "maxLength": 256
    },
    "content": {
      "type": "string",
      "maxLength": 512000,
      "description": "HTML à optimiser, limité à 512000 caractères Unicode. Avec adjust_text_length=false, le coût dépend de son nombre de mots ; avec true, du maximum recommandé préparé."
    },
    "adjust_text_length": {
      "type": "boolean",
      "default": true
    }
  }
}

AIWriterOptimizationStart

{
  "allOf": [
    {
      "$ref": "#/components/schemas/AIWriterOptimizationCost"
    },
    {
      "type": "object",
      "required": [
        "document_id",
        "status"
      ],
      "properties": {
        "document_id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending"
          ]
        }
      }
    }
  ]
}

APIKeyInfo

{
  "type": "object",
  "required": [
    "id",
    "name",
    "mode",
    "prefix",
    "last4",
    "scopes",
    "created_at",
    "expires_at"
  ],
  "properties": {
    "id": {
      "$ref": "#/components/schemas/XID"
    },
    "name": {
      "type": "string"
    },
    "mode": {
      "$ref": "#/components/schemas/APIKeyMode"
    },
    "prefix": {
      "type": "string"
    },
    "last4": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/APIKeyScope"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time"
    }
  }
}

APIKeyMode

{
  "type": "string",
  "enum": [
    "live",
    "test"
  ]
}

APIKeyScope

{
  "type": "string",
  "enum": [
    "sites:create",
    "sites:activate",
    "serp:import",
    "specialist-requests:write",
    "ai-visibility:run",
    "todo:read",
    "todo:write",
    "account-balances:read",
    "site-audits:run",
    "serp:run",
    "serm:run",
    "workplans:create",
    "schedules:read",
    "schedules:write",
    "diff-schedules:read",
    "diff-schedules:write",
    "project-groups:read",
    "project-groups:write",
    "serp:checks",
    "domain-keywords:run",
    "prompt-suggestions:run",
    "workplans:read",
    "workplans:write",
    "workplans:files:read",
    "workplans:files:write",
    "workplans:comments:read",
    "workplans:comments:write",
    "site-reports:download",
    "serm:read",
    "main-reports:read",
    "main-reports:export",
    "diff-projects:read",
    "diff-reports:read",
    "diff-htmlfiles:read",
    "diff-screenshot:read",
    "diff-alerts:read",
    "diff-urls:read",
    "diff-urls:write",
    "diff-rules:read",
    "diff-rules:write",
    "diff-reports:run",
    "serp:read",
    "ai-writer:read",
    "ai-optimization:read",
    "ai-optimization:write",
    "ai-expert-articles:read",
    "ai-expert-articles:write",
    "ai-product-descriptions:read",
    "ai-product-descriptions:write"
  ]
}

AccountBalances

{
  "type": "object",
  "required": [
    "balance",
    "audit_subscriptions",
    "ai_credit_packs",
    "workplan"
  ],
  "properties": {
    "balance": {
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "string",
          "pattern": "^-?[0-9]+[.][0-9]{6}$",
          "example": "125.200000"
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$",
          "example": "USD"
        }
      }
    },
    "audit_subscriptions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "group_id",
          "title",
          "expires_at",
          "page_crawling_credits_remaining",
          "search_engine_credits_remaining"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "c0000000000000000000g"
          },
          "group_id": {
            "type": "string",
            "example": "c00000000000000000010"
          },
          "title": {
            "type": "string",
            "example": "Demo audit"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "page_crawling_credits_remaining": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "example": 3450
          },
          "search_engine_credits_remaining": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "example": 1220
          }
        }
      }
    },
    "ai_credit_packs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "title",
          "expires_at",
          "credits_remaining"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "c00000000000000000020"
          },
          "title": {
            "type": "string",
            "example": "Demo AI credits"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "credits_remaining": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "example": 480
          }
        }
      }
    },
    "workplan": {
      "type": "object",
      "nullable": true,
      "required": [
        "title",
        "expires_at",
        "projects_remaining",
        "contacts_remaining",
        "templates_remaining",
        "storage_bytes_free"
      ],
      "properties": {
        "title": {
          "type": "string",
          "example": "Demo Workplan"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time",
          "nullable": true
        },
        "projects_remaining": {
          "type": "integer",
          "format": "int64",
          "minimum": 0,
          "example": 3
        },
        "contacts_remaining": {
          "type": "integer",
          "format": "int64",
          "minimum": 0,
          "example": 10
        },
        "templates_remaining": {
          "type": "integer",
          "format": "int64",
          "minimum": 0,
          "example": 2
        },
        "storage_bytes_free": {
          "type": "integer",
          "format": "int64",
          "minimum": 0,
          "example": 10485760
        }
      }
    }
  }
}

ActiveTodoTimerResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "nullable": true,
      "required": [
        "id",
        "started_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[0-9a-v]{20}$"
        },
        "started_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}

AddSiteInput

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/SiteCreationInput"
    },
    {
      "$ref": "#/components/schemas/AIVisibilitySiteInput"
    }
  ]
}

AnalysisEstimate

{
  "type": "object",
  "required": [
    "operation",
    "target",
    "amount_minor",
    "currency",
    "page_credits",
    "search_credits",
    "idempotency_key",
    "cost_estimate_id",
    "expires_at"
  ],
  "properties": {
    "operation": {
      "type": "string"
    },
    "target": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "page_credits": {
      "type": "integer",
      "format": "int64"
    },
    "search_credits": {
      "type": "integer",
      "format": "int64"
    },
    "payer": {
      "type": "string",
      "enum": [
        "your_account",
        "site_owner"
      ]
    },
    "payment_option": {
      "type": "string"
    },
    "extra_pages": {
      "type": "integer",
      "format": "int64"
    },
    "extra_search": {
      "type": "integer",
      "format": "int64"
    },
    "amount_minor": {
      "type": "number"
    },
    "currency": {
      "type": "string"
    },
    "depth": {
      "type": "integer"
    },
    "can_start": {
      "type": "boolean"
    },
    "already_paid": {
      "type": "boolean"
    },
    "details": {
      "type": "object",
      "additionalProperties": true
    },
    "idempotency_key": {
      "type": "string"
    },
    "cost_estimate_id": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

AuditPageLimit

{
  "type": "integer",
  "enum": [
    100,
    500,
    1000,
    1500,
    2000,
    3000,
    4000,
    5000,
    6000,
    7000,
    8000,
    9000,
    10000,
    15000,
    20000,
    25000,
    30000,
    35000,
    40000,
    45000,
    50000,
    75000,
    100000,
    150000,
    200000
  ]
}

CanonicalDateTime

{
  "type": "string",
  "format": "date-time",
  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
}

CollectedAtLast

{
  "type": "string",
  "enum": [
    "last"
  ]
}

CollectedAtValue

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/CollectedAtLast"
    },
    {
      "$ref": "#/components/schemas/CanonicalDateTime"
    }
  ]
}

DiffAlert

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/XID"
    },
    "diff_project_id": {
      "$ref": "#/components/schemas/XID"
    },
    "report_id": {
      "$ref": "#/components/schemas/XID"
    },
    "url_md5": {
      "$ref": "#/components/schemas/URLMD5"
    },
    "url": {
      "nullable": true
    },
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "trigger_codes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "triggers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlertTrigger"
      }
    },
    "parsing_javascript_error": {
      "nullable": true
    },
    "remove_tag1_regex_error": {
      "nullable": true
    },
    "remove_tag2_regex_error": {
      "nullable": true
    },
    "screenshot_desktop_error": {
      "nullable": true
    },
    "screenshot_mobile_error": {
      "nullable": true
    },
    "percent_diff_html_value": {
      "nullable": true
    },
    "percent_diff_text_value": {
      "nullable": true
    },
    "percent_diff_meta_value": {
      "nullable": true
    },
    "load_time_more_value": {
      "nullable": true
    },
    "page_size_value": {
      "nullable": true
    },
    "http_status": {
      "nullable": true
    },
    "checked_link_is_lost": {
      "nullable": true
    },
    "available": {
      "nullable": true
    },
    "swear": {
      "nullable": true
    },
    "php_error": {
      "nullable": true
    },
    "tracked_tag_values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffTrackedTagValue"
      }
    },
    "missing_html": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "appearing_html": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}

DiffAlertListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlert"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

DiffAlertSummary

{
  "type": "object",
  "properties": {
    "diff_project_id": {
      "nullable": true
    },
    "report_id": {
      "nullable": true
    },
    "alerts_count": {
      "type": "integer"
    },
    "affected_urls_count": {
      "type": "integer"
    },
    "triggered_urls_percent": {
      "type": "number",
      "format": "double"
    },
    "by_group": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlertSummaryGroup"
      }
    },
    "by_trigger": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlertSummaryTrigger"
      }
    },
    "top_rules": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlertSummaryRule"
      }
    }
  }
}

DiffAlertSummaryGroup

{
  "type": "object",
  "properties": {
    "group": {
      "type": "string"
    },
    "alerts_count": {
      "type": "integer"
    },
    "affected_urls_count": {
      "type": "integer"
    }
  }
}

DiffAlertSummaryResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/DiffAlertSummary"
    }
  }
}

DiffAlertSummaryRule

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "alerts_count": {
      "type": "integer"
    },
    "affected_urls_count": {
      "type": "integer"
    }
  }
}

DiffAlertSummaryTrigger

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "group": {
      "type": "string"
    },
    "alerts_count": {
      "type": "integer"
    },
    "affected_urls_count": {
      "type": "integer"
    }
  }
}

DiffAlertTimeseriesPoint

{
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "alerts_count": {
      "type": "integer"
    },
    "affected_urls_count": {
      "type": "integer"
    },
    "by_trigger": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlertTimeseriesTrigger"
      }
    }
  }
}

DiffAlertTimeseriesResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlertTimeseriesPoint"
      }
    }
  }
}

DiffAlertTimeseriesTrigger

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    }
  }
}

DiffAlertTrigger

{
  "type": "object",
  "required": [
    "code",
    "group",
    "field",
    "value",
    "expected",
    "unit"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "group": {
      "type": "string"
    },
    "field": {
      "type": "string"
    },
    "value": {
      "nullable": true
    },
    "expected": {
      "nullable": true
    },
    "unit": {
      "type": "string"
    }
  }
}

DiffBalance

{
  "type": "object",
  "properties": {
    "currency": {
      "type": "string"
    },
    "money_balance": {
      "type": "object",
      "properties": {
        "available_amount": {
          "type": "number",
          "format": "double"
        },
        "reserved_amount": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "subscription_quota": {
      "type": "object",
      "properties": {
        "available_runs": {
          "type": "integer"
        },
        "reset_at": {
          "nullable": true
        }
      }
    },
    "bonus_balance": {
      "type": "object",
      "properties": {
        "available_amount": {
          "nullable": true
        },
        "expires_at": {
          "nullable": true
        }
      }
    },
    "payment_options": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}

DiffBalanceResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/DiffBalance"
    }
  }
}

DiffCost

{
  "type": "object",
  "properties": {
    "cost_estimate_id": {
      "type": "string",
      "description": "Jeton opaque signé, et non identifiant d’une ligne de base de données."
    },
    "diff_project_id": {
      "$ref": "#/components/schemas/XID"
    },
    "urls_count": {
      "type": "integer"
    },
    "currency": {
      "type": "string"
    },
    "total_amount": {
      "type": "number",
      "format": "double"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "payment_options": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffPaymentOption"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}

DiffCostRequest

{
  "type": "object",
  "required": [
    "scope",
    "force_recheck"
  ],
  "properties": {
    "scope": {
      "type": "string",
      "enum": [
        "all_urls"
      ]
    },
    "force_recheck": {
      "type": "boolean"
    },
    "url_md5s": {
      "type": "array",
      "description": "Non pris en charge dans v1 ; doit être vide.",
      "items": {
        "$ref": "#/components/schemas/URLMD5"
      }
    }
  }
}

DiffCostResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/DiffCost"
    }
  }
}

DiffPageDetail

{
  "type": "object",
  "properties": {
    "diff_project_id": {
      "$ref": "#/components/schemas/XID"
    },
    "report_id": {
      "$ref": "#/components/schemas/XID"
    },
    "url_md5": {
      "$ref": "#/components/schemas/URLMD5"
    },
    "url": {
      "type": "string"
    },
    "rule_id": {
      "nullable": true
    },
    "rule_name": {
      "nullable": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "title": {
      "nullable": true
    },
    "description": {
      "nullable": true
    },
    "h1": {
      "nullable": true
    },
    "http_header": {
      "nullable": true
    },
    "http_status": {
      "nullable": true
    },
    "size": {
      "nullable": true
    },
    "load_time": {
      "nullable": true
    },
    "available": {
      "nullable": true
    },
    "tracked_tag1": {
      "nullable": true
    },
    "tracked_tag2": {
      "nullable": true
    },
    "tracked_tag3": {
      "nullable": true
    },
    "tracked_tag4": {
      "nullable": true
    },
    "tracked_tag5": {
      "nullable": true
    },
    "tracked_tag6": {
      "nullable": true
    },
    "missing_html_fragments": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "appearing_html_fragments": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "probe_states": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "files": {
      "$ref": "#/components/schemas/DiffPageFiles"
    }
  }
}

DiffPageDetailResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/DiffPageDetail"
    }
  }
}

DiffPageFiles

{
  "type": "object",
  "properties": {
    "html_available": {
      "type": "boolean"
    },
    "html_expires_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time"
    },
    "html_expires_in_days": {
      "type": "integer",
      "nullable": true
    },
    "text_available": {
      "type": "boolean"
    },
    "screenshot_desktop_available": {
      "type": "boolean"
    },
    "screenshot_desktop_expires_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time"
    },
    "screenshot_desktop_expires_in_days": {
      "type": "integer",
      "nullable": true
    },
    "screenshot_mobile_available": {
      "type": "boolean"
    },
    "screenshot_mobile_expires_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time"
    },
    "screenshot_mobile_expires_in_days": {
      "type": "integer",
      "nullable": true
    }
  }
}

DiffPaymentOption

{
  "type": "object",
  "properties": {
    "payment_option": {
      "type": "string"
    },
    "available": {
      "type": "boolean"
    },
    "page_credits": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "covered_amount": {
      "type": "number",
      "format": "double"
    },
    "amount_to_charge": {
      "type": "number",
      "format": "double"
    },
    "unavailable_reason": {
      "nullable": true
    }
  }
}

DiffProject

{
  "type": "object",
  "required": [
    "diff_project_id",
    "project_xid",
    "title",
    "urls_count",
    "schedule_mode",
    "schedule_text",
    "changes_count",
    "alerts_count",
    "default_rule"
  ],
  "properties": {
    "diff_project_id": {
      "$ref": "#/components/schemas/XID"
    },
    "project_xid": {
      "$ref": "#/components/schemas/XID"
    },
    "title": {
      "type": "string"
    },
    "urls_count": {
      "type": "integer"
    },
    "schedule_mode": {
      "type": "string"
    },
    "schedule_text": {
      "type": "string"
    },
    "last_check_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time"
    },
    "last_check_status": {
      "type": "string",
      "nullable": true
    },
    "changes_count": {
      "type": "integer"
    },
    "alerts_count": {
      "type": "integer"
    },
    "default_rule": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/DiffProjectDefaultRule"
        }
      ]
    }
  }
}

DiffProjectDefaultRule

{
  "type": "object",
  "required": [
    "rule_id",
    "name"
  ],
  "properties": {
    "rule_id": {
      "$ref": "#/components/schemas/XID"
    },
    "name": {
      "type": "string"
    }
  }
}

DiffProjectListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffProject"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

DiffReport

{
  "type": "object",
  "required": [
    "report_id",
    "status",
    "created_at",
    "pages_count",
    "alerts_count"
  ],
  "properties": {
    "report_id": {
      "$ref": "#/components/schemas/XID"
    },
    "status": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "pages_count": {
      "type": "integer"
    },
    "alerts_count": {
      "type": "integer"
    }
  }
}

DiffReportGraphPoint

{
  "type": "object",
  "required": [
    "report_id",
    "created_at",
    "html_count",
    "text_count",
    "meta_count",
    "alerts_count"
  ],
  "properties": {
    "report_id": {
      "$ref": "#/components/schemas/XID"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "html_count": {
      "type": "integer"
    },
    "text_count": {
      "type": "integer"
    },
    "meta_count": {
      "type": "integer"
    },
    "alerts_count": {
      "type": "integer"
    }
  }
}

DiffReportGraphResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffReportGraphPoint"
      }
    }
  }
}

DiffReportListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffReport"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

DiffReportRow

{
  "type": "object",
  "properties": {
    "url_md5": {
      "$ref": "#/components/schemas/URLMD5"
    },
    "url": {
      "type": "string"
    },
    "rule_id": {
      "nullable": true
    },
    "rule_name": {
      "nullable": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "has_alert": {
      "type": "boolean"
    },
    "alert_trigger_codes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "alert_triggers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffAlertTrigger"
      }
    },
    "changed_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "http_status": {
      "nullable": true
    },
    "size": {
      "nullable": true
    },
    "load_time": {
      "nullable": true
    },
    "title_diff_pct": {
      "nullable": true
    },
    "description_diff_pct": {
      "nullable": true
    },
    "h1_diff_pct": {
      "nullable": true
    },
    "http_status_changed": {
      "nullable": true
    },
    "size_diff": {
      "nullable": true
    },
    "load_time_diff": {
      "nullable": true
    },
    "html_diff_pct": {
      "nullable": true
    },
    "text_diff_pct": {
      "nullable": true
    },
    "meta_diff_pct": {
      "nullable": true
    },
    "screenshot_desktop_diff_pct": {
      "nullable": true
    },
    "screenshot_mobile_diff_pct": {
      "nullable": true
    },
    "available": {
      "nullable": true
    },
    "tracked_tag1_changed": {
      "nullable": true
    },
    "tracked_tag2_changed": {
      "nullable": true
    },
    "tracked_tag3_changed": {
      "nullable": true
    },
    "tracked_tag4_changed": {
      "nullable": true
    },
    "tracked_tag5_changed": {
      "nullable": true
    },
    "tracked_tag6_changed": {
      "nullable": true
    },
    "missing_html_changed": {
      "nullable": true
    },
    "appearing_html_changed": {
      "nullable": true
    },
    "state": {
      "nullable": true
    }
  }
}

DiffReportRowsResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffReportRow"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

DiffRule

La règle sélectionnée pour les nouvelles pages ne peut pas être supprimée (409 rule_in_use). Sélectionnez et enregistrez d’abord une autre règle dans les paramètres de la liste d’URL ; créez-en une s’il n’en existe aucune autre. Les règles attribuées à des URL ne peuvent pas non plus être supprimées (409 rule_has_urls).

{
  "type": "object",
  "properties": {
    "rule_id": {
      "$ref": "#/components/schemas/XID"
    },
    "diff_project_id": {
      "$ref": "#/components/schemas/XID"
    },
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "nullable": true
    },
    "parsing_javascript": {
      "type": "boolean"
    },
    "remove_tag1_regex": {
      "type": "string",
      "nullable": true
    },
    "remove_tag2_regex": {
      "type": "string",
      "nullable": true
    },
    "screenshot_desktop": {
      "type": "boolean"
    },
    "screenshot_mobile": {
      "type": "boolean"
    },
    "screenshot_delay": {
      "type": "number",
      "nullable": true
    },
    "percent_diff_html": {
      "type": "number",
      "nullable": true
    },
    "percent_diff_text": {
      "type": "number",
      "nullable": true
    },
    "percent_diff_meta": {
      "type": "number",
      "nullable": true
    },
    "load_time_more": {
      "type": "number",
      "nullable": true
    },
    "min_page_size": {
      "type": "integer",
      "nullable": true
    },
    "max_page_size": {
      "type": "integer",
      "nullable": true
    },
    "expected_http_status": {
      "type": "integer",
      "nullable": true
    },
    "available": {
      "type": "boolean"
    },
    "tracked_tags": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffRuleTrackedTag"
      }
    },
    "missing_html": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "appearing_html": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "is_default": {
      "type": "boolean"
    },
    "linked_urls_count": {
      "type": "integer"
    }
  }
}

DiffRuleExpectedHTTPStatusesResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "integer"
          }
        }
      }
    }
  }
}

DiffRuleListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffRule"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

DiffRuleResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/DiffRule"
    }
  }
}

DiffRuleTrackedTag

{
  "type": "object",
  "properties": {
    "number": {
      "type": "integer"
    },
    "mode": {
      "type": "string",
      "nullable": true
    },
    "pattern": {
      "type": "string"
    }
  }
}

DiffRuleTrackedTagBody

{
  "type": "object",
  "required": [
    "number",
    "mode",
    "pattern"
  ],
  "properties": {
    "number": {
      "type": "integer",
      "minimum": 1,
      "maximum": 6
    },
    "mode": {
      "type": "string",
      "enum": [
        "css",
        "regex"
      ]
    },
    "pattern": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    }
  }
}

DiffRuleWriteRequest

{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    },
    "email": {
      "type": "string",
      "maxLength": 100,
      "nullable": true
    },
    "parsing_javascript": {
      "type": "boolean"
    },
    "remove_tag1_regex": {
      "type": "string",
      "maxLength": 1000,
      "nullable": true
    },
    "remove_tag2_regex": {
      "type": "string",
      "maxLength": 1000,
      "nullable": true
    },
    "screenshot_desktop": {
      "type": "boolean"
    },
    "screenshot_mobile": {
      "type": "boolean"
    },
    "screenshot_delay": {
      "type": "number",
      "minimum": 1,
      "maximum": 10,
      "multipleOf": 0.1,
      "nullable": true
    },
    "percent_diff_html": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "nullable": true
    },
    "percent_diff_text": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "nullable": true
    },
    "percent_diff_meta": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "nullable": true
    },
    "load_time_more": {
      "type": "number",
      "minimum": 0.1,
      "maximum": 10,
      "nullable": true
    },
    "min_page_size": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000000,
      "nullable": true
    },
    "max_page_size": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000000,
      "nullable": true
    },
    "expected_http_status": {
      "type": "integer",
      "enum": [
        200,
        301,
        404,
        410,
        500
      ],
      "nullable": true
    },
    "available": {
      "type": "boolean"
    },
    "tracked_tags": {
      "type": "array",
      "maxItems": 6,
      "items": {
        "$ref": "#/components/schemas/DiffRuleTrackedTagBody"
      }
    },
    "missing_html": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "string",
        "maxLength": 1000
      }
    },
    "appearing_html": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "string",
        "maxLength": 1000
      }
    }
  }
}

DiffRun

{
  "type": "object",
  "properties": {
    "run_id": {
      "$ref": "#/components/schemas/XID"
    },
    "report_id": {
      "nullable": true
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "progress",
        "done",
        "failed"
      ]
    },
    "progress_percent": {
      "type": "integer"
    },
    "payment_option": {
      "type": "string"
    },
    "charged_amount": {
      "type": "number",
      "format": "double"
    },
    "currency": {
      "type": "string"
    },
    "urls_count": {
      "type": "integer"
    },
    "processed_urls_count": {
      "type": "integer"
    },
    "failed_urls_count": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "started_at": {
      "nullable": true
    },
    "finished_at": {
      "nullable": true
    },
    "error_code": {
      "nullable": true
    },
    "error_message": {
      "nullable": true
    },
    "status_url": {
      "type": "string"
    }
  }
}

DiffRunListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffRun"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

DiffRunRequest

{
  "type": "object",
  "required": [
    "cost_estimate_id",
    "payment_option",
    "scope",
    "force_recheck"
  ],
  "properties": {
    "cost_estimate_id": {
      "type": "string"
    },
    "payment_option": {
      "type": "string",
      "enum": [
        "auto",
        "money",
        "subscription",
        "bonus"
      ]
    },
    "scope": {
      "type": "string",
      "enum": [
        "all_urls"
      ]
    },
    "force_recheck": {
      "type": "boolean"
    },
    "url_md5s": {
      "type": "array",
      "description": "Non pris en charge dans v1 ; doit être vide.",
      "items": {
        "$ref": "#/components/schemas/URLMD5"
      }
    }
  }
}

DiffRunResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/DiffRun"
    }
  }
}

DiffTrackedTagValue

{
  "type": "object",
  "properties": {
    "number": {
      "type": "integer"
    },
    "value": {
      "type": "string"
    }
  }
}

DiffURL

{
  "type": "object",
  "properties": {
    "url_md5": {
      "$ref": "#/components/schemas/URLMD5"
    },
    "url": {
      "type": "string"
    },
    "alert_rule_id": {
      "type": "string",
      "nullable": true
    },
    "alert_rule_name": {
      "type": "string",
      "nullable": true
    },
    "effective_rule_id": {
      "type": "string",
      "nullable": true
    },
    "effective_rule_name": {
      "type": "string",
      "nullable": true
    },
    "uses_default_rule": {
      "description": "Champ de compatibilité ; false. La règle est attribuée à l’URL lors de son ajout ou d’une réattribution explicite.",
      "type": "boolean"
    },
    "http_status": {
      "type": "integer",
      "nullable": true
    },
    "size": {
      "type": "integer",
      "nullable": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "check_status": {
      "type": "string"
    }
  }
}

DiffURLAddItem

{
  "type": "object",
  "properties": {
    "input_url": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "url_md5": {
      "$ref": "#/components/schemas/URLMD5"
    },
    "status": {
      "type": "string"
    },
    "effective_rule_id": {
      "type": "string",
      "nullable": true
    },
    "uses_default_rule": {
      "description": "Champ de compatibilité ; false. La règle est attribuée à l’URL lors de son ajout ou d’une réattribution explicite.",
      "type": "boolean"
    }
  }
}

DiffURLAddRequest

{
  "type": "object",
  "required": [
    "urls"
  ],
  "properties": {
    "urls": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1000,
      "items": {
        "type": "string"
      }
    },
    "alert_rule_id": {
      "description": "Règle du même projet Diff. Si le champ vaut null ou est omis, la règle actuelle pour les nouvelles pages, définie dans les paramètres de la liste d’URL, est attribuée à l’URL. Toute modification ultérieure de ce paramètre ne change pas la règle de l’URL. Renvoie 409 default_rule_not_configured si aucune règle n’est sélectionnée.",
      "type": "string",
      "nullable": true
    }
  }
}

DiffURLAddResponse

{
  "type": "object",
  "properties": {
    "created_count": {
      "type": "integer"
    },
    "skipped_count": {
      "type": "integer"
    },
    "would_create_count": {
      "type": "integer"
    },
    "already_exists_count": {
      "type": "integer"
    },
    "invalid_count": {
      "type": "integer"
    },
    "domain_blocked_count": {
      "type": "integer"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffURLAddItem"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffURLErrorItem"
      }
    }
  }
}

DiffURLBulkRulePatchRequest

{
  "type": "object",
  "required": [
    "url_md5s",
    "alert_rule_id"
  ],
  "properties": {
    "url_md5s": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10000,
      "items": {
        "$ref": "#/components/schemas/URLMD5"
      }
    },
    "alert_rule_id": {
      "description": "Règle du même projet Diff. Ce champ est obligatoire ; null attribue à l’URL la règle actuelle pour les nouvelles pages, définie dans les paramètres de la liste d’URL. Toute modification ultérieure de ce paramètre ne change pas la règle de l’URL. Renvoie 409 default_rule_not_configured si aucune règle n’est sélectionnée.",
      "type": "string",
      "nullable": true
    }
  }
}

DiffURLErrorItem

{
  "type": "object",
  "properties": {
    "input_url": {
      "type": "string"
    },
    "url_md5": {
      "type": "string",
      "nullable": true
    },
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  }
}

DiffURLListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffURL"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}

DiffURLRulePatchRequest

{
  "type": "object",
  "required": [
    "alert_rule_id"
  ],
  "properties": {
    "alert_rule_id": {
      "description": "Règle du même projet Diff. Ce champ est obligatoire ; null attribue à l’URL la règle actuelle pour les nouvelles pages, définie dans les paramètres de la liste d’URL. Toute modification ultérieure de ce paramètre ne change pas la règle de l’URL. Renvoie 409 default_rule_not_configured si aucune règle n’est sélectionnée.",
      "type": "string",
      "nullable": true
    }
  }
}

DiffURLRulePatchResponse

{
  "type": "object",
  "properties": {
    "requested_count": {
      "type": "integer"
    },
    "updated_count": {
      "type": "integer"
    },
    "not_found_count": {
      "type": "integer"
    },
    "uses_default_rule": {
      "description": "Champ de compatibilité ; false. La règle est attribuée à l’URL lors de son ajout ou d’une réattribution explicite.",
      "type": "boolean"
    },
    "effective_rule_id": {
      "type": "string",
      "nullable": true
    },
    "effective_rule_name": {
      "type": "string",
      "nullable": true
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DiffURLErrorItem"
      }
    }
  }
}

DomainKeywordPaymentOption

{
  "type": "string",
  "enum": [
    "ai_credits",
    "money_balance"
  ]
}

DomainKeywordProgress

{
  "type": "object",
  "required": [
    "run_id",
    "domain",
    "status",
    "stage",
    "requested_count",
    "found_count",
    "bukvarix_count",
    "pages_processed"
  ],
  "properties": {
    "run_id": {
      "type": "string",
      "pattern": "^[0-9a-v]{20}$"
    },
    "domain": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "settling",
        "completed",
        "failed"
      ]
    },
    "stage": {
      "type": "string",
      "enum": [
        "queued",
        "bukvarix",
        "crawl",
        "settling",
        "completed",
        "failed"
      ]
    },
    "requested_count": {
      "type": "integer"
    },
    "found_count": {
      "type": "integer"
    },
    "bukvarix_count": {
      "type": "integer"
    },
    "pages_processed": {
      "type": "integer"
    },
    "stop_reason": {
      "type": "string",
      "enum": [
        "target_reached",
        "site_exhausted",
        "page_limit",
        "time_limit",
        "collection_error",
        "insufficient_funds"
      ]
    }
  }
}

DomainKeywordQuote

{
  "type": "object",
  "required": [
    "domain",
    "keyword_count",
    "ai_credits",
    "amount_minor",
    "currency",
    "credits_available",
    "balance_available",
    "cost_estimate_id",
    "idempotency_key",
    "expires_at"
  ],
  "properties": {
    "domain": {
      "type": "string"
    },
    "keyword_count": {
      "type": "integer"
    },
    "ai_credits": {
      "type": "integer",
      "format": "int64"
    },
    "amount_minor": {
      "type": "integer",
      "format": "int64"
    },
    "currency": {
      "type": "string"
    },
    "credits_available": {
      "type": "boolean"
    },
    "balance_available": {
      "type": "boolean"
    },
    "payment_option": {
      "$ref": "#/components/schemas/DomainKeywordPaymentOption"
    },
    "cost_estimate_id": {
      "type": "string"
    },
    "idempotency_key": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

DomainKeywordResult

{
  "allOf": [
    {
      "$ref": "#/components/schemas/DomainKeywordProgress"
    },
    {
      "type": "object",
      "required": [
        "keywords",
        "list",
        "payment_option",
        "ai_credits_charged",
        "ai_credits_refunded",
        "amount_minor_charged",
        "amount_minor_refunded",
        "currency"
      ],
      "properties": {
        "keywords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "list": {
          "$ref": "#/components/schemas/SuggestionList"
        },
        "payment_option": {
          "$ref": "#/components/schemas/DomainKeywordPaymentOption"
        },
        "ai_credits_charged": {
          "type": "integer",
          "format": "int64"
        },
        "ai_credits_refunded": {
          "type": "integer",
          "format": "int64"
        },
        "amount_minor_charged": {
          "type": "integer",
          "format": "int64"
        },
        "amount_minor_refunded": {
          "type": "integer",
          "format": "int64"
        },
        "currency": {
          "type": "string"
        }
      }
    }
  ]
}

Error

{
  "type": "object",
  "required": [
    "request_id",
    "code",
    "message"
  ],
  "properties": {
    "request_id": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ErrorDetail"
      }
    }
  }
}

ErrorDetail

{
  "type": "object",
  "required": [
    "code"
  ],
  "properties": {
    "field": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "linked_urls_count": {
      "type": "integer"
    },
    "is_default": {
      "type": "boolean"
    }
  }
}

ErrorResponse

{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "$ref": "#/components/schemas/Error"
    }
  }
}

ExistingRankingsCostInput

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "payment_option": {
      "$ref": "#/components/schemas/SiteReportPaymentOption"
    }
  }
}

ExistingSiteAuditCostInput

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "pages_limit": {
      "$ref": "#/components/schemas/AuditPageLimit"
    },
    "payment_option": {
      "$ref": "#/components/schemas/SiteReportPaymentOption"
    }
  }
}

ExpertArticleEstimate

{
  "type": "object",
  "required": [
    "operation",
    "title",
    "ai_credits",
    "can_start",
    "details",
    "idempotency_key",
    "cost_estimate_id",
    "expires_at"
  ],
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "expert_article"
      ]
    },
    "title": {
      "type": "string"
    },
    "ai_credits": {
      "type": "integer",
      "minimum": 0
    },
    "can_start": {
      "type": "boolean"
    },
    "details": {
      "type": "object",
      "required": [
        "word_count",
        "language",
        "available_ai_credits"
      ],
      "properties": {
        "word_count": {
          "type": "integer",
          "enum": [
            3000,
            6000,
            8000
          ]
        },
        "language": {
          "type": "string"
        },
        "available_ai_credits": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "idempotency_key": {
      "type": "string"
    },
    "cost_estimate_id": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

ExpertArticleInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "title",
    "site_subject",
    "language",
    "word_count"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "example": "How to choose a heat pump"
    },
    "site_subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "example": "Heating and energy efficiency"
    },
    "language": {
      "type": "string",
      "example": "en"
    },
    "word_count": {
      "type": "integer",
      "enum": [
        3000,
        6000,
        8000
      ],
      "description": "Sélectionnez une longueur de 3000–6000, 6000–8000 ou 8000 mots et plus."
    }
  }
}

ExpertArticleResult

{
  "type": "object",
  "required": [
    "document_id",
    "title",
    "status",
    "progress_percent"
  ],
  "properties": {
    "document_id": {
      "type": "string",
      "pattern": "^[0-9a-v]{20}$"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "new",
        "pending",
        "success",
        "error"
      ]
    },
    "progress_percent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "content": {
      "type": "string"
    },
    "actual_words": {
      "type": "integer",
      "minimum": 0
    }
  }
}

ExpertArticleStart

{
  "type": "object",
  "required": [
    "document_id",
    "status"
  ],
  "properties": {
    "document_id": {
      "type": "string",
      "pattern": "^[0-9a-v]{20}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending"
      ]
    }
  }
}

ExpertArticleStartInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "cost_estimate_id"
  ],
  "properties": {
    "cost_estimate_id": {
      "type": "string"
    }
  }
}

GroupRunReceipt

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "group_id",
        "sites"
      ],
      "properties": {
        "group_id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "started",
            "partial",
            "failed",
            "outcome_unknown"
          ]
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    }
  }
}

MainReportArchive

{
  "type": "object",
  "required": [
    "file_name",
    "content_type",
    "size_bytes",
    "sha256",
    "download_url",
    "formats"
  ],
  "properties": {
    "file_name": {
      "type": "string"
    },
    "content_type": {
      "type": "string",
      "enum": [
        "application/zip"
      ]
    },
    "size_bytes": {
      "type": "integer",
      "format": "int64"
    },
    "sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "download_url": {
      "type": "string"
    },
    "formats": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "nullable": true
}

MainReportExport

{
  "type": "object",
  "required": [
    "export_id",
    "site_uuid",
    "status",
    "created_at",
    "finished_at",
    "expires_at",
    "main_report_created_at",
    "settings_captured_at",
    "language",
    "status_url",
    "progress_percent",
    "archive",
    "warnings",
    "error"
  ],
  "properties": {
    "export_id": {
      "type": "string",
      "pattern": "^[0-9a-v]{20}$"
    },
    "site_uuid": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "progress",
        "done",
        "failed",
        "expired"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "finished_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "main_report_created_at": {
      "type": "string",
      "format": "date-time"
    },
    "settings_captured_at": {
      "type": "string",
      "format": "date-time"
    },
    "language": {
      "type": "string"
    },
    "status_url": {
      "type": "string"
    },
    "progress_percent": {
      "type": "integer",
      "nullable": true
    },
    "retry_after_seconds": {
      "type": "integer"
    },
    "archive": {
      "$ref": "#/components/schemas/MainReportArchive"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "nullable": true
    }
  }
}

MainReportExportResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/MainReportExport"
    }
  }
}

MainReportLimitsResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "account",
        "site"
      ],
      "properties": {
        "account": {
          "$ref": "#/components/schemas/MainReportQuota"
        },
        "site": {
          "$ref": "#/components/schemas/MainReportQuota"
        }
      }
    }
  }
}

MainReportPrepareRequest

{
  "type": "object",
  "additionalProperties": false,
  "example": {}
}

MainReportQuota

{
  "type": "object",
  "required": [
    "limit",
    "used",
    "remaining",
    "reset_at"
  ],
  "properties": {
    "limit": {
      "type": "integer"
    },
    "used": {
      "type": "integer"
    },
    "remaining": {
      "type": "integer"
    },
    "reset_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

MainReportQuotaErrorDetail

{
  "type": "object",
  "required": [
    "field",
    "code",
    "limit",
    "used",
    "remaining",
    "reset_at"
  ],
  "properties": {
    "field": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "limit": {
      "type": "integer"
    },
    "used": {
      "type": "integer"
    },
    "remaining": {
      "type": "integer"
    },
    "reset_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

MainReportRateLimitErrorResponse

{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "request_id",
        "code",
        "message"
      ],
      "properties": {
        "request_id": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/MainReportQuotaErrorDetail"
          }
        }
      }
    }
  }
}

MainReportSite

{
  "type": "object",
  "required": [
    "site_uuid",
    "title",
    "url",
    "main_report_created_at",
    "export_available",
    "unavailable_reason"
  ],
  "properties": {
    "site_uuid": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$"
    },
    "title": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "main_report_created_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "export_available": {
      "type": "boolean"
    },
    "unavailable_reason": {
      "type": "string",
      "nullable": true
    }
  }
}

MainReportSitesResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MainReportSite"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/SERPPagination"
    }
  }
}

MeResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "api_key"
      ],
      "properties": {
        "api_key": {
          "$ref": "#/components/schemas/APIKeyInfo"
        }
      }
    }
  }
}

NewSiteSearchEngine

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "engine",
    "region_code"
  ],
  "properties": {
    "engine": {
      "type": "string",
      "enum": [
        "google"
      ]
    },
    "region_code": {
      "type": "string",
      "pattern": "^[0-9]{1,10}$",
      "example": "2840"
    },
    "device": {
      "type": "string",
      "enum": [
        "pc",
        "mobile"
      ],
      "default": "pc"
    },
    "language": {
      "type": "string",
      "maxLength": 16
    }
  }
}

Pagination

{
  "type": "object",
  "required": [
    "limit",
    "offset",
    "next_offset",
    "has_more",
    "total"
  ],
  "properties": {
    "limit": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    },
    "next_offset": {
      "nullable": true
    },
    "has_more": {
      "type": "boolean"
    },
    "total": {
      "nullable": true
    }
  }
}

PersonalTodoItem

{
  "type": "object",
  "required": [
    "id",
    "title",
    "tracked_seconds",
    "active_started_at",
    "completed_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-v]{20}$"
    },
    "title": {
      "type": "string"
    },
    "tracked_seconds": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "active_started_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    },
    "completed_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
    }
  }
}

ProductDescriptionCost

{
  "type": "object",
  "required": [
    "cost",
    "total_credits",
    "remaining_credits",
    "has_enough_credits"
  ],
  "properties": {
    "cost": {
      "type": "integer",
      "minimum": 0,
      "description": "Coût maximal estimé en crédits IA. Consultez /public-api/v1/ai-writer/product-descriptions/cost pour obtenir le montant actuel. L’estimation ne réserve aucun crédit ; les crédits sont réservés au démarrage de la génération."
    },
    "total_credits": {
      "type": "integer"
    },
    "remaining_credits": {
      "type": "integer",
      "minimum": 0
    },
    "has_enough_credits": {
      "type": "boolean"
    }
  }
}

ProductDescriptionDocument

{
  "type": "object",
  "required": [
    "document_id",
    "status"
  ],
  "properties": {
    "document_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "success",
        "error"
      ]
    },
    "retry_after_seconds": {
      "type": "integer",
      "example": 10
    },
    "content": {
      "type": "string",
      "description": "HTML généré ; présent en cas de succès. Considérez le HTML généré comme non fiable avant publication."
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "h1": {
      "type": "string"
    },
    "actual_words": {
      "type": "integer"
    },
    "credits_spent": {
      "type": "integer",
      "minimum": 0,
      "description": "Crédits IA réellement débités pour le document après remboursements. Zéro lorsque status=error."
    },
    "error_code": {
      "type": "string",
      "enum": [
        "product_not_recognized",
        "product_description_failed"
      ],
      "description": "product_not_recognized : produit non reconnu ou nom ambigu ; product_description_failed : autre erreur de génération. Aucun crédit n’est débité lorsque status=error."
    }
  }
}

ProductDescriptionRejected

{
  "type": "object",
  "required": [
    "error",
    "credits_spent"
  ],
  "properties": {
    "credits_spent": {
      "type": "integer",
      "enum": [
        0
      ]
    },
    "error": {
      "type": "object",
      "required": [
        "code",
        "message",
        "request_id"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "product_not_recognized"
          ]
        },
        "message": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        },
        "details": {
          "nullable": true
        }
      }
    }
  }
}

ProductDescriptionRequest

{
  "type": "object",
  "required": [
    "title",
    "language",
    "word_count"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "Nom du produit avec ses caractéristiques essentielles, composé de caractères imprimables."
    },
    "language": {
      "type": "string",
      "enum": [
        "ar",
        "cs",
        "da",
        "de",
        "en",
        "es",
        "fi",
        "fr",
        "hi",
        "hu",
        "it",
        "nl",
        "no",
        "pl",
        "pt",
        "ro",
        "ru",
        "sv",
        "tr"
      ],
      "description": "Langue de la description de produit générée."
    },
    "word_count": {
      "type": "integer",
      "enum": [
        400,
        600,
        800
      ],
      "description": "Plages de longueur cibles : respectivement 400–600, 600–800 ou 800–1200 mots."
    }
  }
}

ProductDescriptionStart

{
  "type": "object",
  "required": [
    "document_id",
    "status",
    "cost",
    "has_enough_credits"
  ],
  "properties": {
    "document_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending"
      ]
    },
    "cost": {
      "type": "integer",
      "minimum": 0
    },
    "has_enough_credits": {
      "type": "boolean"
    }
  }
}

PromptSuggestionCostRequest

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "domain",
    "company_description",
    "exclusions"
  ],
  "properties": {
    "domain": {
      "type": "string",
      "minLength": 3,
      "maxLength": 253,
      "example": "example.com"
    },
    "company_description": {
      "type": "string",
      "minLength": 150,
      "maxLength": 2500,
      "example": "We supply wholesale loose-leaf tea and tasting packs to cafés and independent retailers. We help customers plan their range and deliver regularly under contract."
    },
    "exclusions": {
      "type": "array",
      "maxItems": 40,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 250
      },
      "example": [
        "Coffee",
        "Coffee equipment",
        "Retail purchases"
      ]
    },
    "prompt_count": {
      "type": "integer",
      "minimum": 30,
      "maximum": 2000,
      "multipleOf": 10,
      "default": 100
    },
    "language": {
      "type": "string",
      "description": "Code de langue des prompts générés. Omettez ce champ ou laissez-le vide pour utiliser la langue actuelle de l’interface.",
      "enum": [
        "",
        "ru",
        "en",
        "es",
        "de",
        "fr",
        "pt",
        "tr",
        "ar",
        "hi",
        "pl"
      ],
      "example": "fr"
    },
    "payment_option": {
      "$ref": "#/components/schemas/PromptSuggestionPaymentOption"
    }
  }
}

PromptSuggestionEdit

{
  "allOf": [
    {
      "$ref": "#/components/schemas/SuggestionEdit"
    },
    {
      "oneOf": [
        {
          "required": [
            "mode"
          ],
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "remove"
              ]
            }
          }
        },
        {
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "replace",
                "append"
              ]
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 10
                  }
                }
              }
            }
          }
        }
      ]
    }
  ]
}

PromptSuggestionPaymentOption

{
  "type": "string",
  "enum": [
    "ai_credits",
    "money_balance"
  ]
}

PromptSuggestionProgress

{
  "type": "object",
  "required": [
    "run_id",
    "domain",
    "status",
    "stage",
    "requested_count",
    "found_count"
  ],
  "properties": {
    "run_id": {
      "type": "string",
      "pattern": "^[0-9a-v]{20}$"
    },
    "domain": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "settling",
        "completed",
        "failed"
      ]
    },
    "stage": {
      "type": "string",
      "enum": [
        "queued",
        "generating",
        "settling",
        "completed",
        "failed"
      ]
    },
    "requested_count": {
      "type": "integer"
    },
    "found_count": {
      "type": "integer"
    },
    "stop_reason": {
      "type": "string",
      "enum": [
        "target_reached",
        "unique_prompts_exhausted",
        "time_limit",
        "generation_error",
        "insufficient_funds"
      ]
    }
  }
}

PromptSuggestionQuote

{
  "type": "object",
  "required": [
    "request",
    "ai_credits",
    "amount_minor",
    "currency",
    "credits_available",
    "balance_available",
    "cost_estimate_id",
    "idempotency_key",
    "expires_at"
  ],
  "properties": {
    "request": {
      "$ref": "#/components/schemas/PromptSuggestionCostRequest"
    },
    "ai_credits": {
      "type": "integer",
      "format": "int64"
    },
    "amount_minor": {
      "type": "integer",
      "format": "int64"
    },
    "currency": {
      "type": "string"
    },
    "credits_available": {
      "type": "boolean"
    },
    "balance_available": {
      "type": "boolean"
    },
    "payment_option": {
      "$ref": "#/components/schemas/PromptSuggestionPaymentOption"
    },
    "cost_estimate_id": {
      "type": "string"
    },
    "idempotency_key": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

PromptSuggestionResult

{
  "allOf": [
    {
      "$ref": "#/components/schemas/PromptSuggestionProgress"
    },
    {
      "type": "object",
      "required": [
        "prompts",
        "list",
        "payment_option",
        "ai_credits_charged",
        "ai_credits_refunded",
        "amount_minor_charged",
        "amount_minor_refunded",
        "currency"
      ],
      "properties": {
        "prompts": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/SuggestionItem"
          }
        },
        "list": {
          "$ref": "#/components/schemas/SuggestionList"
        },
        "payment_option": {
          "$ref": "#/components/schemas/PromptSuggestionPaymentOption"
        },
        "ai_credits_charged": {
          "type": "integer",
          "format": "int64"
        },
        "ai_credits_refunded": {
          "type": "integer",
          "format": "int64"
        },
        "amount_minor_charged": {
          "type": "integer",
          "format": "int64"
        },
        "amount_minor_refunded": {
          "type": "integer",
          "format": "int64"
        },
        "currency": {
          "type": "string"
        }
      }
    }
  ]
}

ReorderTodoInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "item_ids"
  ],
  "properties": {
    "item_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 500,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[0-9a-v]{20}$"
      }
    }
  }
}

SERPDate

{
  "type": "object",
  "required": [
    "collected_at"
  ],
  "properties": {
    "collected_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
    }
  }
}

SERPDateListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SERPDate"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/SERPPagination"
    }
  }
}

SERPKeyword

{
  "type": "object",
  "required": [
    "keyword",
    "frequency",
    "frequency_exact",
    "positions"
  ],
  "properties": {
    "keyword": {
      "type": "string"
    },
    "frequency": {
      "type": "integer",
      "format": "int64",
      "minimum": 0,
      "nullable": true
    },
    "frequency_exact": {
      "type": "integer",
      "format": "int64",
      "minimum": 0,
      "nullable": true
    },
    "positions": {
      "type": "object",
      "description": "Les clés sont les valeurs canoniques UTC RFC3339 demandées par le client ; leur ordre dans l’objet est sans importance.",
      "additionalProperties": {
        "$ref": "#/components/schemas/SERPPosition"
      }
    }
  }
}

SERPPagination

{
  "type": "object",
  "required": [
    "limit",
    "offset",
    "next_offset",
    "has_more"
  ],
  "properties": {
    "limit": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    },
    "next_offset": {
      "type": "integer",
      "nullable": true
    },
    "has_more": {
      "type": "boolean"
    }
  }
}

SERPPosition

{
  "type": "object",
  "required": [
    "position",
    "url"
  ],
  "properties": {
    "position": {
      "type": "integer",
      "minimum": 1,
      "nullable": true
    },
    "url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "nullable": true
    }
  }
}

SERPPositionListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SERPKeyword"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/SERPPagination"
    }
  }
}

SERPSearchEngine

{
  "type": "object",
  "required": [
    "id",
    "engine_title",
    "region_title",
    "device"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "minimum": 1
    },
    "engine_title": {
      "type": "string"
    },
    "region_title": {
      "type": "string"
    },
    "device": {
      "type": "string",
      "enum": [
        "desktop",
        "mobile"
      ]
    }
  }
}

SERPSite

{
  "type": "object",
  "required": [
    "site_uuid",
    "host",
    "title",
    "search_engines"
  ],
  "properties": {
    "site_uuid": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$"
    },
    "host": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "search_engines": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SERPSearchEngine"
      }
    }
  }
}

SERPSiteListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SERPSite"
      }
    },
    "pagination": {
      "$ref": "#/components/schemas/SERPPagination"
    }
  }
}

SearchEngine

{
  "type": "string",
  "enum": [
    "google"
  ]
}

SiteCreationCostInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "site"
  ],
  "properties": {
    "site": {
      "$ref": "#/components/schemas/SiteCreationInput"
    },
    "payment_option": {
      "$ref": "#/components/schemas/SiteReportPaymentOption"
    }
  }
}

SiteCreationEstimateResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/AnalysisEstimate"
    }
  }
}

SiteCreationInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "host",
    "report_type",
    "keywords",
    "search_engines"
  ],
  "properties": {
    "host": {
      "type": "string",
      "minLength": 3,
      "maxLength": 2048,
      "example": "https://example.com"
    },
    "create_new": {
      "type": "boolean",
      "description": "Créer explicitement un autre projet pour un domaine existant."
    },
    "title": {
      "type": "string",
      "maxLength": 250
    },
    "report_type": {
      "type": "string",
      "enum": [
        "site_audit",
        "keyword_rankings_refresh"
      ]
    },
    "pages_limit": {
      "$ref": "#/components/schemas/AuditPageLimit"
    },
    "keywords": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1000,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      },
      "example": [
        "garden supplies",
        "garden furniture"
      ]
    },
    "search_engines": {
      "type": "array",
      "minItems": 1,
      "maxItems": 40,
      "items": {
        "$ref": "#/components/schemas/NewSiteSearchEngine"
      }
    }
  }
}

SiteCreationResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "site_uuid",
        "started"
      ],
      "properties": {
        "site_uuid": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "created": {
          "type": "boolean"
        },
        "started": {
          "type": "boolean",
          "nullable": true
        },
        "start_code": {
          "type": "string"
        }
      }
    }
  }
}

SiteCreationRunInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "cost_estimate_id"
  ],
  "properties": {
    "cost_estimate_id": {
      "type": "string"
    }
  }
}

SiteDomainMatchesResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "site_uuid",
          "domain",
          "title"
        ],
        "properties": {
          "site_uuid": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "domain": {
            "type": "string",
            "example": "example.com"
          },
          "title": {
            "type": "string"
          }
        }
      }
    }
  }
}

SiteLanguage

Code de langue ISO 639-1 pris en charge.

{
  "type": "string",
  "enum": [
    "ar",
    "cs",
    "da",
    "de",
    "en",
    "es",
    "fi",
    "fr",
    "hi",
    "hu",
    "it",
    "nl",
    "no",
    "pl",
    "pt",
    "ro",
    "ru",
    "sv",
    "tr"
  ]
}

SiteReportPaymentOption

{
  "type": "string",
  "enum": [
    "subscription_quota",
    "auto",
    "money_balance"
  ],
  "default": "auto"
}

SiteReportProgress

{
  "type": "object",
  "required": [
    "site_uuid",
    "report_type",
    "status",
    "percent",
    "stages"
  ],
  "properties": {
    "site_uuid": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "report_type": {
      "type": "string",
      "enum": [
        "site_audit",
        "keyword_rankings_refresh"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "not_started",
        "inactive",
        "running",
        "finished",
        "cancelled"
      ]
    },
    "percent": {
      "type": "number",
      "format": "double",
      "minimum": 0,
      "maximum": 100
    },
    "stages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SiteReportProgressStage"
      }
    }
  }
}

SiteReportProgressResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/SiteReportProgress"
    }
  }
}

SiteReportProgressStage

{
  "type": "object",
  "required": [
    "name",
    "title",
    "done",
    "total",
    "percent",
    "response_time_ms"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "done": {
      "type": "integer",
      "nullable": true
    },
    "total": {
      "type": "integer",
      "nullable": true
    },
    "percent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "nullable": true
    },
    "response_time_ms": {
      "type": "integer",
      "minimum": 1,
      "nullable": true
    }
  }
}

SuggestionApplied

{
  "type": "object",
  "required": [
    "site_uuid",
    "revision",
    "added",
    "skipped"
  ],
  "properties": {
    "site_uuid": {
      "type": "string"
    },
    "revision": {
      "type": "integer",
      "format": "int64",
      "minimum": 1
    },
    "added": {
      "type": "integer",
      "minimum": 0
    },
    "skipped": {
      "type": "integer",
      "minimum": 0
    }
  }
}

SuggestionApply

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "site_uuid",
    "revision"
  ],
  "properties": {
    "site_uuid": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$"
    },
    "revision": {
      "type": "integer",
      "format": "int64",
      "minimum": 1
    }
  }
}

SuggestionEdit

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "revision",
    "items"
  ],
  "properties": {
    "revision": {
      "type": "integer",
      "format": "int64",
      "minimum": 1
    },
    "mode": {
      "type": "string",
      "enum": [
        "replace",
        "append",
        "remove"
      ],
      "default": "replace"
    },
    "items": {
      "type": "array",
      "maxItems": 2000,
      "items": {
        "$ref": "#/components/schemas/SuggestionItem"
      }
    }
  }
}

SuggestionItem

{
  "type": "object",
  "required": [
    "text"
  ],
  "additionalProperties": false,
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "intent": {
      "type": "string",
      "maxLength": 255
    },
    "category": {
      "type": "string",
      "maxLength": 255
    }
  }
}

SuggestionList

{
  "type": "object",
  "required": [
    "revision",
    "items"
  ],
  "properties": {
    "revision": {
      "type": "integer",
      "format": "int64",
      "minimum": 1
    },
    "items": {
      "type": "array",
      "maxItems": 2000,
      "items": {
        "$ref": "#/components/schemas/SuggestionItem"
      }
    }
  }
}

TodoCompletionInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "completed"
  ],
  "properties": {
    "completed": {
      "type": "boolean"
    }
  }
}

TodoItemCreatedResponse

{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[0-9a-v]{20}$"
        }
      }
    }
  }
}

TodoListResponse

{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PersonalTodoItem"
      }
    },
    "pagination": {
      "type": "object",
      "required": [
        "limit",
        "offset",
        "has_more",
        "next_offset"
      ],
      "properties": {
        "limit": {
          "type": "integer"
        },
        "offset": {
          "type": "integer"
        },
        "has_more": {
          "type": "boolean"
        },
        "next_offset": {
          "type": "integer",
          "nullable": true
        }
      }
    }
  }
}

TodoTitleInput

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  }
}

URLMD5

{
  "x-go-name": "URLMD5Value",
  "type": "string",
  "pattern": "^[a-f0-9]{32}$"
}

XID

{
  "type": "string",
  "minLength": 6,
  "maxLength": 64,
  "pattern": "^[A-Za-z0-9_-]+$"
}

Retour au sommaire