Discovery

Create Plan

post/api/discovery-plans

Request

  • Base URL: https://api.kolens.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.kolens.ai/api/discovery-plans
  • Auth: HTTP bearer

Headers

x-kolens-user-idstring nullable

Request body

namestring required
keywordstring required
platformstring

User-facing platform. One of tiktok / instagram / x / douyin. The backend resolves this to an internal data_source for pipeline dispatch.

interval_hoursinteger
max_videos_per_runinteger
regionstring nullable

ISO-3166 alpha-2 country code (e.g. 'US', 'JP', 'SG'). Copied onto every job the scheduler spawns from this plan; the TikTok scrape then browses as if from that country. Omit / empty = the global (US) default.

target_list_idstring nullable
status'draft' | 'active' | 'disabled'

draft (saved, NOT scheduled) | active (scheduler picks up) | disabled (paused). Defaults to draft — creating a plan no longer auto-schedules it; the user opts in by hitting Activate on the detail page once they've verified the keyword + filters.

data_sourcestring nullable

DEPRECATED — pass platform instead. Accepted only for backward compat with pre-#163 callers.

Response

Successful Response

idstring required
namestring required
keywordstring required
platformstring required
interval_hoursinteger required
max_videos_per_runinteger required
regionstring nullable
filtersobject nullable required
target_list_idstring nullable required
status'draft' | 'active' | 'disabled' required
effective_status'draft' | 'active' | 'disabled' | 'queued' | 'running' | 'failed' required
data_sourcestring required
last_run_atstring nullable required
next_run_atstring nullable required
last_job_idstring nullable required
last_job_statusstring nullable
last_errorstring nullable
created_atstring required
updated_atstring required

Changes

No recorded changes to this operation across all 1 revision of this API.