MENU navbar-image

Introduction

Programmatic read and write access to your team's style guides.

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Endpoints where a credential is optional, such as the UUID validate probe, don't carry the badge; each endpoint's description says what it accepts. Generate a token from your team's settings page. Tokens may also be passed as ?key=<token> for legacy compatibility.

Auth

Introspect the calling token.

requires authentication

Returns the token's team, name, last use, and abilities. Any valid token is accepted; no ability is required.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/whoami" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/whoami"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/whoami

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Endpoints

Idempotently provision a Stylus team for a sibling app's customer.

Behaviour:

Example request:
curl --request POST \
    "https://stylus.proofedapps.com/api/teams/provision" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"name\": \"m\",
    \"source_product\": \"i\",
    \"default_guide_name\": \"y\",
    \"webhook_url\": \"http:\\/\\/www.ernser.org\\/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html\"
}"
const url = new URL(
    "https://stylus.proofedapps.com/api/teams/provision"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "name": "m",
    "source_product": "i",
    "default_guide_name": "y",
    "webhook_url": "http:\/\/www.ernser.org\/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/teams/provision

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: gbailey@example.net

name   string  optional    

Must not be greater than 255 characters. Example: m

source_product   string     

Must not be greater than 64 characters. Example: i

default_guide_name   string  optional    

Must not be greater than 255 characters. Example: y

webhook_url   string  optional    

Must be a valid URL. Must not be greater than 2048 characters. Example: http://www.ernser.org/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html

Ingest a batch of signals for a guide.

Body: { "signals": [ { "signal_type": "suggestion_rejected", "rule_slug": "no-em-dashes", // optional "snippet": "...some text...", // optional "metadata": {...}, // optional "occurred_at": "2026-05-14T..." // optional, defaults to now }, ... ], "source_product": "elizabeth" }

Example request:
curl --request POST \
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/signals" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"source_product\": \"b\",
    \"signals\": [
        {
            \"rule_slug\": \"b\",
            \"snippet\": \"n\",
            \"occurred_at\": \"2026-05-14T09:30:00Z\"
        }
    ]
}"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/signals"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "source_product": "b",
    "signals": [
        {
            "rule_slug": "b",
            "snippet": "n",
            "occurred_at": "2026-05-14T09:30:00Z"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/style-guides/{uuid}/signals

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

Body Parameters

source_product   string     

Must not be greater than 64 characters. Example: b

signals   object[]     

Must have at least 1 items. Must not have more than 500 items.

signal_type   string  optional    
rule_slug   string  optional    

Must not be greater than 255 characters. Example: b

snippet   string  optional    

Must not be greater than 10000 characters. Example: n

metadata   object  optional    
occurred_at   string  optional    

When it happened (ISO 8601). Defaults to now. Example: 2026-05-14T09:30:00Z

Aggregated analytics: counts by signal type, top rules by fire/rejection frequency, and a recency-windowed rejection rate.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/signals/summary" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/signals/summary"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/style-guides/{uuid}/signals/summary

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

Download a ground-truth document. Authorised by the signed URL alone; URLs are minted by the guide endpoint and expire.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/ground-truth-documents/1/download" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/ground-truth-documents/1/download"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/style-guides/{uuid}/ground-truth-documents/{doc_id}/download

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

doc_id   integer     

The document's id. Example: 1

Rules

Create a rule in a guide, or in a guide it inherits.

requires authentication

The other half of applying an assessment: a suggestion is as often "this guide is missing a rule about X" as "this rule is worded badly", and without this the drafted rule has nowhere to go.

section_id is required, and that is the important design decision here. Rules reach the proofing engine through sections — StyleGuideResource walks sections and publishes the rules hanging off them — so a rule attached to nothing is a rule the engine never sees. A create that quietly produced one would look like a success and behave like a no-op, which is the worst of both. Requiring the section makes the invisible case impossible rather than merely unlikely.

Example request:
curl --request POST \
    "https://stylus.proofedapps.com/api/style-guides/6ff8f7f6-1eb3-3525-be4a-3932c805afed/rules" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"section_id\": 16,
    \"name\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"example_usage\": \"architecto\",
    \"exceptions\": \"architecto\",
    \"incorrect_example\": \"architecto\",
    \"correct_example\": \"architecto\",
    \"slug\": \"architecto\",
    \"enabled\": false,
    \"actor\": \"architecto\",
    \"reason\": \"architecto\"
}"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/6ff8f7f6-1eb3-3525-be4a-3932c805afed/rules"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "section_id": 16,
    "name": "architecto",
    "description": "Eius et animi quos velit et.",
    "example_usage": "architecto",
    "exceptions": "architecto",
    "incorrect_example": "architecto",
    "correct_example": "architecto",
    "slug": "architecto",
    "enabled": false,
    "actor": "architecto",
    "reason": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "rule": {
        "id": 12,
        "slug": "serial-comma",
        "name": "Serial comma"
    },
    "section": {
        "id": 3,
        "name": "Punctuation"
    },
    "inherited": false
}
 

Example response (422):


{
    "error": {
        "code": "slug_taken",
        "message": "Another rule in the same guide already uses that slug."
    }
}
 

Request      

POST api/style-guides/{uuid}/rules

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide the rule is being added to. Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Body Parameters

section_id   integer     

The section to attach the rule to. Must belong to this guide or one it inherits. Example: 16

name   string     

The rule's name. Example: architecto

description   string     

What the rule says. Example: Eius et animi quos velit et.

example_usage   string  optional    

An illustration of the rule in use. Example: architecto

exceptions   string  optional    

Where the rule does not apply. Example: architecto

incorrect_example   string  optional    

The counter-example the rule rejects. Example: architecto

correct_example   string  optional    

Its corrected counterpart. Example: architecto

slug   string  optional    

Optional. Auto-generated from the name when omitted. Example: architecto

enabled   boolean  optional    

Defaults to true. Example: false

actor   string  optional    

The product and person making the change, for the audit log. Example: architecto

reason   string  optional    

Why, recorded alongside the change. Example: architecto

Update one rule of a guide, or of a guide it inherits.

requires authentication

Two request shapes, distinguished by the presence of fields:

The second exists because a drafted rule arrives as six or seven fields that only make sense together: a counter-example belongs to the description that explains it. Applied one request at a time, a failure on the fourth leaves a half-rewritten rule in a client's guide and an audit trail showing a change nobody intended. So the set is checked in full before anything is written, and written inside one transaction — all of it lands or none of it does.

Example request:
curl --request PATCH \
    "https://stylus.proofedapps.com/api/style-guides/6ff8f7f6-1eb3-3525-be4a-3932c805afed/rules/16" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"field\": \"architecto\",
    \"value\": \"architecto\",
    \"fields\": [],
    \"expected_current\": \"architecto\",
    \"actor\": \"architecto\",
    \"reason\": \"architecto\"
}"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/6ff8f7f6-1eb3-3525-be4a-3932c805afed/rules/16"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "field": "architecto",
    "value": "architecto",
    "fields": [],
    "expected_current": "architecto",
    "actor": "architecto",
    "reason": "architecto"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "rule": {
        "id": 12,
        "slug": "punctuation/serial-comma"
    },
    "changed": {
        "description": [
            "old",
            "new"
        ]
    },
    "inherited": false
}
 

