Skip to main content
POST
/
projects
/
{project_id}
/
keys
/
{id}
/
key_links
Link child keys to a parent key
curl --request POST \
  --url https://api.phrase.com/v2/projects/{project_id}/keys/{id}/key_links \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "child_key_ids": [
    "child_key_id1",
    "child_key_id2"
  ]
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by": null,
  "updated_by": null,
  "account": {
    "id": "abcd1234",
    "name": "Company Account",
    "slug": "company_account",
    "company": "My Awesome Company",
    "created_at": "2015-01-28T09:52:53Z",
    "updated_at": "2015-01-28T09:52:53Z",
    "company_logo_url": "http://assets.example.com/company_logo.png"
  },
  "parent": null,
  "children": [
    null
  ]
}

Authorizations

Authorization
string
header
required

Enter your token in the format token TOKEN

Headers

X-PhraseApp-OTP
string

Two-Factor-Authentication token (optional)

Path Parameters

project_id
string
required

Project ID

id
string
required

Parent Translation Key ID

Body

application/json
child_key_ids
string[]
required

The IDs of the child keys to link to the parent key. Can be left empty, to only mark the given translation-key as parent

Example:
["child_key_id1", "child_key_id2"]

Response

Created

created_at
string<date-time>

The timestamp when the link was created.

updated_at
string<date-time>

The timestamp when the link was last updated.

created_by
user_preview · object

The user who created the link.

Example:

null

updated_by
user_preview · object

The user who last updated the link.

Example:

null

account
account · object

The account associated with the link.

Example:
{
"id": "abcd1234",
"name": "Company Account",
"slug": "company_account",
"company": "My Awesome Company",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z",
"company_logo_url": "http://assets.example.com/company_logo.png"
}
parent
key_preview · object

The parent translation key in the link.

Example:

null

children
key_preview · object[]

The child translation keys linked to the parent.