Request a new decision
client.decisions.create(DecisionCreateParams { content, type, metadata } body, RequestOptionsoptions?): DecisionCreateResponse { decision_id, metadata, type }
/v1/decisions
Submit content for review and receive a decision ID to track the results. The decision is processed asynchronously.
Parameters
Returns
Request a new decision
import Safetykit from 'safetykit';
const client = new Safetykit({
apiKey: process.env['SAFETYKIT_API_KEY'], // This is the default and can be omitted
});
const decision = await client.decisions.create({
content: { url: 'https://www.example.com/products/42' },
type: 'product_review',
});
console.log(decision.decision_id);
{
"decision_id": "content_01h2m7qdmdjckc30e1mnq6xqfd",
"metadata": {},
"type": "product_review"
}
Returns Examples
{
"decision_id": "content_01h2m7qdmdjckc30e1mnq6xqfd",
"metadata": {},
"type": "product_review"
}