Example response (409):


{
    "error": {
        "code": "stale",
        "message": "The rule has changed since the assessment ran."
    }
}
 

Request      

PATCH api/style-guides/{uuid}/rules/{rule}

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide the change was assessed against. Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

rule   integer     

The rule's id. Example: 16

Body Parameters

field   string  optional    

One of name, description, example_usage, exceptions, incorrect_example, correct_example, slug, enabled. Required unless fields is given. Example: architecto

value   string  optional    

The new value. For enabled, "true" or "false". Required with field. Example: architecto

fields   object  optional    

A map of field => new value, applied atomically. Use instead of field/value.

expected_current   string  optional    

The value the caller believed it was replacing — a string alongside field, or a field => expected map alongside fields. Example: architecto

actor   string  optional    

The product and person making the change, for the audit log. Example: architecto

reason   string  optional    

Why, recorded alongside the change. Example: architecto

Share Links

requires authentication

Every link made for the guide, newest first, whether made here or in the app. Links themselves are not returned (only their hash is kept), so keep the id from the create response to match a link to its status.

Requires the shares:read ability.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/share-links" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/share-links"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
    {
        "id": 42,
        "status": "active",
        "revoked": false,
        "expires_at": "2026-11-14T09:30:00+00:00",
        "revoked_at": null,
        "created_at": "2026-10-15T09:30:00+00:00",
        "created_via": "API (client-hub)",
        "last_used_at": "2026-10-16T08:12:44+00:00",
        "use_count": 7
    }
]
 

