Schema Reference
Complete documentation of all response schemas returned by Respectify APIs.
Core Schemas
| Schema | Description |
|---|---|
| CommentScore | Full comment quality analysis with toxicity, fallacies, and tone |
| SpamDetectionResult | Spam detection result |
| CommentRelevanceResult | On-topic and banned topics analysis |
| DogwhistleResult | Coded language detection |
| MegaCallResult | Combined results from batch operations |
| InitTopicResponse | Topic initialization response |
| UserCheckResponse | Credential verification and subscription status |
Field Naming Conventions
JSON responses use snake_case. Each language SDK maps to its conventions:
| JSON (REST) | Python | PHP |
|---|---|---|
is_spam | is_spam | isSpam |
overall_score | overall_score | overallScore |
on_topic | on_topic | onTopic |
banned_topics | banned_topics | bannedTopics |
toxicity_score | toxicity_score | toxicityScore |
Common Patterns
Confidence Scores
All confidence fields are floats from 0.0 to 1.0:
- 0.0: No confidence
- 0.5: Moderate confidence
- 1.0: High confidence
Optional Fields
Some schemas have optional nested objects (e.g., DogwhistleResult.details). These are:
- Python:
None - PHP:
null - JSON:
nullor absent
Always check before accessing:
if result.details:
print(result.details.dogwhistle_terms)
Arrays
Arrays are empty [] when no items found, not null:
# Safe - always iterable
for fallacy in result.logical_fallacies:
print(fallacy.fallacy_name)