Skip to content
StatusSupportDashboard

Request a new decision

decisions.create(DecisionCreateParams**kwargs) -> DecisionCreateResponse
post/v1/decisions

Submit content for review and receive a decision ID to track the results. The decision is processed asynchronously.

ParametersExpand Collapse
content: Dict[str, Union[str, float, bool, 2 more]]

The data to be reviewed. The structure depends on the type of content.

Accepts one of the following:
str
float
bool
SequenceNotStr[str]
type: str

The type of content to review

metadata: Optional[Dict[str, Union[str, float, bool, null]]]

Customer metadata as key-value pairs

Accepts one of the following:
str
float
bool
ReturnsExpand Collapse
class DecisionCreateResponse:

Response containing the decision ID

decision_id: str

Unique identifier for the decision

metadata: Dict[str, Union[str, float, bool, null]]

Customer metadata as key-value pairs

Accepts one of the following:
str
float
bool
type: str

Type of content to review

Request a new decision
import os
from safetykit import Safetykit

client = Safetykit(
    api_key=os.environ.get("SAFETYKIT_API_KEY"),  # This is the default and can be omitted
)
decision = client.decisions.create(
    content={
        "url": "https://www.example.com/products/42"
    },
    type="product_review",
)
print(decision.decision_id)
{
  "decision_id": "content_01h2m7qdmdjckc30e1mnq6xqfd",
  "metadata": {},
  "type": "product_review"
}
Returns Examples
{
  "decision_id": "content_01h2m7qdmdjckc30e1mnq6xqfd",
  "metadata": {},
  "type": "product_review"
}