Skip to main content
GET
/
authors
JavaScript
import ModerationAPI from '@moderation-api/sdk';

const client = new ModerationAPI({
  secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});

const authors = await client.authors.list();

console.log(authors.authors);
{
  "authors": [
    {
      "id": "<string>",
      "first_seen": 123,
      "last_seen": 123,
      "status": "enabled",
      "trust_level": {
        "level": 123,
        "manual": true
      },
      "block": {
        "until": 123,
        "reason": "<string>"
      },
      "risk_evaluation": {
        "risk_level": 50
      },
      "metrics": {
        "total_content": 123,
        "flagged_content": 123,
        "average_sentiment": 123
      },
      "metadata": {
        "email_verified": true,
        "phone_verified": true,
        "identity_verified": true,
        "is_paying_customer": true
      },
      "external_id": "<string>",
      "profile_picture": "<string>",
      "external_link": "<string>",
      "name": "<string>",
      "email": "[email protected]",
      "last_incident": 123
    }
  ],
  "pagination": {
    "total": 123,
    "pageSize": 123,
    "pageNumber": 123,
    "hasNextPage": true,
    "hasPreviousPage": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

pageSize
number
default:20

Number of authors per page

pageNumber
number
default:1

Page number to fetch

sortBy
enum<string>
Available options:
trustLevel,
violationCount,
reportCount,
memberSince,
lastActive,
contentCount,
flaggedContentRatio,
averageSentiment
sortDirection
enum<string>
default:desc

Sort direction

Available options:
asc,
desc
memberSinceDate
string
lastActiveDate
string
contentTypes
string

Response

Successful response

authors
object[]
required
pagination
object
required