Loops
Get User Loops
Retrieve all loops created by the authenticated user with member counts and status information
GET
/
v1
/
api
/
loops
curl -X GET https://api.hitl.sh/v1/api/loops \
-H "Authorization: Bearer your_api_key_here"
import requests
url = "https://api.hitl.sh/v1/api/loops"
headers = {
"Authorization": "Bearer your_api_key_here"
}
response = requests.get(url, headers=headers)
print(response.json())
const axios = require('axios');
const response = await axios.get('https://api.hitl.sh/v1/api/loops', {
headers: {
'Authorization': 'Bearer your_api_key_here'
}
});
console.log(response.data);
{
"error": false,
"msg": "Loops retrieved successfully",
"data": {
"loops": [
{
"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"
},
{
"user_id": "65f1234567890abcdef12347",
"email": "reviewer1@example.com",
"status": "active",
"joined_at": "2024-03-15T11:45:00Z"
},
{
"user_id": "65f1234567890abcdef12348",
"email": "reviewer2@example.com",
"status": "pending",
"joined_at": null
}
],
"member_count": 3,
"pending_count": 1,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T11:45:00Z"
},
{
"id": "65f1234567890abcdef12349",
"name": "Document Approval",
"description": "Legal review of customer contracts",
"icon": "document-check",
"creator_id": "65f1234567890abcdef12346",
"members": [
{
"user_id": "65f1234567890abcdef12346",
"email": "creator@example.com",
"status": "active",
"joined_at": "2024-03-14T09:15:00Z"
},
{
"user_id": "65f1234567890abcdef12350",
"email": "legal@example.com",
"status": "active",
"joined_at": "2024-03-14T14:30:00Z"
}
],
"member_count": 2,
"pending_count": 0,
"created_at": "2024-03-14T09:15:00Z",
"updated_at": "2024-03-14T14:30:00Z"
}
],
"count": 2
}
}
Get a list of all loops you have created. This endpoint returns comprehensive information about each loop including member statistics and current status.
Authentication
string
required
Your API key for authentication
Response
boolean
Whether an error occurred
string
Success message
object
Show data
Show data
array
Array of loop objects
Show loop
Show loop
string
Unique identifier for the loop
string
Name of the loop
string
Description of the loop
string
Icon identifier
string
ID of the loop creator
array
Array of loop members with status
integer
Total number of members in the loop
integer
Number of pending member invitations
string
ISO timestamp of creation
string
ISO timestamp of last update
integer
Total number of loops returned
curl -X GET https://api.hitl.sh/v1/api/loops \
-H "Authorization: Bearer your_api_key_here"
import requests
url = "https://api.hitl.sh/v1/api/loops"
headers = {
"Authorization": "Bearer your_api_key_here"
}
response = requests.get(url, headers=headers)
print(response.json())
const axios = require('axios');
const response = await axios.get('https://api.hitl.sh/v1/api/loops', {
headers: {
'Authorization': 'Bearer your_api_key_here'
}
});
console.log(response.data);
{
"error": false,
"msg": "Loops retrieved successfully",
"data": {
"loops": [
{
"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"
},
{
"user_id": "65f1234567890abcdef12347",
"email": "reviewer1@example.com",
"status": "active",
"joined_at": "2024-03-15T11:45:00Z"
},
{
"user_id": "65f1234567890abcdef12348",
"email": "reviewer2@example.com",
"status": "pending",
"joined_at": null
}
],
"member_count": 3,
"pending_count": 1,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T11:45:00Z"
},
{
"id": "65f1234567890abcdef12349",
"name": "Document Approval",
"description": "Legal review of customer contracts",
"icon": "document-check",
"creator_id": "65f1234567890abcdef12346",
"members": [
{
"user_id": "65f1234567890abcdef12346",
"email": "creator@example.com",
"status": "active",
"joined_at": "2024-03-14T09:15:00Z"
},
{
"user_id": "65f1234567890abcdef12350",
"email": "legal@example.com",
"status": "active",
"joined_at": "2024-03-14T14:30:00Z"
}
],
"member_count": 2,
"pending_count": 0,
"created_at": "2024-03-14T09:15:00Z",
"updated_at": "2024-03-14T14:30:00Z"
}
],
"count": 2
}
}
Understanding Loop Status
Member Status Types
Active Members
Users who have joined the loop and can receive review requests.
Pending Members
Users who have been invited but haven’t joined the loop yet.
Loop Information
Each loop provides:- Member statistics to understand team capacity
- Creation and update timestamps for tracking
- Complete member list with join status
- Creator information for ownership
Filtering and Management
Use this endpoint to:- Monitor loop health by checking member counts
- Identify inactive loops with no recent updates
- Track team growth through member statistics
- Manage loop portfolios across different use cases
Next Steps
Get Specific Loop
Retrieve detailed information about a specific loop by ID.
Update Loop
Modify loop details like name, description, or icon.
View Loop Members
Get detailed member information and manage loop membership.
⌘I
curl -X GET https://api.hitl.sh/v1/api/loops \
-H "Authorization: Bearer your_api_key_here"
import requests
url = "https://api.hitl.sh/v1/api/loops"
headers = {
"Authorization": "Bearer your_api_key_here"
}
response = requests.get(url, headers=headers)
print(response.json())
const axios = require('axios');
const response = await axios.get('https://api.hitl.sh/v1/api/loops', {
headers: {
'Authorization': 'Bearer your_api_key_here'
}
});
console.log(response.data);
{
"error": false,
"msg": "Loops retrieved successfully",
"data": {
"loops": [
{
"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"
},
{
"user_id": "65f1234567890abcdef12347",
"email": "reviewer1@example.com",
"status": "active",
"joined_at": "2024-03-15T11:45:00Z"
},
{
"user_id": "65f1234567890abcdef12348",
"email": "reviewer2@example.com",
"status": "pending",
"joined_at": null
}
],
"member_count": 3,
"pending_count": 1,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T11:45:00Z"
},
{
"id": "65f1234567890abcdef12349",
"name": "Document Approval",
"description": "Legal review of customer contracts",
"icon": "document-check",
"creator_id": "65f1234567890abcdef12346",
"members": [
{
"user_id": "65f1234567890abcdef12346",
"email": "creator@example.com",
"status": "active",
"joined_at": "2024-03-14T09:15:00Z"
},
{
"user_id": "65f1234567890abcdef12350",
"email": "legal@example.com",
"status": "active",
"joined_at": "2024-03-14T14:30:00Z"
}
],
"member_count": 2,
"pending_count": 0,
"created_at": "2024-03-14T09:15:00Z",
"updated_at": "2024-03-14T14:30:00Z"
}
],
"count": 2
}
}