Skip to content

Translations​

The owner-side Translations tab: a campaign's, its milestones' and its updates' rows in the other supported locales (en, ru, uk, es), hand-edited or regenerated. The public read paths already serve the translated text; these endpoints are for authors.


List a campaign's translations​

GET
/fundraisers/{id}/translations

The Translations tab's data for one campaign: its source text and language, one row per other supported locale (fields null and source: null where nothing has been translated yet), the row in the campaign's own language if one exists (original_row), and every milestone with its rows.
Only the campaign's owner may read it.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"

Responses​

Source text and per-locale translations

application/json
JSON
{
"data": {
"fundraiser_id": "string",
"source": {
"language": "string",
"title": "string",
"summary": "string",
"story_html": "string"
},
"translations": [
],
"original_row": {
"language": "string",
"title": "string",
"summary": "string",
"story_html": "string",
"source": "string",
"translated_at": "string"
},
"milestones": [
]
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Save a hand-edited campaign translation​

PUT
/fundraisers/{id}/translations/{lang}

Creates or overwrites the campaign's translation in lang with a hand-edited version and marks it source: "human", so automatic re-translation leaves it alone. Campaign owner only. Audit-logged.
lang may not be the campaign's stored source language; that text is edited on the campaign itself.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"
lang*
Type
string
Required
Valid values
"en""ru""uk""es"

Request Body​

application/json
JSON
{
"title": "string",
"summary": "string",
"story_html": "string"
}

Responses​

The saved row

application/json
JSON
{
"data": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Discard a hand-edited version in the campaign's own language​

DELETE
/fundraisers/{id}/translations/{lang}

Deletes the hand-edited (source: "human") rows in the campaign's OWN language, both the campaign's row and its milestones' rows. Such a version exists when someone edited that language while the campaign was labelled with another one; readers of that language are served it instead of the original until it is discarded. Machine rows for fields written in another language are rebuilt in the background afterwards.
Only works for lang equal to the campaign's stored source language; a translation into another language is replaced with regenerate instead. Campaign owner only. The discarded text is written to the audit log.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"
lang*
Type
string
Required
Valid values
"en""ru""uk""es"

Responses​

What was discarded

application/json
JSON
{
"data": {
"language": "string",
"discarded": {
"campaign": 0,
"milestones": 0
}
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Regenerate a campaign translation​

POST
/fundraisers/{id}/translations/{lang}/regenerate

Re-runs machine translation of the campaign into lang and stores it as source: "machine". The locale's milestone rows are refreshed the same way. Campaign owner only. Audit-logged.
A hand-edited row is not overwritten unless force=1 (or true) is passed; without it the call answers 409. It also answers 409 when the campaign text or the row changed while the translation was being generated.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"
lang*
Type
string
Required
Valid values
"en""ru""uk""es"

Query Parameters

force

1 or true overwrites a hand-edited row.

Type
string
Valid values
"1""true"

Responses​

The regenerated row

application/json
JSON
{
"data": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Save a hand-edited milestone translation​

PUT
/fundraisers/{id}/milestones/{milestoneId}/translations/{lang}

Creates or overwrites one milestone's translation in lang as source: "human". The milestone must belong to the campaign in the path. Campaign owner only. Audit-logged. lang may not be the campaign's source language.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"
milestoneId*
Type
string
Required
Format
"uuid"
lang*
Type
string
Required
Valid values
"en""ru""uk""es"

Request Body​

application/json
JSON
{
"title": "string",
"description": "string"
}

Responses​

The saved row

application/json
JSON
{
"data": {
"milestone_id": "string",
"language": "string",
"title": "string",
"description": "string",
"source": "string",
"translated_at": "string"
}
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


List translations of a campaign's updates​

GET
/fundraisers/{id}/updates/translations

Every live (not withdrawn) update of the campaign, newest first, with its original text and language and one row per other supported locale. Campaign owner only.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"

Responses​

Updates with their translations

application/json
JSON
{
"data": {
"fundraiser_id": "string",
"updates": [
]
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Get one update's translations​

GET
/fundraisers/{id}/updates/{updateId}/translations

One update of the campaign: its original and its rows in the other three locales. Campaign owner only. A withdrawn update, or one belonging to another campaign, answers 404.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"
updateId*
Type
string
Required
Format
"uuid"

Responses​

The update and its translations

application/json
JSON
{
"data": {
"fundraiser_id": "string",
"update_id": "string",
"id": "string",
"created_at": "string",
"source": {
"language": "string",
"title": "string",
"content": "string",
"edited_at": "string"
},
"translations": [
]
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Save a hand-edited update translation​

PUT
/fundraisers/{id}/updates/{updateId}/translations/{lang}

Creates or overwrites an update's translation in lang as source: "human", so no automatic pass overwrites it. Campaign owner only. Audit-logged. Refused in the update's own language. When the update has a title, the translation must carry one too.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"
updateId*
Type
string
Required
Format
"uuid"
lang*
Type
string
Required
Valid values
"en""ru""uk""es"

Request Body​

application/json
JSON
{
"title": "string",
"content": "string"
}

Responses​

The saved row

application/json
JSON
{
"data": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Regenerate an update translation​

POST
/fundraisers/{id}/updates/{updateId}/translations/{lang}/regenerate

Re-runs machine translation of one update into lang and stores it as source: "machine". A hand-edited row is only replaced with force=1. Campaign owner only. Audit-logged.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

id*

The campaign's UUID.

Type
string
Required
Format
"uuid"
updateId*
Type
string
Required
Format
"uuid"
lang*
Type
string
Required
Valid values
"en""ru""uk""es"

Query Parameters

force

1 or true overwrites a hand-edited row.

Type
string
Valid values
"1""true"

Responses​

The regenerated row

application/json
JSON
{
"data": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Deprecated

List a legacy update's translations​

GET
/updates/{updateId}/translations

Legacy. Campaign updates are translated through GET /fundraisers/{id}/updates/{updateId}/translations; use that instead.
Returns the update's source text and one row per other locale. The caller must own the parent campaign.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

updateId*
Type
string
Required
Format
"uuid"

Responses​

Source and translations

application/json
JSON
{
"data": {
"update_id": "string",
"fundraiser_id": "string",
"source": {
"language": "string",
"title": "string",
"content": "string"
},
"translations": [
]
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Deprecated

Save a legacy update translation​

PUT
/updates/{updateId}/translations/{lang}

Legacy (see GET /updates/{updateId}/translations). Saves a hand-edited translation as source: "human". Owner of the parent campaign only. Audit-logged.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

updateId*
Type
string
Required
Format
"uuid"
lang*
Type
string
Required
Valid values
"en""ru""uk""es"

Request Body​

application/json
JSON
{
"title": "string",
"content": "string"
}

Responses​

The saved row

application/json
JSON
{
"data": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Powered by VitePress OpenAPI

Built with VitePress