# Content moderation (/score-api/endpoints/content-moderation)



{/* Written by scripts/build-use-cases.mjs from internal/usecases/catalog.json and use-cases/site.json. Change those, not this file. */}

**Decide every post, listing and message by your own policies.** Score every post, listing and message against your policy. Send the content with the policy it should follow, and get a score for how likely it breaks it.

| Endpoint                 | Price           | Group          |
| ------------------------ | --------------- | -------------- |
| `POST /v1/score/content` | $0.002 per call | Policy & Abuse |

## Request [#request]

Send what you know in one `context` object. `content` is required; every other field is optional. A field can hold text, JSON or CSV.

<Tabs items="[&#x22;curl&#x22;, &#x22;Python&#x22;, &#x22;TypeScript&#x22;]">
  <Tab value="curl">
    ```bash
    curl https://api.finic.ai/v1/score/content \
      --header "Authorization: Bearer $FINIC_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "context": {
          "content": "Message me on Telegram @fastcash88 to pay, I cannot take payment here. 50% off if you send a gift card",
          "policy": "No moving payment off the platform. No gift cards as payment.",
          "author": { "account_created": "2026-11-25", "messages_sent_today": 40, "distinct_recipients": 40, "prior_removals": 0 },
          "context": { "surface": "direct_message", "listing_title": "Dell XPS 13 laptop, like new", "in_reply_to": "Is this still available?" }
        }
      }'
    ```
  </Tab>

  <Tab value="Python">
    ```python
    import os
    import requests

    response = requests.post(
        "https://api.finic.ai/v1/score/content",
        headers={"Authorization": f"Bearer {os.environ['FINIC_API_KEY']}"},
        json={
            "context": {
                "content": "Message me on Telegram @fastcash88 to pay, I cannot take payment here. 50% off if you send a gift card",
                "policy": "No moving payment off the platform. No gift cards as payment.",
                "author": { "account_created": "2026-11-25", "messages_sent_today": 40, "distinct_recipients": 40, "prior_removals": 0 },
                "context": { "surface": "direct_message", "listing_title": "Dell XPS 13 laptop, like new", "in_reply_to": "Is this still available?" }
            }
        },
        timeout=30,
    )
    response.raise_for_status()
    print(response.json()["score"])
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const response = await fetch("https://api.finic.ai/v1/score/content", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.FINIC_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        context: {
          "content": "Message me on Telegram @fastcash88 to pay, I cannot take payment here. 50% off if you send a gift card",
          "policy": "No moving payment off the platform. No gift cards as payment.",
          "author": { "account_created": "2026-11-25", "messages_sent_today": 40, "distinct_recipients": 40, "prior_removals": 0 },
          "context": { "surface": "direct_message", "listing_title": "Dell XPS 13 laptop, like new", "in_reply_to": "Is this still available?" }
        },
      }),
    });
    const { score, questions } = await response.json();
    ```
  </Tab>
</Tabs>

## Fields you send [#fields-you-send]

Send the details, not only an ID: an account ID tells the score nothing, but the account's age, profile and history do. Fields that are not in this list are also read.

| Field           |          | Description                                                                                                           |
| --------------- | -------- | --------------------------------------------------------------------------------------------------------------------- |
| `content`       | Required | The full text of the post, listing or message.                                                                        |
| `policy`        | Optional | The rules the content should follow, written out. Not a policy ID.                                                    |
| `author`        | Optional | A description of the author, not a user ID: the account's age, what they have posted before, and any earlier reports. |
| `context`       | Optional | Where the content appears, and the text it replies to.                                                                |
| `reports`       | Optional | What other users reported, in their words.                                                                            |
| `other_context` | Optional | Any other information, structured or unstructured, that is useful for scoring.                                        |

## Response [#response]

`score` runs from 0, the lowest risk, to 1000, the highest. `questions` are the yes/no questions behind it, each with the probability that the answer is yes.

```json title="200 OK"
{
  "score": 947,
  "questions": [
    {
      "text": "Does the message ask the reader to pay or talk somewhere else?",
      "probability": 0.97
    },
    {
      "text": "Does it ask for payment by gift card?",
      "probability": 0.96
    },
    {
      "text": "Is the author sending the same kind of message to many people?",
      "probability": 0.9
    },
    {
      "text": "Does it threaten or harass a person?",
      "probability": 0.02
    }
  ],
  "request_id": "req_01M4YF1068X8B4C458ENPD4JHT"
}
```

## The questions behind the score [#the-questions-behind-the-score]

1. Does the message ask the reader to pay or talk somewhere else?
2. Does it ask for payment by gift card?
3. Is the author sending the same kind of message to many people?
4. Does it threaten or harass a person?

Every organization gets the same questions for this score. To use your own questions, or to calibrate a score to your own outcomes, copy it to a [custom scoring model](/score-model) in the Finic app (Starter plan and above).

## Turn the score into an action [#turn-the-score-into-an-action]

These thresholds are examples. Choose your own, and change them as you learn.

| Score       | Action  | Example                            |
| ----------- | ------- | ---------------------------------- |
| Under 300   | Approve | Publish it.                        |
| 300 to 599  | Step up | Publish with a warning or a limit. |
| 600 to 849  | Review  | Hold for a moderator.              |
| 850 or more | Block   | Remove it.                         |

## Errors [#errors]

| Status | `type`                 | When                                                                                                           |
| ------ | ---------------------- | -------------------------------------------------------------------------------------------------------------- |
| 400    | `invalid_request`      | `context` is missing, is not a JSON object, or a required field (`content`) is empty. `param` names the field. |
| 401    | `authentication_error` | The API key is missing or not valid.                                                                           |
| 402    | `insufficient_credit`  | The organization has no credit. Add credit in the Finic app.                                                   |
| 429    | `rate_limited`         | Too many requests. Retry with exponential backoff.                                                             |

See the [API reference](/reference) for every error and limit, and [Pricing](/pricing) for what a call costs.
