CopyHero

Start Jobs For Agent

POST
/api/v1/tasks/agent-start

Start one agent batch with a hard 100-input fanout boundary.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body

Agent-only workflow request with a hard fanout/cost boundary.

The UI keeps using :class:JobStart and its live, tenant-configured import cap (currently 250 by default). External agents receive a smaller static contract so one tool call cannot fan out arbitrarily before service-level quota and ownership checks run.

task_blueprint_id?integer|null
store_id?integer|null
import_profile_id?|

Optional saved Import Profile (GET /settings/import-profiles) to expand into this batch's store, workflow, image output, and per-row Shopify options (including metafield_set_id and productLibraryFolderIds). Precedence: an explicit store_id/task_blueprint_id/image_output on this request always wins over the profile's; omitting any of those three takes the profile's value instead; an explicit store_id=null keeps the request targeting the product library and drops the profile's store entirely, even if the profile names one. Per-row fields (e.g. tags, rehostDescriptionImages, setActive/shopify_status, metafield_set_id, productLibraryFolderIds) the profile carries apply only to a row that does not already set that field itself.

image_output?|

Optional generated-image output override for the whole run. Omit or send an empty object to inherit the destination store.

input_data*array<>

Workflow input rows for one bounded agent batch (1-100).

Items1 <= items <= 100

Response Body

Successful Response

application/json
  1. response
data*array<>
count*Count
Example Request
curl -X POST 'https://app.copyhero.app/api/v1/tasks/agent-start' \  -H 'Content-Type: application/json' \  -d '{  "input_data": [    {}  ]}'
Example Response
{  "data": [    {      "internal_product_id": "17d65d0a-2bba-46da-af25-e6db2fc23598",      "internal_product_minted": false,      "store_id": 0,      "owner_id": 0,      "title": "string",      "description": "string",      "blueprint_id": 0,      "batch_id": 0,      "id": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "jobs": [        {          "store_id": 0,          "job_type": "string",          "internal_product_id": "17d65d0a-2bba-46da-af25-e6db2fc23598",          "task_id": 0,          "order": 0,          "blueprint_job_id": 0,          "id": 0,          "created_at": "2019-08-24T14:15:22Z",          "updated_at": "2019-08-24T14:15:22Z",          "started_at": "2019-08-24T14:15:22Z",          "finished_at": "2019-08-24T14:15:22Z",          "input_data": "string",          "output_data": "string",          "state": "string",          "store": {            "store_url": "string",            "language": "string",            "default_push_blueprint_id": 0,            "generated_image_output_format": "png",            "generated_image_webp_quality": 1,            "id": 0,            "name": "string",            "owner_id": 0,            "owner": {              "email": "string",              "is_active": true,              "is_superuser": false,              "full_name": "string",              "sub": "string",              "provider": "auth0",              "last_synced_at": "2019-08-24T14:15:22Z",              "quota": 1000,              "onboarding_completed_at": "2019-08-24T14:15:22Z",              "locale": "en",              "id": 0            },            "currency": "string",            "domain": "string",            "country_code": "string",            "image_preview_url": "string",            "description": "string",            "title": "string",            "hbs_template": "string",            "json_template": "string",            "oauth_completed_at": "2019-08-24T14:15:22Z",            "oauth_scopes": "string",            "missing_scopes": [              "string"            ],            "features": {              "property1": true,              "property2": true            }          }        }      ],      "blueprint": {        "name": "string",        "description": "string",        "owner_id": 0,        "id": 0,        "created_at": "2019-08-24T14:15:22Z",        "updated_at": "2019-08-24T14:15:22Z"      }    }  ],  "count": 0}