apyhub
ARTIFICIAL INTELLIGENCE · MARKETING

Detect Spam API

What it does

Spam Detector checks text content for spam and returns an asynchronous job you can poll for a result. Send a content string in the request body, then use the returned job_id and status_url to track the analysis.

When the job finishes, the status endpoint returns a data object with attributes.status and, when available, a result object. That result includes pass as a boolean, score as an integer, and reason as a string explaining the classification.

Use Spam Detector when you need to screen user-generated text before publishing it, flag suspicious inbound form submissions, or add a spam check to moderation workflows. Because the API is asynchronous, it fits content pipelines where you submit checks in bulk and collect results separately.

The response is intentionally compact: you get the job identifier up front, then the final status and spam assessment once processing completes.

▣ ENDPOINT 01 / 02
POST
Submit Detect Spam job
https://api.eu.apyverse.com/sharpapi/detect-spam

QUICKSTART

GUIDE

Quickstart

Submit content for spam detection as a JSON payload.

curl -X POST "https://api.eu.apyverse.com/sharpapi/detect-spam" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"This is a limited-time offer just for you."}'

What you'll get back

Returns a JSON object with job_id and status_url fields for the asynchronous job submission. job_id is a UUID identifying the job, and status_url is the URI you can use to check its status.

{
  "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status_url": "https://example.com/jobs/3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Provide the content to check whether it is spam.

About this endpoint

What it does

Submits spam-detection content for asynchronous processing and returns identifiers you can use to check the job status later. The request sends the content to analyze, and the response returns the job ID and a status URL.

Request Body

ParameterTypeMandatoryDescription
contentStringYesProvide the content to check whether it is spam.

Response

Returns a JSON object with two required string fields: job_id and status_url. job_id is the identifier of the submitted asynchronous job, and status_url is the URL used to check that job's status. Success response: 200.

ParameterTypeMandatoryDescription
job_idStringYesIdentifier of the submitted asynchronous job. Format: UUID.
status_urlStringYesURL used to check the submitted job status. Format: URI.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Use job_id to track the submission, and status_url to check progress.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
Get Detect Spam job status
https://api.eu.apyverse.com/sharpapi/detect-spam/job/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a spam-detection job by its job ID.

curl -X GET "https://api.eu.apyverse.com/sharpapi/detect-spam/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. Inside data, id and type are strings, and attributes is an object with type (string), status (string), and result (an object with pass as a boolean, score as an integer, and reason as a string).

{
  "data": {
    "id": "job_123",
    "type": "job",
    "attributes": {
      "type": "spam-detection",
      "status": "completed",
      "result": {
        "pass": false,
        "score": 87,
        "reason": "Likely spam"
      }
    }
  }
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Retrieves the current status of a Detect Spam background job by its job_id. The response returns a JSON object containing a data object with the job identifier, job type, and job attributes, including status and, when available, the spam detection result.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier in UUID format.

Response

Returns a JSON object with a data object. Inside data, id and type are strings, and attributes is an object containing type as a string, status as a string, and result as an object with pass as a boolean, score as an integer, and reason as a string.

AttributeTypeMandatoryDescription
dataObjectNoJob payload wrapper containing the job identifier, type, and attributes.
data.idStringNoJob identifier.
data.typeStringNoJob type.
data.attributesObjectNoJob attributes wrapper containing the job type, status, and result object.
data.attributes.typeStringNoAttribute type.
data.attributes.statusStringNoCurrent job status.
data.attributes.resultObjectNoSpam detection result object.
data.attributes.result.passBooleanNoWhether the content passed spam detection.
data.attributes.result.scoreIntegerNoSpam score.
data.attributes.result.reasonStringNoReason associated with the result.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.