Browse all guides
All guides
REST API

Tartol REST API reference

Build server-side integrations with the versioned Tartol REST API, complete endpoint list, examples, and error contract.

16 min readUpdated August 27, 2026

Quick visual guide

Start with the quickstart, then jump to the exact endpoint group you need.

  1. 1

    Read Quickstart first

    Create the key in Settings, then copy the first authenticated request.

    REST API reference Quickstart sectionStart here
  2. 2

    Use On this page

    Choose the endpoint group from the right-side contents instead of reading the full page top to bottom.

    REST API reference contents navigationJump to a section
  3. 3

    Copy the example

    Use the copy button on the code example and replace only the documented values.

    REST API code example with copy controlCopy

Red labels show the exact control to use.

Detailed referenceOpen this for definitions, limits, examples, and troubleshooting.

Quickstart

The REST API is available to active Pro and Agency workspaces. Create an API key in Settings > Integrations and send it from a server, scheduled job, or secure backend.

Base URL and authorization
Base URL: https://tartol.com/api/v1
Authorization: Bearer $TARTOL_API_KEY

Make your first request

curl "https://tartol.com/api/v1/ads?limit=3&sort=newest" \
  -H "Authorization: Bearer $TARTOL_API_KEY"

Authentication and scopes

Send the key in the Authorization header on every protected request. A key is limited to one workspace, its selected scopes, and the permissions of the user who created it. Revoking the key, removing workspace access, or losing plan access stops future requests.

PermissionTechnical scopesAllows
Readtartol:readRead permitted workspace resources. Required on every key.
Writetartol:write + tartol:generateCreate, update, and delete permitted resources, including credit-consuming generation.

Connection, discovery, and contracts

MethodPathReturns
GET/api/v1API version, plan access, docs, and OpenAPI links.
GET/api/v1/openapi.jsonOpenAPI 3.1 document. No key required.
GET/api/v1/meCurrent user, workspace, connection, and scopes.
GET/api/v1/capabilitiesActions and views allowed for this key.
GET/api/v1/searchSearch brands, products, ads, creatives, copy, tracked brands, and media.
GET/api/v1/resources/{kind}/{id}Fetch one resource returned by search.
GET/api/v1/viewsAvailable workspace views and aliases.
GET/api/v1/views/{viewType}Query any permission-visible Tartol view.

Ads, brands, and products

Product create/update schemas use the same standardized product-type and pricing-model enums as the Brands editor. Read the current enum values from the OpenAPI schema rather than sending free-form labels. Brand scans return the detected source language while the brand catalog summary is written in English for consistent review. Website scans read usable public HTML before using a rendered-page fallback, and recurring plan ranges are supported by explicit currency-and-cadence evidence from the complete selected page rather than a truncated content prefix.

MethodPathPurpose
GET/api/v1/adsList and filter Discovery ads.
GET/api/v1/ads/{id}Get one Discovery ad by platform ad ID.
GET/api/v1/saved-adsList and filter saved ads.
GET, DELETE/api/v1/saved-ads/{id}Get or delete one saved ad.
GET/api/v1/saved-ad-collectionsList boards, folders, and tags.
POST/api/v1/saved-ad-boardsCreate a saved-ad board.
POST/api/v1/saved-ad-foldersCreate a saved-ad folder.
GET, POST/api/v1/brandsList or create brands.
GET, PATCH, DELETE/api/v1/brands/{id}Get, update, or delete a brand.
POST/api/v1/brands/scanCreate and scan a brand from a public URL, including supported recurring price ranges.
GET, POST/api/v1/productsList or create products.
GET, PATCH, DELETE/api/v1/products/{id}Get, update, or delete a product.
GET/api/v1/products/{id}/strategyGet a product with audiences and angles.
POST/api/v1/products/{id}/audiencesCreate a saved audience.
POST/api/v1/products/{id}/anglesCreate a saved angle.

Creative Studio, Brand Tracker, media, and workspace

