Skip to main content
GET
/
wordlist
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 wordlists = await client.wordlist.list();

console.log(wordlists);
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "createdAt": "<string>",
    "userId": "<string>"
  }
]

Authorizations

Authorization
string
header
required

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

Response

Successful response

id
string
required

Unique identifier of the wordlist

name
string | null
required

Name of the wordlist

description
string | null
required

Description of the wordlist

createdAt
string | null
required

When the wordlist was created

userId
string | null
required

User who created the wordlist