Platform · Services and actions
Social
The social service of Platform: 21 operation(s).
/api/platform/socialOverview
| Package | Platform |
|---|---|
| Authentication | Bearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key |
| Authorization | The caller's roles must hold Platform › Social on the Roles screen: display for GET, add for POST, change for PUT, delete for DELETE; an action needs the grant of the button that runs it on the screen. |
| Rules | The same as the screen: validation, numbering, approvals, posting, the company the caller belongs to, and the audit trail. |
API reference
21 operations. Open one for its parameters, bodies, responses and a sample request.
GET/api/platform/social/platformsPlatforms
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/platforms" \
-H "Authorization: Bearer $TOKEN"GET/api/platform/social/accountsAccounts
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/accounts" \
-H "Authorization: Bearer $TOKEN"GET/api/platform/social/accounts/{id}Accounts
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/accounts/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/platform/social/accountsAccounts
Request body
The keys this action reads (* = required; "one of" lists the only values):
config, code, platform*, name, handle, external_id, auth_typeResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/platform/social/accounts" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"config":"value","code":"value","platform":"value","name":"value","handle":"value","external_id":"value"}'PUT/api/platform/social/accounts/{id}Accounts
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
listen_enabled, configResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/platform/social/accounts/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listen_enabled":"value","config":"value"}'DELETE/api/platform/social/accounts/{id}Accounts
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/platform/social/accounts/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/platform/social/accounts/{id}/testAccounts test
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/platform/social/accounts/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/test" \
-H "Authorization: Bearer $TOKEN"GET/api/platform/social/listenersListeners
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/listeners" \
-H "Authorization: Bearer $TOKEN"POST/api/platform/social/listenersListeners
Request body
The keys this action reads (* = required; "one of" lists the only values):
account_id*, label, kind, term, language, product_area, exclude_terms, min_followers; kind one of keyword|hashtag|handle|mentions|page|channel|subreddit|product|url|feedResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/platform/social/listeners" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"account_id":"value","label":"value","kind":"value","term":"value","language":"value","product_area":"value"}'PUT/api/platform/social/listeners/{id}Listeners
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/platform/social/listeners/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"DELETE/api/platform/social/listeners/{id}Listeners
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/platform/social/listeners/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/platform/social/accounts/{id}/listenAccounts listen
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/platform/social/accounts/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/listen" \
-H "Authorization: Bearer $TOKEN"POST/api/platform/social/listenListen
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/platform/social/listen" \
-H "Authorization: Bearer $TOKEN"GET/api/platform/social/runsRuns
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/runs" \
-H "Authorization: Bearer $TOKEN"GET/api/platform/social/policyPolicy
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/policy" \
-H "Authorization: Bearer $TOKEN"PUT/api/platform/social/policyPolicy
Request body
The keys this action reads (* = required; "one of" lists the only values):
sla_minutesResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/platform/social/policy" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"sla_minutes":"value"}'GET/api/platform/social/risk-rulesRisk rules
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/risk-rules" \
-H "Authorization: Bearer $TOKEN"POST/api/platform/social/risk-rulesRisk rules
Request body
The keys this action reads (* = required; "one of" lists the only values):
code*, label, description, field, comparator, match_value, threshold, points, sort_order; field one of intent|topic|product_area|sentiment|sentiment_score|severity|urgency|platform|author_followers|rating|keyword|is_verified_author|repeat_author|known_customer|engagement|age_hours; comparator one of equals|in|contains|gte|lteResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/platform/social/risk-rules" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"code":"value","label":"value","description":"value","field":"value","comparator":"value","match_value":"value"}'PUT/api/platform/social/risk-rules/{id}Risk rules
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/platform/social/risk-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"DELETE/api/platform/social/risk-rules/{id}Risk rules
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/platform/social/risk-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"GET/api/platform/social/consoleConsole
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/platform/social/console" \
-H "Authorization: Bearer $TOKEN"Errors
| Status | Meaning |
|---|---|
| 400 | The request could not be read: a filter that is not JSON, a bad parameter |
| 401 | No credential, or it is wrong, revoked or expired |
| 403 | The caller's roles do not hold Platform › Social for this verb, or the address or origin is not allowed |
| 404 | No record with that id is visible to the caller |
| 409 | A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else |
| 422 | Refused by the same validation as the screen; the error names the field and why |
Every error is JSON: {"error": "a sentence saying what was wrong"}, with field where it applies.