Start a social scan
Scan one channel for new discussions relevant to this brand — the same scan the “Run a scan” button in the product triggers. One call scans one channel; to scan both Reddit and LinkedIn, make two calls.
Only one scan may run per brand per channel at a time. A second call while one is already running is refused, not queued.
POST /brands/{brand_id}/social/scansAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Idempotency-Key | string | required on every write. See Idempotency |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel | string | required | One of: reddit, linkedin. |
result_count | integer | conditional | 5 to 50, must be a multiple of 5. Required unless this is the brand’s first scan on this channel, which is free at a fixed count and ignores this field. |
Request
cURL
curl --request POST \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/social/scans' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: 3f9a1c2e-8b4d-4a6f-9c1e-2d5b7a8f9e01' \
--header 'Content-Type: application/json' \
--data '{"channel": "reddit", "result_count": 10}'Response
200
{
"data": {
"job_id": "7c9e1f3a-4b2d-4e6f-8a1c-9d3e5b7f2a10",
"channel": "reddit",
"result_count": 10,
"credit_cost": 20,
"is_free_scan": false
},
"request_id": "req_5a3c8d0e2f4b46a1bc9d"
}Response fields
| Field | Type | Description |
|---|---|---|
data.job_id | uuid | required. Pass to Get scan status |
data.channel | string | required. reddit or linkedin |
data.result_count | integer | required. The count actually used — the free-scan fixed count if this was free, otherwise what you requested |
data.credit_cost | integer | required. 0 when is_free_scan is true |
data.is_free_scan | boolean | required |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A parameter is unknown or malformed. The message names it |
| 400 | invalid_request | No active keywords, or result_count outside 5-50 / not a multiple of 5 |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 401 | token_expired | The key passed its expiry date |
| 401 | token_revoked | The key was revoked |
| 403 | plan_required | LinkedIn discovery is not included in this workspace’s plan |
| 403 | quota_exceeded | Insufficient credits for this scan’s cost |
| 404 | not_found | The brand does not exist, or this key is not allowed to reach it |
| 409 | conflict | A scan is already running for this brand and channel |
| 429 | rate_limited | Over 300 requests per minute. See the Retry-After header |
Notes
Only one scan per brand per channel at a time, enforced at the database level. Reddit and LinkedIn scans for the same brand run independently and do not block each other.
Credits and free-scan eligibility are always computed server-side. result_count is ignored on
a qualifying free first scan; do not rely on it to predict credit_cost, read the response instead.
This endpoint only starts the scan. Poll Get scan status with
the returned job_id, then read the results from
List social discussions once it completes.