Overview
Background jobs
Three requests take long enough that they don’t make you wait:
| Request | Job kind |
Result field |
|---|---|---|
POST /v1/brands/discover |
discover |
discovery |
POST /v1/brands/{brandId}/prompts/suggest |
suggestPrompts |
prompts |
POST /v1/brands/{brandId}/profile/refresh |
refreshProfile |
None. Read the brand again |
Starting a job
Section titled “Starting a job”Each answers straight away with 202 and a job:
{ "id": "1d40bfbb-5415-42c6-be85-1aa5fa8f8a63", "kind": "suggestPrompts", "status": "running", "error": null, "prompts": null, "discovery": null}Polling for the result
Section titled “Polling for the result”Request the job until status is no longer running. Every two seconds is a sensible interval.
curl "https://api.footnotehq.com/v1/jobs/$JOB_ID" \ -H "Authorization: Bearer fn_your_key"completed: the result is in the field for that kind of job.failed:errorexplains why.
Permissions
Section titled “Permissions”Reading a job needs read access to its area: Brands for a site analysis or profile refresh, Prompts for a suggestion job. A key that could start a job can always read it.
These requests also count toward the account’s limit of 10 per minute.