POST
/
v1
/
loops
curl -X POST https://api.hitl.sh/v1/loops \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Content Moderation Review",
    "description": "Review user-generated content for community guidelines compliance",
    "icon": "shield-check"
  }'
{
  "error": false,
  "msg": "Loop created successfully with QR code",
  "data": {
    "loop": {
      "id": "65f1234567890abcdef12345",
      "name": "Content Moderation Review",
      "description": "Review user-generated content for community guidelines compliance",
      "icon": "shield-check",
      "creator_id": "65f1234567890abcdef12346",
      "members": [
        {
          "user_id": "65f1234567890abcdef12346",
          "email": "creator@example.com",
          "status": "active",
          "joined_at": "2024-03-15T10:30:00Z"
        }
      ],
      "member_count": 1,
      "pending_count": 0,
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z"
    },
    "invite_code": "ABC123DEF",
    "qr_code_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "qr_code_url": "https://api.hitl.sh/qr/ABC123DEF.png",
    "join_url": "https://app.hitl.sh/join/ABC123DEF"
  }
}
Create a new loop to route human review requests. When you create a loop, you automatically become a member and receive an invite code with QR code for sharing with other reviewers.

Authentication

Authorization
string
required
Your API key for authentication

Body

name
string
required
Name of the loop (1-100 characters)
description
string
Description of the loop’s purpose (max 500 characters)
icon
string
required
Icon identifier for the loop (e.g., “shield-check”, “eye”, “thumbs-up”)

Response

error
boolean
Whether an error occurred
msg
string
Success message
data
object
curl -X POST https://api.hitl.sh/v1/loops \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Content Moderation Review",
    "description": "Review user-generated content for community guidelines compliance",
    "icon": "shield-check"
  }'
{
  "error": false,
  "msg": "Loop created successfully with QR code",
  "data": {
    "loop": {
      "id": "65f1234567890abcdef12345",
      "name": "Content Moderation Review",
      "description": "Review user-generated content for community guidelines compliance",
      "icon": "shield-check",
      "creator_id": "65f1234567890abcdef12346",
      "members": [
        {
          "user_id": "65f1234567890abcdef12346",
          "email": "creator@example.com",
          "status": "active",
          "joined_at": "2024-03-15T10:30:00Z"
        }
      ],
      "member_count": 1,
      "pending_count": 0,
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z"
    },
    "invite_code": "ABC123DEF",
    "qr_code_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "qr_code_url": "https://api.hitl.sh/qr/ABC123DEF.png",
    "join_url": "https://app.hitl.sh/join/ABC123DEF"
  }
}

Use Cases

Content Moderation

Create a loop for reviewing flagged user content:
{
  "name": "Content Moderation",
  "description": "Review flagged posts and comments for policy violations",
  "icon": "shield-exclamation"
}

Document Approval

Create a loop for business document approvals:
{
  "name": "Contract Review",
  "description": "Legal review of customer contracts and agreements",
  "icon": "document-check"
}

Quality Assurance

Create a loop for AI output validation:
{
  "name": "AI Content QA",
  "description": "Quality assurance for AI-generated content and responses",
  "icon": "beaker"
}

Next Steps

After creating a loop:
  1. Share the invite code or QR code with your team members
  2. Create your first request using the Create Request endpoint
  3. Set up webhooks to receive notifications when requests are completed

Create Your First Request

Learn how to create requests within your newly created loop.