Example response (404):


{
    "error": {
        "code": "not_found",
        "message": "Style guide not found."
    }
}
 

requires authentication

Returns the link's url and raw token. This is the only time either is shown, so store them. Links last 30 days at most; pass expires_at to end one sooner. The link works until the end of that day (UTC), or until 30 days from now if that comes first.

Requires the shares:write ability.

Example request:
curl --request POST \
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/share-links" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"expires_at\": \"2026-11-10\"
}"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/share-links"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "expires_at": "2026-11-10"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "id": 42,
    "url": "https://stylus.proofedapps.com/shared/3rD4mV9qT0bXk2LpWz7Yc1NfHs8Ga5JeUiOo6RtQ",
    "token": "3rD4mV9qT0bXk2LpWz7Yc1NfHs8Ga5JeUiOo6RtQ",
    "status": "active",
    "revoked": false,
    "expires_at": "2026-11-10T23:59:59+00:00",
    "revoked_at": null,
    "created_at": "2026-10-15T09:30:00+00:00",
    "created_via": "API (client-hub)",
    "last_used_at": null,
    "use_count": 0
}
 

Example response (404):


{
    "error": {
        "code": "not_found",
        "message": "Style guide not found."
    }
}
 

Example response (422):


{
    "message": "The expires at field must be a date before or on 2026-11-14.",
    "errors": {
        "expires_at": [
            "The expires at field must be a date before or on 2026-11-14."
        ]
    }
}
 

requires authentication

The link stops working at once. Pass the raw token from the link's URL (the part after /shared/). Revoking a link that is already revoked or expired succeeds and reports its status.

Requires the shares:write ability.

Example request:
curl --request DELETE \
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/share-links/3rD4mV9qT0bXk2LpWz7Yc1NfHs8Ga5JeUiOo6RtQ" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/share-links/3rD4mV9qT0bXk2LpWz7Yc1NfHs8Ga5JeUiOo6RtQ"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": 42,
    "status": "revoked",
    "revoked": true,
    "expires_at": "2026-11-10T23:59:59+00:00",
    "revoked_at": "2026-10-20T14:02:11+00:00",
    "created_at": "2026-10-15T09:30:00+00:00",
    "created_via": "API (client-hub)",
    "last_used_at": "2026-10-16T08:12:44+00:00",
    "use_count": 7
}
 

Example response (404):


{
    "error": {
        "code": "not_found",
        "message": "Share link not found."
    }
}
 

Style Guides

List style guides for the authenticated team.

requires authentication

Returns every style guide owned by the calling team, including sections, rules, glossary terms, preferred spellings, and inheritance.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


[
    {
        "id": 1,
        "external_name": "Brand Guide",
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "sections": [],
        "glossary_terms": [],
        "preferred_spellings": [],
        "inherited_style_guides": []
    }
]
 

Request      

GET api/style-guides

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

List style guide summaries.

requires authentication

Returns just id, external_name, and uuid for each guide on the team.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides/list" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/list"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
    {
        "id": 1,
        "external_name": "Brand Guide",
        "uuid": "550e8400-e29b-41d4-a716-446655440000"
    }
]
 

Request      

GET api/style-guides/list

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Get a single style guide by UUID.

requires authentication

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": 1,
    "external_name": "Brand",
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "sections": [],
    "inherited_style_guides": []
}
 

Example response (404):


{
    "error": {
        "code": "not_found",
        "message": "Style guide not found."
    }
}
 

Request      

GET api/style-guides/{uuid}

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID. Example: 550e8400-e29b-41d4-a716-446655440000

Validate that a UUID corresponds to a guide the caller can access.

