---
title: "Create an Example Sentence"
method: POST
path: "/v2.0/flows/{flowId}/intents/{intentId}/sentences"
tags: ["Example Sentences"]
---

# Create an Example Sentence

`POST /v2.0/flows/{flowId}/intents/{intentId}/sentences`

Creates an [Example Sentence](https://docs.cognigy.com/ai/platform-features/nlu/intents/example-sentences) for an Intent.

## Path parameters

- `flowId` string, required
- `intentId` string, required

## Headers

- `Accept` 'application/json' | 'application/hal+json' | 'application/xml' | 'text/xml' | 'text/csv'

## Request body

- object — The payload for creating or updating an Example Sentence.
  - `text` string — The text in the Example Sentence.
  - `slots` union[] — The Slot segments in the Example Sentence. Each item defines a start and end indexes, and the Slot type: system-defined or user-defined Slot.
    - union
      - object — A Slot defined by the start and end indexes in the Example Sentence. The value is the text that appears in the range between the start and end indexes.
        - `type` 'anySlot' — The identifier for the Slot type.
        - `name` string — The display name of the Slot.
        - `start` number — The start index of the Slot in the Example Sentence text.
        - `end` number — The end index of the Slot in the Example Sentence text.
      - object — A system-defined Slot that references a system-defined data.
        - `type` 'systemSlot' — The identifier for the Slot type.
        - `dimension` string — The system-defined data type.
        - `start` number — The start index of the Slot in the Example Sentence text.
        - `end` number — The end index of the Slot in the Example Sentence text.
      - object — The user-defined Slot.
        - `type` 'lexiconSlot' — The identifier for the Slot type.
        - `lexiconReference` string
        - `slotReference` string
        - `name` string — The display name of the Slot.
        - `start` number — The start index of the Slot in the Example Sentence text.
        - `end` number — The end index of the Slot in the Example Sentence text.

## Response `201`

Returns Sentence metadata object.

- object — The IEntityMeta defines meta information every entity within the system has. These are dates when a resource was created and modified as well as information about the user who initially created a resource and who modified it the last time.
  - `localeReference` string
  - `feedbackReport` object
    - `findings` object[]
      - `type` 'poorScore' | 'fairScore' | 'goodScore' | 'overlap' | 'wrongIntent'
    - `info` object
      - `trueIntent` string
      - `topIntent` string
      - `runnerUp` string
      - `topScore` number
      - `runnerUpScore` number
      - `difference` number
      - `trueIntentName` string
      - `topIntentName` string
      - `runnerUpIntentName` string
  - `text` string — The text in the Example Sentence.
  - `slots` union[] — The Slot segments in the Example Sentence. Each item defines a start and end indexes, and the Slot type: system-defined or user-defined Slot.
    - union
      - object — A Slot defined by the start and end indexes in the Example Sentence. The value is the text that appears in the range between the start and end indexes.
        - `type` 'anySlot' — The identifier for the Slot type.
        - `name` string — The display name of the Slot.
        - `start` number — The start index of the Slot in the Example Sentence text.
        - `end` number — The end index of the Slot in the Example Sentence text.
      - object — A system-defined Slot that references a system-defined data.
        - `type` 'systemSlot' — The identifier for the Slot type.
        - `dimension` string — The system-defined data type.
        - `start` number — The start index of the Slot in the Example Sentence text.
        - `end` number — The end index of the Slot in the Example Sentence text.
      - object — The user-defined Slot.
        - `type` 'lexiconSlot' — The identifier for the Slot type.
        - `lexiconReference` string
        - `slotReference` string
        - `name` string — The display name of the Slot.
        - `start` number — The start index of the Slot in the Example Sentence text.
        - `end` number — The end index of the Slot in the Example Sentence text.
  - `_id` string
  - `createdAt` integer — Unix-timestamp
  - `lastChanged` integer — Unix-timestamp
  - `createdBy` string
  - `lastChangedBy` string

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
- `401` — The request has not been applied because it lacks valid authentication credentials for the target resource.
- `402` — Upgrade your Plan to increase your Quota.
- `403` — The server understood the request but refuses to authorize it.
- `404` — The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
- `405` — The method received in the request-line is known by the origin server but not supported by the target resource.
- `409` — The request conflicts with current state of the server.
- `413` — The request entity is larger than limits defined by server.
- `500` — The server encountered an unexpected condition that prevented it from fulfilling the request.
- `501` — The server does not support the functionality required to fulfill the request.
- `502` — The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
- `503` — The server is not ready to handle the request.
- `504` — The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.

---

[API](https://skmtc.net/cognigy/apis/simulator-openapi-rest-ful-api-reference.md) · [All operations](https://skmtc.net/cognigy/apis/simulator-openapi-rest-ful-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cognigy/simulator-openapi-rest-ful-api-reference/revisions/85b2872bdfb7/schema)
