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

# Check a translation against the glossary

> Terminology QA for a proposed translation. Reports where a required term is missing, a forbidden or deprecated term was used, or a do-not-translate term was translated.

Severity comes from each glossary's own QA settings, so a rule configured as a warning does not read as an error.

**Constraints:**
- Returns an empty issue list when the glossary feature is disabled for the org or the project.
- Issue kinds: missing_term, forbidden_term, deprecated_term, dnt_violation.



## OpenAPI

````yaml /openapi/textsetu.json post /projects/{projectId}/glossary/check
openapi: 3.1.0
info:
  title: TextSetu API
  version: 1.2.0
  description: >-
    Public REST API for TextSetu. Authenticate with a Personal Access Token
    (tsu_pat_…) or a project token (tsu_proj_…) via the `Authorization: Bearer
    <token>` header.


    **Authorization is permission-based.** Every token carries an explicit
    allow-list of RBAC permission keys (e.g. `translation_read`), and each
    endpoint declares the permission it requires (`x-permission`). A token's
    effective access is its underlying authority ∩ its allow-list — a PAT is
    further bounded by its owner's role-based permissions, so it can only
    narrow, never exceed, what the owner already has. A project token is bound
    to a single project. There are no coarse read/write/manage scopes.


    **Response envelope.** Every endpoint returns `{ "success": true, "data": …
    }` on success and `{ "success": false, "error": { "code", "message" } }` on
    failure.


    **Rate limit.** 600 requests/minute, keyed by token (or by IP when
    unauthenticated). Exceeding it returns 429 with the standard error envelope.
servers:
  - url: https://api.textsetu.com/api/v1
    description: Production
  - url: /api/v1
    description: This server (self-hosted / same-origin)
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: >-
      Read project metadata — settings, key separator, and the
      approval/branching flags that shape how the other endpoints behave.
  - name: Languages
    description: >-
      List and manage a project's target languages. Each language is referenced
      by its BCP-47 code; the source language is flagged separately.
  - name: Translations
    description: >-
      Manage a project's translations: create, read, update, and delete
      translation keys — the identifiers your app looks up, carrying metadata
      (description, tags, screenshot) — and set the translated value for a key
      in a given language. Value writes honor the project's approval workflow —
      non-approver writes land as `pending_review`.
  - name: Stats
    description: >-
      Per-language completeness and approval progress for a project — the
      numbers behind the dashboard.
  - name: Import/Export
    description: >-
      Bulk-load source files into a project or export the current translations.
      Supports the same file formats as the web app.
  - name: Branches
    description: >-
      Work on translations in isolation and merge them back. Branch reads/writes
      mirror the main endpoints but stage changes as a diff until merge. See the
      [branching guide](/docs/guides/branches).
  - name: Glossary
    description: >-
      Manage term bases — approved terminology and its translations — and check
      a string against them. See the [glossary guide](/docs/guides/glossary).
  - name: Translation Memory
    description: >-
      Reusable translation stores. Fuzzy-match and concordance-search prior
      translations to reuse them. See the [translation memory
      guide](/docs/guides/translation-memory).
  - name: AI
    description: >-
      Machine-translate a project with the org's configured AI engine (brand
      voice, glossary/TM grounding, and an optional review pass). Runs
      asynchronously — start a run and poll the returned `jobId`.
  - name: Webhooks
    description: >-
      Get notified when a project's translations change, instead of polling.
      Register an HTTPS endpoint, subscribe it to the events you care about, and
      TextSetu POSTs a signed payload whenever one occurs. Payloads follow the
      [Standard Webhooks](https://www.standardwebhooks.com) spec — verify the
      `webhook-signature` header with any compatible library. Delivery is
      at-least-once and unordered, so treat `webhook-id` as an idempotency key.
      Failed deliveries are retried five times over roughly seven hours, and
      every attempt is inspectable and replayable via the delivery log.
  - name: Meta
    description: Service-level and cross-cutting endpoints.
paths:
  /projects/{projectId}/glossary/check:
    post:
      tags:
        - Glossary
      summary: Check a translation against the glossary
      description: >-
        Terminology QA for a proposed translation. Reports where a required term
        is missing, a forbidden or deprecated term was used, or a
        do-not-translate term was translated.


        Severity comes from each glossary's own QA settings, so a rule
        configured as a warning does not read as an error.


        **Constraints:**

        - Returns an empty issue list when the glossary feature is disabled for
        the org or the project.

        - Issue kinds: missing_term, forbidden_term, deprecated_term,
        dnt_violation.
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: Project id (UUID) or id-embedded path slug.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sourceText:
                  type: string
                  description: >-
                    The original source string the translation was produced
                    from.
                  examples:
                    - Sign in to continue
                targetText:
                  type: string
                  description: The proposed translation to validate against the glossary.
                  examples:
                    - Se connecter pour continuer
                languageCode:
                  type: string
                  minLength: 1
                  description: Language code of the target text.
                  examples:
                    - fr
              required:
                - sourceText
                - targetText
                - languageCode
      responses:
        '200':
          description: Terminology issues (empty when clean)
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            termId:
                              type: string
                              description: Id of the glossary term the issue relates to.
                              examples:
                                - a1b2c3d4-0000-4000-8000-000000000020
                            term:
                              type: string
                              description: The glossary term the issue relates to.
                              examples:
                                - Sign in
                            glossaryId:
                              type: string
                              description: Id of the glossary that raised the issue.
                              examples:
                                - a1b2c3d4-0000-4000-8000-000000000010
                            glossaryName:
                              type: string
                              description: Name of the glossary that raised the issue.
                              examples:
                                - Brand Terms
                            severity:
                              type: string
                              description: >-
                                Severity from the glossary's QA settings:
                                `warning` or `error`.
                              examples:
                                - error
                            kind:
                              type: string
                              enum:
                                - missing_term
                                - forbidden_term
                                - deprecated_term
                                - dnt_violation
                              description: >-
                                Issue type: `missing_term` (required term
                                absent), `forbidden_term`, `deprecated_term`, or
                                `dnt_violation` (a do-not-translate term was
                                translated).
                              examples:
                                - missing_term
                            message:
                              type: string
                              description: Human-readable explanation of the issue.
                              examples:
                                - >-
                                  Expected term "Se connecter" for "Sign in" was
                                  not found.
                            expected:
                              description: >-
                                The term/translation that was expected, when
                                applicable.
                              examples:
                                - Se connecter
                              type: string
                            found:
                              description: >-
                                The offending text that was actually found, when
                                applicable.
                              examples:
                                - connectez-vous
                              type: string
                          required:
                            - termId
                            - term
                            - glossaryId
                            - glossaryName
                            - severity
                            - kind
                            - message
                          additionalProperties: false
                    required:
                      - issues
                    additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token: tsu_pat_… (PAT) or tsu_proj_… (project token). The token's
        granted RBAC permissions determine access; see each operation's
        `x-permission`.

````