For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart: Moderating Your First Content

Send your first piece of content to Lasso, watch it get moderated in the dashboard and receive the decision back on your webhook.

This guide walks you through your first end-to-end moderation flow: create an API key, send a piece of content to Lasso, find it in the dashboard, take a decision and receive that decision on your webhook. It takes about ten minutes with a terminal and curl, but any HTTP client works.

You need a Lasso workspace and an admin account. If you are unfamiliar with any of the terms below, see Key Concepts.

Step 1: Create an API key

  1. Log in to your dashboard and go to Settings → API & Webhooks.

  2. In the API Keys section, enter a name in the API key name field, for example "Test key".

  3. Click Create API key.

  4. Copy the key from the notification and store it somewhere safe. Keys start with lasso..

Step 2: Send your first content

Send a piece of content to the API. Replace lasso.YOUR_API_KEY with the key from step 1:

The response is:

Lasso accepted the content and moderates it in the background: it is analyzed, checked against your rules and, when configured, judged by your AI Moderator.

About the fields:

  • content_id: your own identifier for the content. Lasso always refers back to content, users, categories and subcategories by the ids you provide.

  • user: the user who created the content. Only id is required.

  • category and subcategory: where the content was posted on your platform. Both are required. The name is optional, but send it on the first call so they show up with readable names in the dashboard.

  • text: the content itself, up to 4,000 characters. Instead of (or along with) text you can send image_urls, video_urls or audio_urls. Media URLs must be publicly reachable; for private storage buckets, see URL Signing.

Workspaces on the free plan can send 1,000 content items per 7 days, which is plenty for testing. See Rate Limits for the limits on paid plans.

Step 3: Find it in the dashboard

  1. Click Content in the sidebar.

  2. Your item appears at the top of the feed, usually within a second or two. The feed updates live, so there is no need to refresh.

  3. Click the item to open its detail page, where you can see the user who posted it, the automated analysis and the activity timeline.

Step 4: Take your first decision

  1. Hover over the content item. Action buttons appear in its top-right corner: Allow, Flag and Remove (the default names, your workspace may use different words).

  2. Click Remove.

  3. A Remove Content dialog opens. Pick a Policy category (the reason for the decision) and optionally add Extra information.

  4. Click Remove content.

The status changes to Removed, and the decision is recorded on the item's activity timeline with you as the actor. Once a default policy is configured, you can Shift+Click an action button to act without the confirmation dialog.

Step 5: Receive decisions on your webhook

Decisions only have effect once your platform enforces them, and that happens through your webhook.

  1. Set up an HTTPS endpoint that can receive POST requests. For a quick test, any tool that shows incoming HTTP requests works.

  2. Go to Settings → API & Webhooks, scroll to the Webhooks section, enter your endpoint URL and click Create webhook.

  3. Take another decision on your test item, for example Allow it again.

  4. Your endpoint receives a ChangeStatus action with the content's id, its new status and the policy category. See Webhooks for all payload shapes and for verifying the X-Lasso-Signature header with the secret shown in the Secret column.

Optional: pre-moderation

POST /api/v1/content moderates in the background, which suits platforms where content goes live immediately (post-moderation). If content on your platform should only go live after approval, use the synchronous endpoint instead. It runs the automated checks and returns the decision in the response:

status is the final status of the content: allowed, flagged or hidden (hidden is what the dashboard shows as Removed). actions lists what acted on it, in the same shape as webhook payloads; it is empty when no rule or AI Moderator took action.

A few things to know about the synchronous endpoint:

  • Text-only content is evaluated before the response returns. Content with media can take longer; after 15 seconds the endpoint returns { "success": true, "timeout": true } and the decision arrives through your webhook instead.

  • Videos cannot be ingested synchronously.

Troubleshooting

  • 401 Unauthorized: the API key is missing or wrong. The header must be Authorization: Bearer lasso.YOUR_API_KEY.

  • 400 with field errors: the request body is invalid. The error object lists each failing field, for example { "category": "Required" }.

  • 400 "Can only update content that match existing user, category and subcategory ids": you sent a content_id that Lasso already knows, with a different user, category or subcategory. Use a new content_id or the original ids.

  • 429 Too Many Requests: you hit a rate limit. Check the X-RateLimit-Remaining and X-RateLimit-Reset response headers, and see Rate Limits.

Next steps

Last updated