MethodPathPurpose
GET/api/v1/creativesList generated creatives.
GET/api/v1/creatives/{id}Get one creative.
GET/api/v1/copyList generated copy.
GET/api/v1/copy/{id}Get one copy result.
POST/api/v1/generations/imagesGenerate image ads. Uses credits.
GET/api/v1/generations/images/{id}Get image-generation progress and results.
POST/api/v1/generations/copyGenerate copy. Uses credits.
GET/api/v1/generations/copy/{id}Get copy-generation progress and results.
GET, POST/api/v1/tracked-brandsList or add tracked brands.
GET, DELETE/api/v1/tracked-brands/{id}Get or stop tracking a brand.
POST/api/v1/tracked-brands/{id}/refreshRefresh a tracked brand; oversized provider libraries use the same safe rolling-window behavior as the app.
GET/api/v1/brand-tracker/searchSearch Meta pages to track.
GET/api/v1/brand-tracker/foldersList tracker folders and alerts.
GET/api/v1/mediaList Media Library assets.
GET, DELETE/api/v1/media/{id}Get or delete an asset.
GET, POST/api/v1/media/foldersList or create media folders.
DELETE/api/v1/media/folders/{id}Delete a media folder.
GET/api/v1/dashboardGet the workspace dashboard overview, including Ads Tracked, Ads Generated, and Ads Launched.
GET/api/v1/workspaceGet workspace settings and seats.
GET, POST/api/v1/workspace/membersList members or send an invitation.
DELETE/api/v1/workspace/members/{id}Remove a workspace member.
GET/api/v1/workspace/activityList workspace activity.
GET/api/v1/notificationsList notifications.
GET/api/v1/support/ticketsList support tickets.
GET/api/v1/feedbackGet the feedback board.

Pagination and filters

List endpoints accept the controls documented for that endpoint. Discovery and Saved Ads support the full ad-filter set, including platform, advertiser, format, status, category, targeting, dates, duration, running days, and EU metrics. Unsupported parameters return 400.

  • Discovery and Saved Ads return up to 60 records per page.
  • Other paginated resources return up to 100 records per page unless their endpoint documents a lower limit.
  • Pagination metadata includes page, limit, total when available, and has_more. Response links include self, previous, and next when applicable.
Filtered Discovery request
GET /api/v1/ads?status=active&format=video&running_days_min=7&eu_only=true&page=1&limit=12
ParameterUse
pagePage number starting at 1.
limitRequested items. The response reports the applied limit.
searchText search, up to 200 characters.
sortnewest, oldest, or longest_running when supported.
presetready_to_scale, native_ads, or eu_winners for Discovery.
eu_onlytrue to return only ads with confirmed EU-transparency evidence.

Create and update resources

Use resource endpoints for normal application integrations. Every write requires JSON and an Idempotency-Key so a timeout can be retried safely. Generation requests return 202; use the returned generation ID with the matching status endpoint.

Create a brand
curl https://tartol.com/api/v1/brands \
  -X POST \
  -H "Authorization: Bearer $TARTOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-brand-2026-08-04-001" \
  --data '{"name":"Acme"}'
Generate image ads
curl https://tartol.com/api/v1/generations/images \
  -X POST \
  -H "Authorization: Bearer $TARTOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: image-job-2026-08-04-001" \
  --data '{"productId":42,"numberOfImages":2,"generatePostText":false}'
Check image-generation status
curl https://tartol.com/api/v1/generations/images/123 \
  -H "Authorization: Bearer $TARTOL_API_KEY"

Use actions for complete platform coverage

Resource endpoints cover common integrations. The action API exposes every other registered Tartol action allowed by the key scopes and workspace role. Read an action’s live schema before sending it.

generate_product_audiences and generate_product_angles require an explicit count from 1 to 8. Tartol’s UI starts at 1, and each saved audience or angle costs 5 credits; the audience portrait is bundled into that price. Prepare responses include a structured credit_cost object so integrations can display the exact total before approval.

