curl --request POST \
--url https://eu.phrase.com/styleguide/api/v1/rules/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pageNumber": 0,
"pageSize": 20,
"sortBy": "createdAt",
"sortDirection": "DESC",
"contentGroupIds": [
"cg-marketing-en"
],
"languages": [
"en-GB"
],
"active": true,
"aiCheckEnabled": true,
"styleGuideIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"lastModifiedBy": [
"5efc4feca115ac0bb5321917"
],
"ruleText": "Oxford comma"
}
'import requests
url = "https://eu.phrase.com/styleguide/api/v1/rules/search"
payload = {
"pageNumber": 0,
"pageSize": 20,
"sortBy": "createdAt",
"sortDirection": "DESC",
"contentGroupIds": ["cg-marketing-en"],
"languages": ["en-GB"],
"active": True,
"aiCheckEnabled": True,
"styleGuideIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
"lastModifiedBy": ["5efc4feca115ac0bb5321917"],
"ruleText": "Oxford comma"
}
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({
pageNumber: 0,
pageSize: 20,
sortBy: 'createdAt',
sortDirection: 'DESC',
contentGroupIds: ['cg-marketing-en'],
languages: ['en-GB'],
active: true,
aiCheckEnabled: true,
styleGuideIds: ['3fa85f64-5717-4562-b3fc-2c963f66afa6'],
lastModifiedBy: ['5efc4feca115ac0bb5321917'],
ruleText: 'Oxford comma'
})
};
fetch('https://eu.phrase.com/styleguide/api/v1/rules/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/rules/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([
'pageNumber' => 0,
'pageSize' => 20,
'sortBy' => 'createdAt',
'sortDirection' => 'DESC',
'contentGroupIds' => [
'cg-marketing-en'
],
'languages' => [
'en-GB'
],
'active' => true,
'aiCheckEnabled' => true,
'styleGuideIds' => [
'3fa85f64-5717-4562-b3fc-2c963f66afa6'
],
'lastModifiedBy' => [
'5efc4feca115ac0bb5321917'
],
'ruleText' => 'Oxford comma'
]),
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/rules/search"
payload := strings.NewReader("{\n \"pageNumber\": 0,\n \"pageSize\": 20,\n \"sortBy\": \"createdAt\",\n \"sortDirection\": \"DESC\",\n \"contentGroupIds\": [\n \"cg-marketing-en\"\n ],\n \"languages\": [\n \"en-GB\"\n ],\n \"active\": true,\n \"aiCheckEnabled\": true,\n \"styleGuideIds\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"lastModifiedBy\": [\n \"5efc4feca115ac0bb5321917\"\n ],\n \"ruleText\": \"Oxford comma\"\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/rules/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pageNumber\": 0,\n \"pageSize\": 20,\n \"sortBy\": \"createdAt\",\n \"sortDirection\": \"DESC\",\n \"contentGroupIds\": [\n \"cg-marketing-en\"\n ],\n \"languages\": [\n \"en-GB\"\n ],\n \"active\": true,\n \"aiCheckEnabled\": true,\n \"styleGuideIds\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"lastModifiedBy\": [\n \"5efc4feca115ac0bb5321917\"\n ],\n \"ruleText\": \"Oxford comma\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/rules/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 \"pageNumber\": 0,\n \"pageSize\": 20,\n \"sortBy\": \"createdAt\",\n \"sortDirection\": \"DESC\",\n \"contentGroupIds\": [\n \"cg-marketing-en\"\n ],\n \"languages\": [\n \"en-GB\"\n ],\n \"active\": true,\n \"aiCheckEnabled\": true,\n \"styleGuideIds\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"lastModifiedBy\": [\n \"5efc4feca115ac0bb5321917\"\n ],\n \"ruleText\": \"Oxford comma\"\n}"
response = http.request(request)
puts response.read_body{
"content": [
{
"id": "01900000-0000-7000-8000-000000000001",
"rule": "Avoid passive voice in all user-facing content.",
"active": true,
"aiCheckEnabled": true,
"allContentGroups": true,
"allLanguages": true,
"contentGroups": [
{
"id": "cg-marketing-en"
}
],
"languages": [
{
"bcpCode": "en-GB",
"description": "English (United Kingdom)",
"language": "cs",
"region": "gb",
"script": "LATN"
}
],
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-06-01T14:22:00Z",
"styleGuide": null,
"createdBy": null,
"lastModifiedBy": null
}
],
"totalElements": 123,
"totalPages": 123,
"pageNumber": 123,
"pageSize": 123,
"numberOfElements": 123
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}List Rules
Returns a paginated, sorted list of Rules. Defaults to creation date descending.
curl --request POST \
--url https://eu.phrase.com/styleguide/api/v1/rules/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pageNumber": 0,
"pageSize": 20,
"sortBy": "createdAt",
"sortDirection": "DESC",
"contentGroupIds": [
"cg-marketing-en"
],
"languages": [
"en-GB"
],
"active": true,
"aiCheckEnabled": true,
"styleGuideIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"lastModifiedBy": [
"5efc4feca115ac0bb5321917"
],
"ruleText": "Oxford comma"
}
'import requests
url = "https://eu.phrase.com/styleguide/api/v1/rules/search"
payload = {
"pageNumber": 0,
"pageSize": 20,
"sortBy": "createdAt",
"sortDirection": "DESC",
"contentGroupIds": ["cg-marketing-en"],
"languages": ["en-GB"],
"active": True,
"aiCheckEnabled": True,
"styleGuideIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
"lastModifiedBy": ["5efc4feca115ac0bb5321917"],
"ruleText": "Oxford comma"
}
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({
pageNumber: 0,
pageSize: 20,
sortBy: 'createdAt',
sortDirection: 'DESC',
contentGroupIds: ['cg-marketing-en'],
languages: ['en-GB'],
active: true,
aiCheckEnabled: true,
styleGuideIds: ['3fa85f64-5717-4562-b3fc-2c963f66afa6'],
lastModifiedBy: ['5efc4feca115ac0bb5321917'],
ruleText: 'Oxford comma'
})
};
fetch('https://eu.phrase.com/styleguide/api/v1/rules/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/rules/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([
'pageNumber' => 0,
'pageSize' => 20,
'sortBy' => 'createdAt',
'sortDirection' => 'DESC',
'contentGroupIds' => [
'cg-marketing-en'
],
'languages' => [
'en-GB'
],
'active' => true,
'aiCheckEnabled' => true,
'styleGuideIds' => [
'3fa85f64-5717-4562-b3fc-2c963f66afa6'
],
'lastModifiedBy' => [
'5efc4feca115ac0bb5321917'
],
'ruleText' => 'Oxford comma'
]),
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/rules/search"
payload := strings.NewReader("{\n \"pageNumber\": 0,\n \"pageSize\": 20,\n \"sortBy\": \"createdAt\",\n \"sortDirection\": \"DESC\",\n \"contentGroupIds\": [\n \"cg-marketing-en\"\n ],\n \"languages\": [\n \"en-GB\"\n ],\n \"active\": true,\n \"aiCheckEnabled\": true,\n \"styleGuideIds\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"lastModifiedBy\": [\n \"5efc4feca115ac0bb5321917\"\n ],\n \"ruleText\": \"Oxford comma\"\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/rules/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pageNumber\": 0,\n \"pageSize\": 20,\n \"sortBy\": \"createdAt\",\n \"sortDirection\": \"DESC\",\n \"contentGroupIds\": [\n \"cg-marketing-en\"\n ],\n \"languages\": [\n \"en-GB\"\n ],\n \"active\": true,\n \"aiCheckEnabled\": true,\n \"styleGuideIds\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"lastModifiedBy\": [\n \"5efc4feca115ac0bb5321917\"\n ],\n \"ruleText\": \"Oxford comma\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/styleguide/api/v1/rules/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 \"pageNumber\": 0,\n \"pageSize\": 20,\n \"sortBy\": \"createdAt\",\n \"sortDirection\": \"DESC\",\n \"contentGroupIds\": [\n \"cg-marketing-en\"\n ],\n \"languages\": [\n \"en-GB\"\n ],\n \"active\": true,\n \"aiCheckEnabled\": true,\n \"styleGuideIds\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"lastModifiedBy\": [\n \"5efc4feca115ac0bb5321917\"\n ],\n \"ruleText\": \"Oxford comma\"\n}"
response = http.request(request)
puts response.read_body{
"content": [
{
"id": "01900000-0000-7000-8000-000000000001",
"rule": "Avoid passive voice in all user-facing content.",
"active": true,
"aiCheckEnabled": true,
"allContentGroups": true,
"allLanguages": true,
"contentGroups": [
{
"id": "cg-marketing-en"
}
],
"languages": [
{
"bcpCode": "en-GB",
"description": "English (United Kingdom)",
"language": "cs",
"region": "gb",
"script": "LATN"
}
],
"createdAt": "2024-01-15T10:30:00Z",
"lastModifiedAt": "2024-06-01T14:22:00Z",
"styleGuide": null,
"createdBy": null,
"lastModifiedBy": null
}
],
"totalElements": 123,
"totalPages": 123,
"pageNumber": 123,
"pageSize": 123,
"numberOfElements": 123
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}Authorizations
JWT from IDM (Authorization: Bearer )
Body
Request parameters for listing Rules
Page number (0-indexed)
x >= 00
Page size (1–100)
1 <= x <= 10020
Sort field
createdAt, rule "createdAt"
Sort direction
ASC, DESC "DESC"
Filter by content group IDs (multi-valued). An empty list matches all content groups.
501["cg-marketing-en"]
Filter by language codes (multi-valued, exact match). An empty list matches all languages.
501["en-GB"]
Filter by active status.
true
Filter by AI-check-enabled status.
true
Filter by Style Guide IDs (multi-valued). Rules not linked to any Style Guide are excluded when this filter is set. If omitted or empty, this filter is not applied.
50["3fa85f64-5717-4562-b3fc-2c963f66afa6"]
Filter by last-modified-by user account IDs (multi-valued). If omitted or empty, this filter is not applied.
501["5efc4feca115ac0bb5321917"]
Filter by rule text (case-insensitive contains match).
450"Oxford comma"
Response
Rules retrieved successfully
Paginated list of Rules
Show child attributes
Show child attributes
Total number of rules matching the query
Total number of pages
Current page number (0-indexed)
Page size
Number of rules in the current page
Was this page helpful?