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

     1  ---
     2  summary: Create a comment
     3  description: Create a new comment for a key.
     4  operationId: comment/create
     5  tags:
     6  - Comments
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  - "$ref": "../../parameters.yaml#/key_id"
    11  - description: specify the message for the comment
    12    example: some message...
    13    name: message
    14    in: query
    15    schema:
    16      type: string
    17  - description: specify the locales for the comment
    18    example: someId
    19    name: locale_ids
    20    in: query
    21    schema:
    22      type: array
    23      items:
    24        type: string
    25  responses:
    26    '201':
    27      description: Created
    28      content:
    29        application/json:
    30          schema:
    31            "$ref": "../../schemas/comment.yaml#/comment"
    32      headers:
    33        X-Rate-Limit-Limit:
    34          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    35        X-Rate-Limit-Remaining:
    36          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    37        X-Rate-Limit-Reset:
    38          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    39    '400':
    40      "$ref": "../../responses.yaml#/400"
    41    '404':
    42      "$ref": "../../responses.yaml#/404"
    43    '429':
    44      "$ref": "../../responses.yaml#/429"
    45  x-code-samples:
    46  - lang: Curl
    47    source: |-
    48      curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments" \
    49        -u USERNAME_OR_ACCESS_TOKEN \
    50        -X POST \
    51        -d '{"branch":"my-feature-branch", "message":"Some message...", "locale_ids": ["someId"]}' \
    52        -H 'Content-Type: application/json'
    53  - lang: CLI v2
    54    source: |-
    55      phrase comments create \
    56      --project_id <project_id> \
    57      --key_id <key_id> \
    58      --data '{"branch":"my-feature-branch", "message": "Some message...", "locale_ids": ["someId"]}' \
    59      --access_token <token>
    60  requestBody:
    61    required: true
    62    content:
    63      application/json:
    64        schema:
    65          type: object
    66          title: comment/create/parameters
    67          properties:
    68            branch:
    69              description: specify the branch to use
    70              type: string
    71              example: my-feature-branch
    72            message:
    73              description: Comment message
    74              type: string
    75              example: Some message...
    76  x-cli-version: '2.5'