Site-wide reusable key-value pairs. Variables are ideal for storing information that appears across multiple pages: company name, phone number, address, social links, opening hours, etc.
Variable types:
text— Simple key-value stringcalendar— Event calendar with dates, labels, and colors
7 endpoints
GET /variables
List variables
Returns all variables for your site.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Examples
curl https://api.lynkow.com/v1/variables \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": [
{
"id": 1,
"key": "company_name",
"value": "Acme Corp",
"type": "text",
"locale": "en",
"createdAt": "2025-01-05T09:00:00.000Z",
"updatedAt": "2025-01-05T09:00:00.000Z"
},
{
"id": 2,
"key": "phone_number",
"value": "+1 (555) 123-4567",
"type": "text",
"locale": "en",
"createdAt": "2025-01-05T09:05:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z"
},
{
"id": 3,
"key": "opening_hours",
"value": "Mon-Fri 9:00-18:00",
"type": "text",
"locale": "en",
"createdAt": "2025-01-06T10:00:00.000Z",
"updatedAt": "2025-01-06T10:00:00.000Z"
}
],
"meta": {
"total": 3,
"perPage": 15,
"currentPage": 1,
"lastPage": 1
}
}POST /variables
Create a variable
Creates a new variable. The key must be unique per site and locale,
and is used to reference the variable in templates.
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| "text" | "calendar" | No | Resource type. One of: text, calendar |
| string | Yes | Required. 1-100 characters |
| string | Yes | Required. 1-255 characters |
| string | Yes | Required. Amount value. 1-100000 characters |
| string | No | Description text. Max 500 characters |
| string | No | BCP 47 locale code (e.g. "en", "fr") |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Validation error |
Examples
curl -X POST https://api.lynkow.com/v1/variables \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"key": "support_email",
"value": "[email protected]",
"type": "text"
}'Response Example
{
"data": {
"id": 4,
"key": "support_email",
"value": "[email protected]",
"type": "text",
"locale": "en",
"createdAt": "2025-04-06T12:00:00.000Z",
"updatedAt": "2025-04-06T12:00:00.000Z"
}
}GET /variables/:id
Get a variable
Returns a single variable with its value.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Examples
curl https://api.lynkow.com/v1/variables/1 \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": {
"id": 1,
"key": "company_name",
"value": "Acme Corp",
"type": "text",
"locale": "en",
"createdAt": "2025-01-05T09:00:00.000Z",
"updatedAt": "2025-01-05T09:00:00.000Z"
}
}PUT /variables/:id
Update a variable
Updates a variable's value. The key cannot be changed.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| string | No | 1-100 characters |
| string | No | 1-255 characters |
| string | No | Amount value. 1-100000 characters |
| string | null | No | Description text |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
| Validation error |
Examples
curl -X PUT https://api.lynkow.com/v1/variables/1 \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"value": "Acme Corporation"}'Response Example
{
"data": {
"id": 1,
"key": "company_name",
"value": "Acme Corporation",
"type": "text",
"locale": "en",
"createdAt": "2025-01-05T09:00:00.000Z",
"updatedAt": "2025-04-06T16:00:00.000Z"
}
}DELETE /variables/:id
Delete a variable
Permanently deletes a variable.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Examples
curl -X DELETE https://api.lynkow.com/v1/variables/4 \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"message": "Variable deleted"
}GET /variables/:id/translations
Get variable translation status
Returns the translation status for this variable across all enabled locales.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Examples
curl https://api.lynkow.com/v1/variables/1/translations \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": {
"en": {
"status": "complete"
},
"fr": {
"status": "missing"
},
"es": {
"status": "partial"
}
}
}POST /variables/:id/copy-to-locale
Copy variable to another locale
Creates a translated copy of this variable in the target locale.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Required |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
| Validation error |
Examples
curl -X POST https://api.lynkow.com/v1/variables/1/copy-to-locale \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"locale": "fr"}'Response Example
{
"data": {
"id": 50,
"key": "company_name",
"value": "Acme Corp",
"type": "text",
"locale": "fr",
"createdAt": "2025-04-06T15:00:00.000Z",
"updatedAt": "2025-04-06T15:00:00.000Z"
}
}