Skip to main content
POST
/
api
/
v1
/
styleguides
/
search
List Style Guides
curl --request POST \
  --url https://eu.phrase.com/styleguide/api/v1/styleguides/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "guide",
  "languages": [
    "<string>"
  ],
  "lastModifiedFrom": "2024-01-01T00:00:00Z",
  "lastModifiedTo": "2024-12-31T23:59:59Z",
  "isDefault": true,
  "lastModifiedBy": [
    "<string>"
  ],
  "description": "branding",
  "sortBy": "name",
  "sortDirection": "ASC",
  "pageNumber": 0,
  "pageSize": 20
}
'
import requests

url = "https://eu.phrase.com/styleguide/api/v1/styleguides/search"

payload = {
    "name": "guide",
    "languages": ["<string>"],
    "lastModifiedFrom": "2024-01-01T00:00:00Z",
    "lastModifiedTo": "2024-12-31T23:59:59Z",
    "isDefault": True,
    "lastModifiedBy": ["<string>"],
    "description": "branding",
    "sortBy": "name",
    "sortDirection": "ASC",
    "pageNumber": 0,
    "pageSize": 20
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'guide',
    languages: ['<string>'],
    lastModifiedFrom: '2024-01-01T00:00:00Z',
    lastModifiedTo: '2024-12-31T23:59:59Z',
    isDefault: true,
    lastModifiedBy: ['<string>'],
    description: 'branding',
    sortBy: 'name',
    sortDirection: 'ASC',
    pageNumber: 0,
    pageSize: 20
  })
};

fetch('https://eu.phrase.com/styleguide/api/v1/styleguides/search', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://eu.phrase.com/styleguide/api/v1/styleguides/search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'guide',
    'languages' => [
        '<string>'
    ],
    'lastModifiedFrom' => '2024-01-01T00:00:00Z',
    'lastModifiedTo' => '2024-12-31T23:59:59Z',
    'isDefault' => true,
    'lastModifiedBy' => [
        '<string>'
    ],
    'description' => 'branding',
    'sortBy' => 'name',
    'sortDirection' => 'ASC',
    'pageNumber' => 0,
    'pageSize' => 20
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

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

func main() {

	url := "https://eu.phrase.com/styleguide/api/v1/styleguides/search"

	payload := strings.NewReader("{\n  \"name\": \"guide\",\n  \"languages\": [\n    \"<string>\"\n  ],\n  \"lastModifiedFrom\": \"2024-01-01T00:00:00Z\",\n  \"lastModifiedTo\": \"2024-12-31T23:59:59Z\",\n  \"isDefault\": true,\n  \"lastModifiedBy\": [\n    \"<string>\"\n  ],\n  \"description\": \"branding\",\n  \"sortBy\": \"name\",\n  \"sortDirection\": \"ASC\",\n  \"pageNumber\": 0,\n  \"pageSize\": 20\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://eu.phrase.com/styleguide/api/v1/styleguides/search")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"guide\",\n  \"languages\": [\n    \"<string>\"\n  ],\n  \"lastModifiedFrom\": \"2024-01-01T00:00:00Z\",\n  \"lastModifiedTo\": \"2024-12-31T23:59:59Z\",\n  \"isDefault\": true,\n  \"lastModifiedBy\": [\n    \"<string>\"\n  ],\n  \"description\": \"branding\",\n  \"sortBy\": \"name\",\n  \"sortDirection\": \"ASC\",\n  \"pageNumber\": 0,\n  \"pageSize\": 20\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://eu.phrase.com/styleguide/api/v1/styleguides/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"guide\",\n  \"languages\": [\n    \"<string>\"\n  ],\n  \"lastModifiedFrom\": \"2024-01-01T00:00:00Z\",\n  \"lastModifiedTo\": \"2024-12-31T23:59:59Z\",\n  \"isDefault\": true,\n  \"lastModifiedBy\": [\n    \"<string>\"\n  ],\n  \"description\": \"branding\",\n  \"sortBy\": \"name\",\n  \"sortDirection\": \"ASC\",\n  \"pageNumber\": 0,\n  \"pageSize\": 20\n}"

response = http.request(request)
puts response.read_body
{
  "content": [
    {
      "id": "018e1234-5678-7890-abcd-ef1234567890",
      "name": "English Style Guide",
      "description": "Style guide for English content",
      "language": {
        "bcpCode": "en-GB",
        "description": "English (United Kingdom)",
        "language": "cs",
        "region": "gb",
        "script": "LATN"
      },
      "isDefault": false,
      "createdBy": {
        "id": "0015oCjtouINgRCDIvQtjo",
        "username": "john.doe",
        "fullName": "John Doe",
        "email": "john.doe@example.com",
        "avatarUrl": "https://example.com/avatars/john-doe.png"
      },
      "lastModifiedBy": {
        "id": "0015oCjtouINgRCDIvQtjo",
        "username": "john.doe",
        "fullName": "John Doe",
        "email": "john.doe@example.com",
        "avatarUrl": "https://example.com/avatars/john-doe.png"
      },
      "contentGroup": {
        "id": "my-content-group"
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "lastModifiedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "totalElements": 123,
  "totalPages": 123,
  "pageNumber": 123,
  "pageSize": 123,
  "numberOfElements": 123
}
{
  "code": "<string>",
  "message": "<string>",
  "detail": "<string>"
}
{
  "code": "<string>",
  "message": "<string>",
  "detail": "<string>"
}
{
  "code": "<string>",
  "message": "<string>",
  "detail": "<string>"
}

Authorizations

Authorization
string
header
required

JWT from IDM (Authorization: Bearer )

Body

application/json

Request parameters for listing Style Guides

name
string

Search filter for Style Guide name (case-insensitive partial match)

Example:

"guide"

languages
string[]

Filter by languages (multi-valued). Each language must be a supported Style Guide language (e.g., en, en-GB)

Minimum string length: 1
lastModifiedFrom
string<date-time>

Filter by last modified date - from (inclusive)

Example:

"2024-01-01T00:00:00Z"

lastModifiedTo
string<date-time>

Filter by last modified date - to (inclusive)

Example:

"2024-12-31T23:59:59Z"

isDefault
boolean

Filter by default status

Example:

true

lastModifiedBy
string[]

Filter by last modified by user IDs (multi-valued)

description
string

Search filter for Style Guide description (case-insensitive partial match)

Example:

"branding"

sortBy
enum<string>

Sort field: name, language, or lastModifiedAt

Available options:
name,
language,
lastModifiedAt
Example:

"name"

sortDirection
enum<string>

Sort direction: ASC or DESC

Available options:
ASC,
DESC
Example:

"ASC"

pageNumber
integer<int32>

Page number (0-indexed)

Required range: x >= 0
Example:

0

pageSize
integer<int32>

Page size

Required range: 1 <= x <= 100
Example:

20

Response

Style Guides retrieved successfully

Paginated list of Style Guide summaries

content
object[]
totalElements
integer<int64>

Total number of elements matching the query (filtered count)

totalPages
integer<int32>

Total number of pages

pageNumber
integer<int32>

Current page number (0-indexed)

pageSize
integer<int32>

Page size

numberOfElements
integer<int32>

Number of elements in the current page