github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/glossary_terms/create.yaml (about)

     1  ---
     2  summary: Create a term
     3  description: 'Create a new term in a term base (previously: glossary).'
     4  operationId: glossary_term/create
     5  tags:
     6  - Glossary Terms
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/account_id"
    10  - "$ref": "../../parameters.yaml#/glossary_id"
    11  responses:
    12    '201':
    13      description: Created
    14      content:
    15        application/json:
    16          schema:
    17            "$ref": "../../schemas/glossary_term.yaml#/glossary_term"
    18      headers:
    19        X-Rate-Limit-Limit:
    20          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    21        X-Rate-Limit-Remaining:
    22          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    23        X-Rate-Limit-Reset:
    24          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    25    '400':
    26      "$ref": "../../responses.yaml#/400"
    27    '404':
    28      "$ref": "../../responses.yaml#/404"
    29    '429':
    30      "$ref": "../../responses.yaml#/429"
    31  x-code-samples:
    32  - lang: Curl
    33    source: |-
    34      curl "https://api.phrase.com/v2/accounts/:account_id/glossaries/:glossary_id/terms" \
    35        -u USERNAME_OR_ACCESS_TOKEN \
    36        -X POST \
    37        -d '{"term":"MyCompany","description":"Use this when refering to our company","translatable":true,"case_sensitive":true}' \
    38        -H 'Content-Type: application/json'
    39  - lang: CLI v2
    40    source: |-
    41      phrase glossary_terms create \
    42      --account_id <account_id> \
    43      --glossary_id <glossary_id> \
    44      --data '{"term":"MyCompany", "description": "Use this when refering to our company", "translatable":true, "case_sensitive":true}' \
    45      --access_token <token>
    46  requestBody:
    47    required: true
    48    content:
    49      application/json:
    50        schema:
    51          type: object
    52          title: glossary_term/create/parameters
    53          required:
    54            - term
    55          properties:
    56            term:
    57              description: Glossary term
    58              type: string
    59              example: MyCompany
    60            description:
    61              description: Description of term
    62              type: string
    63              example: Use this when refering to our company
    64            translatable:
    65              description: Indicates whether the term should be used for all languages or can be translated
    66              type: boolean
    67              example: true
    68            case_sensitive:
    69              description: Indicates whether the term is case sensitive
    70              type: boolean
    71              example: true
    72  x-cli-version: '2.5'