/v1/brands/{brand_id}/cms-connections Connect a CMS
Connect a WordPress site to this brand so its articles can be published there.
The credentials are verified against the live site before anything is stored: a site that is unreachable, or an application password WordPress rejects, returns 422 validation_error and nothing is saved. Once stored, the application password is encrypted at rest and is never returned by this API.
A brand holds one connection per provider, so posting again for the same provider replaces the stored credentials rather than adding a second connection. That is how you rotate an application password, and the connection keeps its id. Posting a different site replaces the connection with a new one under a new id: the old target_id no longer publishes, and articles already published stay recorded against the site they went to.
Requires OWNER access on the brand.
Path parameters
-
Brand UUID.
Query parameters
-
Preview the call without executing it. Runs auth, scope, eligibility and body validation, then returns
200with adry_runobject reporting the request-unit and credit cost plus a non-consuming quota snapshot. Nothing is debited, reserved, dispatched or mutated. An invalid body still returns422.default: false
Header parameters
-
Required with an API key, else
400 idempotency_key_required: a new value per operation (a UUID works). A retry with the same key and body within 24 hours replays the first response instead of running again. Ignored withdry_run=true.
Request body
application/json required-
Credentials for the site. Verified against the live site before anything is stored.
Show fields
-
A WordPress application password (Users, then Profile, then Application Passwords), not the account password. Stored encrypted and never returned by this API.
-
Base URL of the WordPress site, for example
https://rankprompt.com. Must behttps, since the application password is sent on every publish. Hosts that resolve to private, loopback or link-local addresses are rejected. -
WordPress username the application password belongs to.
-
- provider string
CMS platform to connect through the API. Only
wordpresstoday; Ghost, Shopify, Webflow, GitHub and webhook destinations are connected from the dashboard, Wix by installing our app on the site from the dashboard and WordPress.com by approving access on WordPress.com from the dashboard, then all are listed here.
Responses
-
Owning brand id (UUID).
-
When the connection was created.
-
True when a secret is stored for this connection. The secret itself is never returned.
-
Connection id (UUID). Pass as
target_idwhen publishing. -
CMS platform, an open set (new values can appear):
wordpress,wordpress_com(a site hosted on WordPress.com),ghost,shopify,webflow,wix,github(a connected repository whose blog the article is written into, live once its pull request merges) or awebhookdestination. -
Credential health.
connectedwhen we last reached the site,errorwhen a check or publish failed,disconnectedwhen it was never established. -
When the connection was last modified.
- default_status enum (nullable) nullable
What the brand's owner chose for every send to this site:
draftwhen each article should land as a draft for someone to review,askwhen it is chosen per publish. This API does not apply it for you:publish_statusstill defaults topublish, so sendpublish_status: draftwhen this saysdraft. Null for a provider without this choice (github,webhook) and for the hosted blog. - last_error_at string (nullable) nullable
When
last_error_codewas set; null while the connection works. - last_error_code string (nullable) nullable
Why the connection needs its owner, or null when it works. An open set (new values can appear):
token_expired,scope_missing,not_selected,auth_failed,permission_missing,site_unreachable,host_moved,app_uninstalled,rate_limited,vendor_down. - last_synced_at string (nullable) nullable
Last time the credentials were confirmed working. Only advances on a successful check.
- object string
Always
cms_connection. - settings CmsConnectionSettings
The owner's other publishing choices for this site, read only. Credentials are never included.
Show fields
- author_id integer (nullable) nullable
wordpressandwordpress_com: the site user posts are credited to, or null for the connected user. Null for other providers. - category_ids array of integer | string (nullable) nullable
wordpressandwordpress_com(numeric ids) andwix(GUIDs): the categories every post goes in, empty for the site's default category. Null for other providers. - featured_image enum (nullable) nullable
Where the article's featured image goes:
featured_and_body(the CMS's featured image and the top of the body),featured_onlyorbody_only. Null where the CMS has no featured image of its own. - primary_tag string (nullable) nullable
ghost: the tag every post leads with, or null for the article's first tag. Null for other providers.
-
- site_url string (nullable) nullable
Where the connection publishes: the site, the Shopify blog or the Webflow collection. For a
webhookonly its host, since the full URL works as a credential. Forgithub, the repository. - username string (nullable) nullable
Username the stored credential belongs to.
-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "validation_error",
"message": "Request validation failed"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid credentials"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "forbidden",
"message": "You do not have permission to access this resource"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "not_found",
"message": "Resource not found"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "conflict",
"message": "Resource conflict"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "body_validation_error",
"message": "Request body did not match the expected schema"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "rate_limit_exceeded",
"message": "Per-minute rate limit exceeded"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}-
Show fields
-
Stable machine-readable error code from the catalog.
-
Human-readable description suitable for logging.
- details object
Optional, code-specific context (e.g.
errorsarray forvalidation_error,retry_afterforservice_unavailable). Shape depends onerror.code; treat as opaque otherwise.Show fields
Empty object (no properties).
-
- request_id string
Server-generated correlation id for the request. Mirrors the
X-Correlation-IDresponse header. Include this when contacting support.
Example response
{
"error": {
"code": "service_unavailable",
"message": "Service temporarily unavailable, please retry"
},
"request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}