For advanced custom-audience Image Ads, read the product strategy, set autoAudience to false, and send only the saved selectedAudienceId. Avatar URLs and storage paths are display fields and must never be copied into generation arguments; Tartol validates the ID and resolves eligible casting evidence on the server.

  1. 1List actionsCall GET /api/v1/actions.
  2. 2Read the schemaCall GET /api/v1/actions/{actionType} for required fields, constraints, and an example.
  3. 3ExecutePOST the arguments to /api/v1/actions/{actionType} with an Idempotency-Key.
Create a brand through the action API
curl https://tartol.com/api/v1/actions/create_brand \
  -X POST \
  -H "Authorization: Bearer $TARTOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-brand-2026-08-04-001" \
  --data '{"name":"Acme"}'

Optional confirm-first actions

Use the two-step flow when a person should review an action before it runs. It is required for credit-spending actions and consequential external actions such as publishing a saved Ad Manager draft to Meta. Prepared actions are short-lived, bound to the reviewed arguments, and can be used once.

StepRequest
PreparePOST /api/v1/actions/{actionType}/prepare
Execute after approvalPOST /api/v1/actions/execute with pending_action_id and confirm=true

Read and publish Ad Manager drafts

Read meta_ads_overview to receive token-free connection status, defaults, current plan allowance, saved drafts, and recent launch history. Read meta_ads_performance for the selected ad account’s fixed 30-day KPI totals, daily series, and objective-aware ad rows. To publish, choose an exact saved draft and preserve both its draftId and draftUpdatedAt. Prepare launch_meta_ads_draft, show its exact paused-ad summary to a person, then execute the returned pending action after approval.

Programmatic publishing always forces every row to Paused and revalidates draft freshness, workspace ownership, plan limits, Meta assets, permissions, and idempotency. Meta OAuth, launch-default changes, campaign/ad-set creation, delivery status mutations, caller-selected report controls, provider import, caller-supplied unsaved rows, and Active delivery remain available only in the visual Ad Manager.

Read the Ad Manager overview
curl https://tartol.com/api/v1/views/meta_ads_overview \
  -H "Authorization: Bearer $TARTOL_API_KEY"
Prepare one exact saved draft
curl https://tartol.com/api/v1/actions/launch_meta_ads_draft/prepare \
  -X POST \
  -H "Authorization: Bearer $TARTOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: meta-draft-2026-08-14-001" \
  --data '{"draftId":"00000000-0000-4000-8000-000000000000","draftUpdatedAt":"2026-08-14T12:00:00.000Z"}'
Read 30-day Meta performance
curl https://tartol.com/api/v1/views/meta_ads_performance \
  -H "Authorization: Bearer $TARTOL_API_KEY"

Retry writes safely

Requests that execute a change require Idempotency-Key. Reusing the same key with the same request replays the stored response for 24 hours. Reusing it with different arguments returns 409.

  • Generate a unique key for each intended change.
  • Keep the same key when retrying a timeout.
  • Do not reuse one key for multiple records or jobs.

Responses and errors

Success
{
  "data": {},
  "meta": {},
  "links": {}
}
Error
{
  "error": {
    "code": "invalid_api_key",
    "message": "Provide a valid Tartol API key.",
    "requestId": "..."
  }
}
StatusMeaning
400Invalid path, query, body, or idempotency key.
401Missing, invalid, expired, or revoked key.
403Plan, scope, role, or feature permission denied.
404Endpoint or workspace resource not found.
409State or idempotency conflict.
415Write body is not application/json.
422Action arguments do not match the live schema.
429Rate limit reached. Follow Retry-After.
500 or 503Tartol could not complete the request.

Limits and OpenAPI

Import the OpenAPI document into Postman, Insomnia, an SDK generator, or your developer portal. It includes resource routes, action routes, required headers, scopes, and error responses.

  • Read requests: 600 per minute per API connection.
  • Write requests: 120 per minute per API connection.
  • Generation requests: 20 per minute per API connection.
  • JSON request body: 256 KiB maximum.
OpenAPI 3.1
https://tartol.com/api/v1/openapi.json

Keep learning

Still need help?

Tell us what you were trying to do and what happened.

Contact support
Last updated August 27, 2026