Skip to main content
Use update schedules to refresh tracked posts at set times or follow a new post for its first hours. You can also request one extra update for a post covered by an active schedule. Each paid update costs USD 0.002 when the provider accepts the work. Grade settles the organization’s charges daily and carries fractions of a cent forward. Download the OpenAPI document to generate a client, or copy the standalone TypeScript client.

Access and operations

All paths below are relative to /sdk/v1/update-schedules. Send X-Application-Id and X-Api-Key on every request. Grant scraping:read for reads and estimates, and scraping:write for mutations. A client that reviews costs and then turns on a schedule needs both scopes. Only an organization admin can grant them, with the developer portal’s Post updates preset or area. Full access and Read only leave them out. Grade is opening update schedules to organizations gradually. Until yours has them, every call here answers 403 UPDATE_SCHEDULE_NOT_RELEASED and the portal does not offer Post updates. Each success has one JSON envelope, { "success": true, "data": ... }. Each mutation requires X-Idempotency-Key. Assign and persist a distinct key of 1–100 visible ASCII characters for each intended action before sending it. Retry an uncertain request with the same key, path and body, even after rotating the API key for the same application. Reusing that key for a changed body or another path returns 409 IDEMPOTENCY_PAYLOAD_MISMATCH. The estimate is a read. It needs no idempotency key and never queues work.

Estimate a schedule

Set campaignId to a campaign ID for a campaign schedule or to null for the whole organization. A schedule scoped to a campaign takes precedence over the organization’s schedule of the same kind for that campaign. Use the /sdk/v1 base URL and credentials of your environment.
Review data.issues, data.notes and data.parts with the intended decision-maker. Each issue identifies a field by path. perMonth.costUsd includes the limits; costWithoutLimitsUsd shows the estimated demand before limits. Costs use a 30-day month. Counts or alert estimates can be null when unknown or inapplicable. The overview’s billing.chargedThisMonthUsd and billing.notChargedYetUsd are separate from the forecast. A null billing summary means those figures are unavailable.

Rule bodies

For post_uploaded, add 1–12 steps in order. A check repeats every 5–360 minutes in increments of 5 for 1–72 whole hours. Its on_each_check array accepts alerts or conditions. A condition runs its then actions the first time a post meets the threshold. An alert uses one of the organization’s configured slack, discord or webhook destinations. Supply to, message and once_per_post. The condition below updates the post once after it reaches 50,000 views.
A condition can compare views, likes, comments or shares with a positive fixed number. For example, YouTube reports no shares for these checks. A shares condition across X and YouTube applies to X posts. A YouTube-only shares condition must be changed before saving or activation. See the typed request and response definitions for the complete step shapes.

Save and review changes

Save the approved draft with POST /. Read its current version and the organization’s dailyLimit.limit. Estimate the saved schedule and review its cost, monthly budget and the daily limit before turning it on. An edit to an ON schedule takes effect when you save the new version. Turning a schedule off stops new scheduled and on-demand updates. Updates already queued can still run. Grade bills those updates when the provider accepts them.
Use the values reviewed for this operation. Another admin can change the shared limit through a different schedule. A stale expectedVersion, expectedStatus or expectedDailyLimit returns 409 SCHEDULE_CHANGED. Fetch and review the latest state before submitting a revised request with a new key. A daily limit of zero pauses paid post updates and paid discovery across the organization. The daily limit accepts whole numbers from 0 to 1,000,000. A positive daily limit covers paid post updates; paid discovery also draws on the monthly budget and wallet.

Request one update and check its receipt

Choose a post included in the active schedule. Use CCM and its campaignCreatorMediaId for campaign media or ATM and its tracked media ID for standalone tracking. Send the saved version and persist the returned updateId.
HTTP 202 confirms admission. Each key can request 100 accepted individual updates per UTC day by default. An organization admin changes that allowance in the developer portal, as the key’s Daily on-demand update limit, to a whole number from 0 to 1,000,000; 0 pauses the key’s individual updates. Rotating that key preserves its configured allowance and the day’s usage. A replay consumes no extra quota. These updates share the organization’s wallet, daily limit and schedule budget. The same application can read its receipt after rotating API keys. The receipt tracks dispatch and billing. Read the updated numbers through analytics or campaign media after processing.