Skip to main content
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 wordlist = await client.wordlist.retrieve('id');

console.log(wordlist.id);
{
  "id": "<string>",
  "name": "<string>",
  "words": [
    "<string>"
  ],
  "createdAt": "<string>",
  "organizationId": "<string>",
  "userId": "<string>",
  "strict": true
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

ID of the wordlist to get

Response

Successful response

id
string
required

ID of the wordlist

name
string | null
required

Name of the wordlist

words
string[]
required

Words in the wordlist

createdAt
string
required

Creation date of the wordlist

organizationId
string
required

ID of the organization

userId
string | null
required

ID of the user

strict
boolean
required

Strict mode