# Create a status page translation — API reference

> Creates a language translation with translated texts keyed by page content.

Source: https://upfour.io/docs/api/status-pages/create-a-status-page-translation

[Developers](https://upfour.io/docs/api.md)/[Status pages](https://upfour.io/docs/api/status-pages.md)

Creates a language translation with translated texts keyed by page content.

POST https://app.upfour.io/v1/status-pages/{pageID}/translations

scope status_page.write stable [Idempotency-Key supported](https://upfour.io/docs/api/idempotency.md) returns 201

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `pageID` required | uuid | path parameter |

## Body

`application/json` required 2 fields

languagestring (required)

Language code or name, e.g. de or German; one translation per language.

All other fields1 fields

translationsmap of string

Translated texts by key.

## Returns

A successful request returns `201` with application/json.

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | StatusPageTranslation | |
| StatusPageTranslation · 7 fields FieldTypeDescription `created_at` string (date-time) `id` uuid `is_published` boolean `language` string `status_page_id` uuid `translations` map of string  · nullable Translated texts by key. `updated_at` string (date-time) | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | [bad_request](https://upfour.io/docs/api/errors#code-bad_request) | The request is malformed or fails validation. |
| 404 | [not_found](https://upfour.io/docs/api/errors#code-not_found) | The requested resource does not exist or is outside the caller's scope. |
| 403 | [permission_denied](https://upfour.io/docs/api/errors#code-permission_denied) | The credentials do not permit this action. |

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

[PreviousList status page translations](https://upfour.io/docs/api/status-pages/list-status-page-translations.md) [NextDelete a status page translation](https://upfour.io/docs/api/status-pages/delete-a-status-page-translation.md)

## Request

### cURL

```bash
curl -s -X POST "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/translations" \
  -H "Authorization: Bearer $UP4_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "de",
    "translations": {
      "announcement": "Alle Systeme werden von up4 überwacht."
    }
  }'
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/translations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    language: "de",
    translations: {
      announcement: "Alle Systeme werden von up4 überwacht.",
    },
  }),
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.post(
    "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/translations",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
    json={
        "language": "de",
        "translations": {
            "announcement": "Alle Systeme werden von up4 überwacht.",
        },
    },
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	payload := strings.NewReader(`{
  "language": "de",
  "translations": {
    "announcement": "Alle Systeme werden von up4 überwacht."
  }
}`)
	req, _ := http.NewRequest("POST", "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/translations", payload)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(out))
}
```

### PHP

```php
<?php
$payload = <<<'JSON'
{
  "language": "de",
  "translations": {
    "announcement": "Alle Systeme werden von up4 überwacht."
  }
}
JSON;

$ch = curl_init("https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/translations");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 201

```json
{
  "data": {
    "created_at": "2026-10-27T09:00:00Z",
    "id": "00000000-0000-4000-8000-000000000002",
    "is_published": false,
    "language": "de",
    "status_page_id": "00000000-0000-4000-8000-000000000001",
    "translations": {
      "announcement": "Alle Systeme werden von up4 überwacht."
    },
    "updated_at": "2026-10-27T09:00:00Z"
  }
}
```

### 400

```json
{
  "error": {
    "code": "bad_request",
    "message": "The request is malformed or fails validation.",
    "request_id": "req_…"
  }
}
```

### 403

```json
{
  "error": {
    "code": "permission_denied",
    "message": "The credentials do not permit this action.",
    "request_id": "req_…"
  }
}
```

### 404

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource does not exist or is outside the caller's scope.",
    "request_id": "req_…"
  }
}
```
