---
title: "Create dependency data from input"
method: POST
path: "/syntax/dependencies"
tags: ["syntax-dependencies"]
---

# Create dependency data from input

`POST /syntax/dependencies`

## Request

- Base URL: `https://api.rosette.com/rest/v1`
- URL: `https://api.rosette.com/rest/v1/syntax/dependencies`
- Auth: API key in header `X-RosetteAPI-Key`

The Rosette API’s /syntax/dependencies endpoint will return the parse tree of the input text as a list of labeled directed links between tokens, as well as the list of tokens in the input sentence. <br><br>The /syntax/dependencies endpoint returns a list of sentences, their offsets, and their labeled dependencies, all connected to a list of tokens by indices.

## Request body

- union
  - object
    - `content` string
    - `language` string: 3 letter code of language.
  - object
    - `contentUri` string
    - `language` string: 3 letter code of language.

## Response `200`

OK

- SyntaxDependenciesResponse
  - `sentence` Sentences[]: list of sentences with dependencies
    - `dependencies` Dependency[]: list of dependencies
      - `dependencyType` string: dependencyType
      - `dependentTokenIndex` number
      - `governorTokenIndex` number
    - `endTokenIndex` integer: Token endTokenIndex
    - `startTokenIndex` integer: Token startTokenIndex
  - `tokens` string[]: tokens

---

[API](https://skmtc.dev/babelstreet/apis/rosette-text-analytics.md) · [All operations](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/revisions/7c1d1497a5dd?raw)