Optional authentication: an anonymous request is answered as a pure existence check, while a request that presents a credential is fully validated — a bad token is rejected, guides:read is enforced, and the result is scoped to the caller's team. Deliberately not marked @authenticated, which would render this as credentials-required.

Anonymous requests are limited to 120 a minute per IP address.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides/6ff8f7f6-1eb3-3525-be4a-3932c805afed/validate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/6ff8f7f6-1eb3-3525-be4a-3932c805afed/validate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true
}
 

Example response (404):


{
    "error": {
        "code": "not_found",
        "message": "Style guide not found."
    }
}
 

Request      

GET api/style-guides/{uuid}/validate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID. Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Create a new style guide for the calling team.

requires authentication

Used by sibling apps (Austen, Playbox) to create a per-project/workspace guide when an admin chooses "create a fresh guide" rather than reusing an existing one.

Example request:
curl --request POST \
    "https://stylus.proofedapps.com/api/style-guides" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"external_name\": \"Acme House Style\",
    \"internal_name\": \"Acme (web copy)\",
    \"description\": \"Voice, grammar and formatting for Acme\'s website.\",
    \"client_name\": \"Acme Ltd\",
    \"public\": false
}"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "external_name": "Acme House Style",
    "internal_name": "Acme (web copy)",
    "description": "Voice, grammar and formatting for Acme's website.",
    "client_name": "Acme Ltd",
    "public": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/style-guides

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

external_name   string     

The guide's public-facing name. Example: Acme House Style

internal_name   string  optional    

Name shown to your team. Defaults to external_name. Example: Acme (web copy)

description   string  optional    

What the guide covers. Example: Voice, grammar and formatting for Acme's website.

client_name   string  optional    

The client the guide belongs to. Defaults to the team name. Example: Acme Ltd

public   boolean  optional    

Publish a read-only public page for the guide. Defaults to false. Example: false

List public style guides.

No authentication required. Returns guides explicitly marked public by their team. Anonymous requests are limited to 120 a minute per IP address.

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/public-guides" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/public-guides"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
    {
        "id": 1,
        "external_name": "Public Demo",
        "uuid": "550e8400-e29b-41d4-a716-446655440000"
    }
]
 

Request      

GET api/public-guides

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Voice Profiles

Get the guide's voice profile.

requires authentication

Example request:
curl --request GET \
    --get "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request      

GET api/style-guides/{uuid}/voice-profile

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

Create the guide's voice profile (409 if one exists).

requires authentication

Example request:
curl --request POST \
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/style-guides/{uuid}/voice-profile

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

Update the guide's voice profile.

requires authentication

Example request:
curl --request PATCH \
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/style-guides/{uuid}/voice-profile

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

Remove the guide's voice profile.

requires authentication

Example request:
curl --request DELETE \
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/style-guides/{uuid}/voice-profile

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

Extract a voice profile from writing samples.

requires authentication

Sends up to 20 samples (10,000 bytes in total are analysed) to the AI model and returns the extracted profile. With dry_run the profile is returned without being saved; otherwise it replaces the guide's profile. Limited to 30 requests a minute per credential.

Example request:
curl --request POST \
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile/extract-from-samples" \
    --header "Authorization: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"samples\": [
        \"architecto\"
    ],
    \"dry_run\": false
}"
const url = new URL(
    "https://stylus.proofedapps.com/api/style-guides/550e8400-e29b-41d4-a716-446655440000/voice-profile/extract-from-samples"
);

const headers = {
    "Authorization": "Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "samples": [
        "architecto"
    ],
    "dry_run": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (422):


{
    "error": {
        "code": "extraction_failed",
        "message": "Unable to extract a voice profile: The AI service is busy right now. Please try again in a minute."
    }
}
 

Request      

POST api/style-guides/{uuid}/voice-profile/extract-from-samples

Headers

Authorization        

Example: Bearer 123|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The guide's UUID (or one of its aliases). Example: 550e8400-e29b-41d4-a716-446655440000

Body Parameters

samples   string[]     

One to twenty writing samples by the same author.

dry_run   boolean  optional    

Return the extracted profile without saving it. Example: false