Skip to main content

Capability Requests

Use POST /capability-requests/enqueue to create a public process for a supported capability.

When To Use It

Use this endpoint when you want the process-oriented public API for:
  • account_create
  • account_login
  • account_health_check
  • account_delete
  • maintenance
  • keyword_warmup
  • fyp_warmup
  • fyp_comment_growth
  • target_video_comment
  • target_account_latest_comment
  • comment_on_video
  • post_video
  • post_slideshow
  • post_story
  • post_health_check
  • dm_send
  • dm_thread_manage
  • notification_triage
  • recovery_cleanup
For the primary public maintenance path, use POST /maintenance/requests. Omit platform for the default TikTok execution path. Set "platform": "instagram" to request Instagram parity; the Edge planner preserves TikTok action names and prefixes planned Instagram executor actions with instagram_.

Request Example

Accepted Response

Instagram Login Example

For queued Instagram login, pass executor-side env var names instead of raw credentials. The worker resolves these immediately before invoking instagram_account_login; request and queue rows store the env var names plus non-secret metadata, not the password value. Queued Instagram account_login and account_create requests with raw password, login_identifier, or email_alias values are rejected before persistence.

Duplicate Response

Request Fields

Shared Objects

target

At least one target identifier must be present.

callback

requested_by

Supported Modes and Routing

| account_create | yes | yes | yes | yes | no | | account_login | yes | no | yes | yes | no | | account_health_check | yes | yes | yes | yes | no | | account_delete | yes | no | yes | yes | no | | maintenance | yes | yes | no | yes | no | | keyword_warmup | yes | yes | yes | yes | yes | | fyp_warmup | yes | yes | yes | yes | yes | | fyp_comment_growth | yes | no | yes | yes | no | | target_video_comment | yes | no | yes | yes | no | | target_account_latest_comment | yes | no | yes | yes | no | | comment_on_video | yes | no | yes | yes | no | | post_video | yes | no | yes | yes | yes | | post_slideshow | yes | yes | yes | yes | no | | post_health_check | yes | no | yes | yes | no | | dm_send | yes | no | yes | yes | no | | dm_thread_manage | yes | no | yes | yes | no | | notification_triage | yes | no | yes | yes | no | | recovery_cleanup | yes | no | yes | yes | no | The table shows default TikTok routing. For platform: "instagram", keyword_warmup and fyp_warmup currently remain manual-only and are blocked for unattended execution until the Instagram wrappers are live-verified on the OnePlus validation path.

Instagram Modes and Routing

| account_create | yes | no | yes | yes | no | | account_login | yes | no | yes | yes | no | | account_health_check | yes | no | yes | yes | no | | account_delete | yes | no | yes | yes | no | | maintenance | yes | no | no | yes | no | | keyword_warmup | yes | no | yes | yes | yes | | fyp_warmup | yes | no | yes | yes | yes | | fyp_comment_growth | yes | no | yes | yes | no | | target_video_comment | yes | no | yes | yes | no | | target_account_latest_comment | yes | no | yes | yes | no | | comment_on_video | yes | no | yes | yes | no | | post_video | yes | no | yes | yes | yes | | post_story | yes | no | yes | yes | no | | post_health_check | yes | no | yes | yes | no | | dm_send | yes | no | yes | yes | no | | dm_thread_manage | yes | no | yes | yes | no | | notification_triage | yes | no | yes | yes | no | | recovery_cleanup | yes | no | yes | yes | no |

FYP Comment Growth Inputs

fyp_comment_growth scans the For You feed, judges video fit with the supplied prompt, and posts strict top-level comments on selected videos.
Required behavior today:
  • placement must be top_level; reply placement is rejected.
  • fyp_judge_prompt is required.
  • Comment text must come from either comment_pack or fyp_comment_prompt.
  • dynamic_comment_policy must be high_fit_only, every_good_video, or pack_only.
  • mode: "unattended" is rejected until the capability is live verified.
Comment wrappers such as comment_on_video, target_account_latest_comment, and target_video_comment are now accepted public capabilities for manual execution.

Prompt Object Shape

Warmup capabilities use structured prompt objects when runtime reasoning is needed.
Required fields:
  • prompt_id
  • name
  • version
  • system_prompt
  • task_prompt
  • output_contract

Idempotency

Idempotency key:
If the same key is reused, Phonefarm returns the existing process instead of creating a new one.

Failure Modes

Typical validation failures include:
  • unknown capability
  • unknown platform
  • unsupported routing mode for a capability
  • unattended mode blocked for that capability
  • unattended FYP warmup engagement probability missing or nonzero
  • missing required prompt objects
  • invalid target shape
The current implementation uses string-based validation messages. Treat them as descriptive errors, not as a versioned error-code contract unless your integration explicitly pins to them.

What Happens Next

After acceptance:
  1. Phonefarm persists a public process row.
  2. Phonefarm attempts an immediate process.updated callback with milestone accepted.
  3. Worker orchestration materializes planned actions into queue items.
  4. You poll GET /processes/{process_id} for source-of-truth state.