Machine API · Social Intelligence API
POST /v1/social/jobs
Queues a Social Intelligence job and returns 202 with a job identifier. Poll the job endpoint or stream endpoint for progress, then read the immutable snapshot result.
Contract identity
- Contract version
- 1.0.0
- Last verified
- Public surface
- Machine API
- Executable operations
- 11 / 40
Verified means the contract snapshot on this date was read and matched to the page. It is not a promise that an operation is live for your workspace.
Goal and how to use this API
Queue a bounded Social Intelligence collection job for a public target. Collect and inspect a bounded public-data snapshot with normalized entities, metric values and explicit quality information.
Practical example
Check the supported platform/data-type catalog, queue a job, follow its returned status URL, then retrieve the snapshot and read coverage before drawing conclusions.
Integration steps
- Define the user decision and target entity, then check input requirements and access.
- Prepare the parameters and model below, then call POST /v1/social/jobs with this page’s authentication method.
- Persist the acceptance response and its identifier, then follow the status or run route this response returns until it reaches a terminal state before reading the successful result.
A configured operation is not an exhaustive platform export. Preserve null values, collection time and quality warnings; keep this job namespace separate from generic operation requests.
At a glance
- Audience
- Machine API
- Pagination
- No
- Asynchronous
- Yes
- Idempotency
- Yes
Authentication
Workspace bearer token: Authorization: Bearer $DATAPI_API_TOKEN. The token must have the permission required by this route.
Open the matching dashboard featureParameters and constraints
| Name | In | Type | Required | Constraints / default |
|---|---|---|---|---|
| Idempotency-Key | header | string | null | Optional | — |
Request body
application/json
| Field | Type | Required | Constraints / default | Description |
|---|---|---|---|---|
| (body) | object | Required | additional properties: false | Field description is not supplied by the contract. |
| data_mode | string | Optional | enum: "localdata", "freshdata" · default: "localdata" | Field description is not supplied by the contract. |
| data_type | string | Optional | enum: "profile", "posts", "hashtags", "comments" · default: "profile" | Field description is not supplied by the contract. |
| options | object | Optional | additional properties: false | Field description is not supplied by the contract. |
| options.brand_tags | array<string> | null | Optional | — | Field description is not supplied by the contract. |
| options.brand_tags [anyOf 1] | array<string> | Optional | max items: 20 | Field description is not supplied by the contract. |
| options.brand_tags [anyOf 1][] | string | Required | — | Field description is not supplied by the contract. |
| options.brand_tags [anyOf 2] | null | Optional | — | Field description is not supplied by the contract. |
| options.campaign_tag | string | null | Optional | — | Field description is not supplied by the contract. |
| options.campaign_tag [anyOf 1] | string | Optional | max length: 80 | Field description is not supplied by the contract. |
| options.campaign_tag [anyOf 2] | null | Optional | — | Field description is not supplied by the contract. |
| options.content_type | string | null | Optional | — | Field description is not supplied by the contract. |
| options.content_type [anyOf 1] | string | Optional | max length: 40 | Field description is not supplied by the contract. |
| options.content_type [anyOf 2] | null | Optional | — | Field description is not supplied by the contract. |
| options.date_range_days | integer | Optional | min: 7 · max: 365 · default: 90 | Field description is not supplied by the contract. |
| options.language | string | null | Optional | — | Field description is not supplied by the contract. |
| options.language [anyOf 1] | string | Optional | max length: 16 | Field description is not supplied by the contract. |
| options.language [anyOf 2] | null | Optional | — | Field description is not supplied by the contract. |
| options.limit | integer | Optional | min: 5 · max: 100 · default: 30 | Field description is not supplied by the contract. |
| options.refresh | boolean | Optional | default: false | Field description is not supplied by the contract. |
| platform | string | Required | min length: 1 · max length: 40 | Field description is not supplied by the contract. |
| query | string | Required | min length: 1 · max length: 512 | Field description is not supplied by the contract. |
Full contract schema
{
"$ref": "#/components/schemas/SocialJobCreate"
}Required means required within the containing object; an optional parent can still be omitted.
Request example
Examples are illustrative contract samples, not live results. Replace sample identifiers and inspect availability before executing a request.
curl --fail-with-body -X POST "https://api.datapi.ir/v1/social/jobs" \
-H "Authorization: Bearer $DATAPI_API_TOKEN" \
-H "Idempotency-Key: example-request-001" \
-H "Content-Type: application/json" \
-d ' {
"data_mode": "localdata",
"data_type": "profile",
"options": {
"brand_tags": [
"example"
],
"campaign_tag": "example",
"content_type": "example",
"date_range_days": 90,
"language": "example",
"limit": 30,
"refresh": false
},
"platform": "instagram",
"query": "example"
}'Try it
Responses and errors
| Status | Description | Schema |
|---|---|---|
| 202 | Successful Response | object (fields not enumerated) |
| 400 | Invalid request fields or operation input | unspecified |
| 401 | Authentication required or expired | unspecified |
| 429 | Request allowance limit reached | unspecified |
{}Complete response models
202 · application/json
The runtime contract does not enumerate this response. An example is not a guaranteed model; this response remains a contract documentation gap.
Full contract schema
{
"additionalProperties": true,
"title": "Response Machine Create Job V1 Social Jobs Post",
"type": "object"
}400 · application/problem+json
| Field | Type | Required | Constraints / default | Description |
|---|---|---|---|---|
| (body) | object | Required | — | Field description is not supplied by the contract. |
| code | string | Required | — | Field description is not supplied by the contract. |
| detail | string | Required | — | Field description is not supplied by the contract. |
| error | object | Required | — | Field description is not supplied by the contract. |
| error.error | object | Required | — | Field description is not supplied by the contract. |
| error.error.code | string | Required | — | Field description is not supplied by the contract. |
| error.error.details | unspecified | Optional | — | Field description is not supplied by the contract. |
| error.error.message | string | Required | — | Field description is not supplied by the contract. |
| error.error.request_id | string | Required | — | Field description is not supplied by the contract. |
| instance | string | Optional | — | Field description is not supplied by the contract. |
| request_id | string | Required | — | Field description is not supplied by the contract. |
| status | integer | Required | — | Field description is not supplied by the contract. |
| title | string | Required | — | Field description is not supplied by the contract. |
| type | string (uri) | Required | format: uri | Field description is not supplied by the contract. |
Full contract schema
{
"$ref": "#/components/schemas/DataPIProblem"
}401 · application/problem+json
| Field | Type | Required | Constraints / default | Description |
|---|---|---|---|---|
| (body) | object | Required | — | Field description is not supplied by the contract. |
| code | string | Required | — | Field description is not supplied by the contract. |
| detail | string | Required | — | Field description is not supplied by the contract. |
| error | object | Required | — | Field description is not supplied by the contract. |
| error.error | object | Required | — | Field description is not supplied by the contract. |
| error.error.code | string | Required | — | Field description is not supplied by the contract. |
| error.error.details | unspecified | Optional | — | Field description is not supplied by the contract. |
| error.error.message | string | Required | — | Field description is not supplied by the contract. |
| error.error.request_id | string | Required | — | Field description is not supplied by the contract. |
| instance | string | Optional | — | Field description is not supplied by the contract. |
| request_id | string | Required | — | Field description is not supplied by the contract. |
| status | integer | Required | — | Field description is not supplied by the contract. |
| title | string | Required | — | Field description is not supplied by the contract. |
| type | string (uri) | Required | format: uri | Field description is not supplied by the contract. |
Full contract schema
{
"$ref": "#/components/schemas/DataPIProblem"
}429 · application/problem+json
| Field | Type | Required | Constraints / default | Description |
|---|---|---|---|---|
| (body) | object | Required | — | Field description is not supplied by the contract. |
| code | string | Required | — | Field description is not supplied by the contract. |
| detail | string | Required | — | Field description is not supplied by the contract. |
| error | object | Required | — | Field description is not supplied by the contract. |
| error.error | object | Required | — | Field description is not supplied by the contract. |
| error.error.code | string | Required | — | Field description is not supplied by the contract. |
| error.error.details | unspecified | Optional | — | Field description is not supplied by the contract. |
| error.error.message | string | Required | — | Field description is not supplied by the contract. |
| error.error.request_id | string | Required | — | Field description is not supplied by the contract. |
| instance | string | Optional | — | Field description is not supplied by the contract. |
| request_id | string | Required | — | Field description is not supplied by the contract. |
| status | integer | Required | — | Field description is not supplied by the contract. |
| title | string | Required | — | Field description is not supplied by the contract. |
| type | string (uri) | Required | format: uri | Field description is not supplied by the contract. |
Full contract schema
{
"$ref": "#/components/schemas/DataPIProblem"
}Operational notes
- The base URL is https://api.datapi.ir. Prefer the exact path shown; do not add a trailing slash.
- Supply Idempotency-Key for retry-safe creation. Reusing the key with a different payload can produce a conflict rather than duplicate work.
- A 202 response means the work was accepted, not completed. Poll the status URL or wait for the signed completion webhook before reading the result.
- Contract version 1. Responses use the stable DataPI error envelope; unknown optional fields should be ignored by clients.
Related pages
- All endpointsPublic HTTP API at api.datapi.ir. Authenticate with a workspace bearer token from the dashboard.
- Social Intelligence (machine)Machine social metrics, jobs, snapshots and reprocessing. They use a bearer token with social-data permission.
- Related operation IDsRelated operation IDs
- Request lifecycleRequest lifecycle
- Error envelopeError envelope