Style guides

Note:This resource is not available in PhraseApp Enterprise

GET /v2/projects/:project_id/styleguides

List all styleguides for the given project.

This endpoint is paginated.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/styleguides" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp styleguides list <project_id>

Response

Status: 200
[ { "id": "abcd1234cdef1234abcd1234cdef1234", "title": "My Style Guide", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1234", "title": "My Style Guide", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ]

GET /v2/projects/:project_id/styleguides/:id

Get details on a single style guide.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/styleguides/:id" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp styleguide show <project_id> <id>

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "title": "My Style Guide", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z", "public_url": "https://phraseapp.com/styleguide/my-project/26f065cf597be340", "audience": "customer-facing", "target_audience": "teenager", "grammatical_person": "first_person_singular", "vocabulary_type": "technical", "business": "We are a travel site that helps customers find the best hotels and flights.", "company_branding": "ACME Inc. should never be translated.", "formatting": "Never use capital letters", "glossary_terms": "Appartement, cabin, loft", "grammar_consistency": "", "literal_translation": "Neutral", "overall_tone": "Tone should be fun and light", "samples": "http://www.myexample.com/my/document/path/to/samples.pdf" }

POST /v2/projects/:project_id/styleguides

Create a new style guide.

Parameters

Name Type Description
title string Style guide title
audience
optional
string Audience description
target_audience
optional
string Can be one of: not_specified, children, teenager, young_adults, adults, old_adults.
grammatical_person
optional
string Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural.
vocabulary_type
optional
string Can be one of: not_specified, popular, technical, fictional.
business
optional
string Description of the business
company_branding
optional
string Company branding to remain consistent.
formatting
optional
string Formatting requirements and character limitations.
glossary_terms
optional
string List of terms and/or phrases that need to be translated consistently.
grammar_consistency
optional
string Formal or informal pronouns, consistent conjugation, grammatical gender
literal_translation
optional
string Can be one of: Cultural/Conversational, Literal, Neutral.
overall_tone
optional
string Tone requirement descriptions
samples
optional
string Provide links to sample product pages, FAQ pages, etc. to give the translator a point of reference. You can also provide past translations. Even snippets or short paragraphs are helpful for maintaining consistency.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/styleguides" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"title":"Web application style guide","audience":"customer-facing","target_audience":"teenager","grammatical_person":"first_person_singular","vocabulary_type":"technical","business":"We are a travel site that helps customers find the best hotels and flights.","company_branding":"ACME Inc. should never be translated.","formatting":"Never use capital letters","glossary_terms":"Appartement, cabin, loft","grammar_consistency":"","literal_translation":"Neutral","overall_tone":"Tone should be fun and light","samples":"http://www.myexample.com/my/document/path/to/samples.pdf"}' \
  -H 'Content-Type: application/json'
phraseapp styleguide create <project_id> \
--title "Web application style guide" \
--audience customer-facing \
--target-audience teenager \
--grammatical-person first_person_singular \
--vocabulary-type technical \
--business "We are a travel site that helps customers find the best hotels and flights." \
--company-branding "ACME Inc. should never be translated." \
--formatting "Never use capital letters" \
--glossary-terms "Appartement, cabin, loft" \
--grammar-consistency  \
--literal-translation Neutral \
--overall-tone "Tone should be fun and light" \
--samples "http://www.myexample.com/my/document/path/to/samples.pdf"

Response

Status: 201
{ "id": "abcd1234cdef1234abcd1234cdef1234", "title": "My Style Guide", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z", "public_url": "https://phraseapp.com/styleguide/my-project/26f065cf597be340", "audience": "customer-facing", "target_audience": "teenager", "grammatical_person": "first_person_singular", "vocabulary_type": "technical", "business": "We are a travel site that helps customers find the best hotels and flights.", "company_branding": "ACME Inc. should never be translated.", "formatting": "Never use capital letters", "glossary_terms": "Appartement, cabin, loft", "grammar_consistency": "", "literal_translation": "Neutral", "overall_tone": "Tone should be fun and light", "samples": "http://www.myexample.com/my/document/path/to/samples.pdf" }

PATCH /v2/projects/:project_id/styleguides/:id

Update an existing style guide.

Parameters

Name Type Description
title string Style guide title
audience
optional
string Audience description
target_audience
optional
string Can be one of: not_specified, children, teenager, young_adults, adults, old_adults.
grammatical_person
optional
string Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural.
vocabulary_type
optional
string Can be one of: not_specified, popular, technical, fictional.
business
optional
string Description of the business
company_branding
optional
string Company branding to remain consistent.
formatting
optional
string Formatting requirements and character limitations.
glossary_terms
optional
string List of terms and/or phrases that need to be translated consistently.
grammar_consistency
optional
string Formal or informal pronouns, consistent conjugation, grammatical gender
literal_translation
optional
string Can be one of: Cultural/Conversational, Literal, Neutral.
overall_tone
optional
string Tone requirement descriptions
samples
optional
string Provide links to sample product pages, FAQ pages, etc. to give the translator a point of reference. You can also provide past translations. Even snippets or short paragraphs are helpful for maintaining consistency.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/styleguides/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"title":"Web application style guide","audience":"customer-facing","target_audience":"teenager","grammatical_person":"first_person_singular","vocabulary_type":"technical","business":"We are a travel site that helps customers find the best hotels and flights.","company_branding":"ACME Inc. should never be translated.","formatting":"Never use capital letters","glossary_terms":"Appartement, cabin, loft","grammar_consistency":"","literal_translation":"Neutral","overall_tone":"Tone should be fun and light","samples":"http://www.myexample.com/my/document/path/to/samples.pdf"}' \
  -H 'Content-Type: application/json'
phraseapp styleguide update <project_id> <id> \
--title "Web application style guide" \
--audience customer-facing \
--target-audience teenager \
--grammatical-person first_person_singular \
--vocabulary-type technical \
--business "We are a travel site that helps customers find the best hotels and flights." \
--company-branding "ACME Inc. should never be translated." \
--formatting "Never use capital letters" \
--glossary-terms "Appartement, cabin, loft" \
--grammar-consistency  \
--literal-translation Neutral \
--overall-tone "Tone should be fun and light" \
--samples "http://www.myexample.com/my/document/path/to/samples.pdf"

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "title": "My Style Guide", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z", "public_url": "https://phraseapp.com/styleguide/my-project/26f065cf597be340", "audience": "customer-facing", "target_audience": "teenager", "grammatical_person": "first_person_singular", "vocabulary_type": "technical", "business": "We are a travel site that helps customers find the best hotels and flights.", "company_branding": "ACME Inc. should never be translated.", "formatting": "Never use capital letters", "glossary_terms": "Appartement, cabin, loft", "grammar_consistency": "", "literal_translation": "Neutral", "overall_tone": "Tone should be fun and light", "samples": "http://www.myexample.com/my/document/path/to/samples.pdf" }

DELETE /v2/projects/:project_id/styleguides/:id

Delete an existing style guide.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:project_id/styleguides/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp styleguide delete <project_id> <id>

Response

Status: 204