Set a URL's Pin Spacing rule
const url = 'https://api-v1.tailwind.ai/v1/accounts/example/pin-spacing/custom-rule';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","spacing":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api-v1.tailwind.ai/v1/accounts/example/pin-spacing/custom-rule \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "spacing": 1 }'Create or replace the custom Pin Spacing rule for one destination URL: the minimum number of days between scheduled Pins linking to it, overriding the account default. URLs match regardless of http/https and trailing slashes, so a variant of a URL that already has a rule updates that rule rather than adding a second one. A linked URL follows its base URL’s rule, so setting a rule through a linked URL sets the base URL’s rule, which governs the base and every URL linked to it; linkedToUrl names the base when that happens. previousSpacing is the custom rule it replaced, or null when the URL had none. Only Pins scheduled after the write are spaced by it: This call does not move Pins already on the schedule; to respace them, use the dashboard’s Pin Spacing settings. Free, as in the dashboard.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Numeric Tailwind account ID returned by GET /v1/accounts
Request Bodyrequired
Section titled “Request Bodyrequired”object
The destination URL, the same value a post takes as url
Minimum days between Pins to this URL
Examplegenerated
{ "url": "example", "spacing": 1}Responses
Section titled “Responses”The custom rule now in effect
object
object
The URL that was sent
The base URL whose rule was set when url is a linked URL; null otherwise
object
Minimum days between Pins to the URL
The URL the rule is stored on: the base URL when the request named a linked URL
The custom spacing this replaced; null when the URL had no custom rule
object
Unique request ID for debugging
Example
{ "data": { "rule": { "ruleType": "CUSTOM", "spacingUnits": "DAYS" } }}Invalid request
object
object
Error code
Error message
Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded, post_limit_reached. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.
Present with reason post_limit_reached when saving Pins to a Board: monthly for the plan’s post limit per billing period, lifetime for a free plan’s lifetime cap.
Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.
object
Unique request ID for debugging
Example
{ "error": { "code": "BAD_REQUEST", "message": "Invalid request body" }, "meta": { "requestId": "abc123" }}Authentication required or invalid bearer credentials
object
object
Error code
Error message
Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded, post_limit_reached. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.
Present with reason post_limit_reached when saving Pins to a Board: monthly for the plan’s post limit per billing period, lifetime for a free plan’s lifetime cap.
Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.
object
Unique request ID for debugging
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Invalid API key" }, "meta": { "requestId": "abc123" }}Resource not found
object
object
Error code
Error message
Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded, post_limit_reached. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.
Present with reason post_limit_reached when saving Pins to a Board: monthly for the plan’s post limit per billing period, lifetime for a free plan’s lifetime cap.
Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.
object
Unique request ID for debugging
Example
{ "error": { "code": "NOT_FOUND", "message": "Account not found" }, "meta": { "requestId": "abc123" }}Rate limit exceeded
object
object
Error code
Error message
Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded, post_limit_reached. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.
Present with reason post_limit_reached when saving Pins to a Board: monthly for the plan’s post limit per billing period, lifetime for a free plan’s lifetime cap.
Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.
object
Unique request ID for debugging
Example
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Daily rate limit of 10000 requests for this organization exceeded. Resets at midnight UTC." }, "meta": { "requestId": "abc123" }}Headers
Section titled “Headers”Seconds until the daily limit resets at midnight UTC.
