POST
/
v2
/
segments
Create a Segment
curl --request POST \
  --url https://api.lilt.com/v2/segments \
  --header 'Content-Type: application/json' \
  --data '{
  "memory_id": 10641,
  "document_id": 1876,
  "source": "Code zur Fehleranalyse einschalten",
  "target": "Enable debugging code",
  "shouldApplySegmentation": true,
  "srcLang": "fr"
}'
{
  "id": 84480010,
  "created_at": 1489147692,
  "updated_at": 1489147692,
  "document_id": 1234,
  "memory_id": 5678,
  "source": "The red bus.",
  "srclang": "en",
  "target": "Le bus rouge.",
  "trglang": "fr",
  "is_confirmed": true,
  "is_reviewed": true
}

Authorizations

key
string
query
required

Body

application/json

The Segment resource to create.

To add a Segment to a Memory, include the memory_id and target parameters.

To add a Segment to a Document, include the document_id and the source parameters. The target parameter is optional.

The body is of type object.

Response

200
application/json

A Segment object.

A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings.