Skip to main content

Schema Reference

Complete documentation of all response schemas returned by Respectify APIs.

Core Schemas

SchemaDescription
CommentScoreFull comment quality analysis with toxicity, fallacies, and tone
SpamDetectionResultSpam detection result
CommentRelevanceResultOn-topic and banned topics analysis
DogwhistleResultCoded language detection
MegaCallResultCombined results from batch operations
InitTopicResponseTopic initialization response
UserCheckResponseCredential verification and subscription status

Field Naming Conventions

JSON responses use snake_case. Each language SDK maps to its conventions:

JSON (REST)PythonPHP
is_spamis_spamisSpam
overall_scoreoverall_scoreoverallScore
on_topicon_topiconTopic
banned_topicsbanned_topicsbannedTopics
toxicity_scoretoxicity_scoretoxicityScore

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: null or 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)