Projects
List and manage projects in your UGCLab workspace
List projects in your workspace.
Base URL
https://api.ugclab.app/api/v1List Projects
Get a paginated list of all projects in your workspace.
GET /projectsQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Number of items per page (max 100) |
cursor | string | - | Cursor for pagination (from previous response) |
Response
{
"data": {
"items": [
{
"id": "clxyz123...",
"name": "Summer Campaign",
"folder": {
"id": "clfolder123...",
"name": "Marketing"
},
"ugcCount": 15,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-20T14:45:00.000Z"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "clxyz456...",
"limit": 50
}
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2025-01-15T10:30:00.000Z"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique project ID (use this in UGC creation requests) |
name | string | Project name |
folder | object | Parent folder information (can be null) |
folder.id | string | Folder ID |
folder.name | string | Folder name |
ugcCount | number | Number of UGC items in this project |
createdAt | string | ISO 8601 creation timestamp |
updatedAt | string | ISO 8601 last update timestamp |
Examples
curl -X GET "https://api.ugclab.app/api/v1/projects?limit=20" \
-H "Authorization: Bearer ugc_your_api_key"const response = await fetch('https://api.ugclab.app/api/v1/projects?limit=20', {
headers: {
'Authorization': 'Bearer ugc_your_api_key',
},
});
const data = await response.json();
for (const project of data.data.items) {
console.log(`${project.name} (${project.ugcCount} UGCs)`);
}
// Handle pagination
if (data.data.pagination.hasMore) {
const nextPage = await fetch(
`https://api.ugclab.app/api/v1/projects?cursor=${data.data.pagination.nextCursor}`,
{ headers: { 'Authorization': 'Bearer ugc_your_api_key' } }
);
}import requests
response = requests.get(
'https://api.ugclab.app/api/v1/projects',
headers={'Authorization': 'Bearer ugc_your_api_key'},
params={'limit': 20}
)
data = response.json()
for project in data['data']['items']:
print(f"{project['name']} ({project['ugcCount']} UGCs)")
# Handle pagination
if data['data']['pagination']['hasMore']:
next_response = requests.get(
'https://api.ugclab.app/api/v1/projects',
headers={'Authorization': 'Bearer ugc_your_api_key'},
params={'cursor': data['data']['pagination']['nextCursor']}
)Error Codes
| Code | HTTP Status | Description |
|---|---|---|
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Internal server error |
See Authentication for authentication-related errors.