> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.resemble.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.resemble.ai/_mcp/server.

# Score content

POST https://app.resemble.ai/api/v2/signal
Content-Type: application/json

Score a piece of content against the fraud and scam categories available to your team
and return a verdict with the best-matching categories.

Supply exactly one of:

- **Text** — `application/json` with a `text` field.
- **File** — `multipart/form-data` with the media attached as `file`. Audio, image, and
  video are supported, up to 15 MB. The media type is detected from the file's MIME type
  unless `media_type` is supplied.


Reference: https://docs.resemble.ai/api-reference/signal/create-signal-submission

## Authentication

- `Authorization` header (bearer token, required) — API key from https://app.resemble.ai/hub/api

## Request

### Body (application/json)

This endpoint expects an object.

- `text` (string, required) — Text to analyze.

## Response

### 200

Scored submission

- `success` (boolean, required)
- `item` (SignalScoreItem, required)

## Errors

### 400 Bad Request Error

Neither text nor file was provided, or `media_type` is invalid

- `success` (boolean, optional)
- `message` (string, optional)
- `max_bytes` (integer, optional) — Present on 413 responses.

### 403 Forbidden Error

The account does not have Signal access

- `success` (boolean, optional)
- `message` (string, optional)
- `max_bytes` (integer, optional) — Present on 413 responses.

### 413 Content Too Large Error

File exceeds the 15 MB limit

- `success` (boolean, optional)
- `message` (string, optional)
- `max_bytes` (integer, optional) — Present on 413 responses.

## Types

### SignalScoreItem

- `input_modality` (enum, required)
  - Allowed values: `text`, `audio`, `video`, `image`
- `verdict` (enum, required)
  - Allowed values: `safe`, `suspicious`, `fraud`
- `id` (integer, optional) — Submission identifier, used with `DELETE /signal/{id}`.
- `top_category` (SignalCategoryScore, optional)
- `category_scores` (list of SignalCategoryScore, optional) — Highest-scoring categories, including the top category.
- `benign_score` (double, optional, nullable) — How strongly the content matched benign, non-fraud content.
- `margin_over_second` (double, optional, nullable) — Gap between the top category score and the runner-up.
- `examples` (list of string, optional) — Sample phrases from the top category, useful for explaining the verdict.
- `top_matches` (list of SignalTopMatch, optional)
- `duration_seconds` (double, optional, nullable) — Media duration for audio and video. Null for text and image.
- `created_at` (datetime, optional)

### SignalCategoryScore

- `name` (string, required)
- `score` (double, required) — Similarity score from 0 to 1.
- `icon` (string, optional, nullable) — Single emoji associated with the category.

### SignalTopMatch

- `category` (string, optional) — Category the matched example belongs to.
- `text` (string, optional) — The individual training example that matched.
- `score` (double, optional)

## Examples

**Request**

```json
{
  "text": "wire the funds now to this account"
}
```

**Response**

```json
{
  "success": true,
  "item": {
    "input_modality": "text",
    "verdict": "safe",
    "id": 12345,
    "top_category": {
      "name": "CEO Impersonation / Wire Diversion",
      "score": 0.91,
      "icon": "👔"
    },
    "category_scores": [
      {
        "name": "CEO Impersonation / Wire Diversion",
        "score": 0.91,
        "icon": "👔"
      }
    ],
    "benign_score": 1.1,
    "margin_over_second": 1.1,
    "examples": [
      "string"
    ],
    "top_matches": [
      {
        "category": "string",
        "text": "string",
        "score": 1.1
      }
    ],
    "duration_seconds": 1.1,
    "created_at": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.resemble.ai/api/v2/signal"

payload = { "text": "wire the funds now to this account" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.resemble.ai/api/v2/signal';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"text":"wire the funds now to this account"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.resemble.ai/api/v2/signal"

	payload := strings.NewReader("{\n  \"text\": \"wire the funds now to this account\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.resemble.ai/api/v2/signal")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"text\": \"wire the funds now to this account\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.resemble.ai/api/v2/signal")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"wire the funds now to this account\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.resemble.ai/api/v2/signal', [
  'body' => '{
  "text": "wire the funds now to this account"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.resemble.ai/api/v2/signal");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"text\": \"wire the funds now to this account\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["text": "wire the funds now to this account"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.resemble.ai/api/v2/signal")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```