Projects API
Create, list, update, and delete projects via the REST API.
List Projects
Retrieve all projects in your organization. Results are paginated.
GET /api/v1/projects
curl https://api.documentstack.dev/api/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"success": true,
"data": {
"projects": [
{
"id": "proj_xyz",
"name": "Invoicing",
"description": "All invoice templates",
"templateCount": 5,
"createdAt": "2025-04-10T12:00:00Z",
"updatedAt": "2025-06-15T09:30:00Z"
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 8,
"totalPages": 1
}
}
}Get a Project
GET /api/v1/projects/:id
curl https://api.documentstack.dev/api/v1/projects/proj_xyz \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"success": true,
"data": {
"id": "proj_xyz",
"name": "Invoicing",
"description": "All invoice templates",
"templateCount": 5,
"templates": [
{ "id": "tmpl_abc123", "name": "Invoice Template", "version": 3 }
],
"createdAt": "2025-04-10T12:00:00Z",
"updatedAt": "2025-06-15T09:30:00Z"
}
}Create a Project
POST /api/v1/projects
curl -X POST https://api.documentstack.dev/api/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "HR Documents",
"description": "Offer letters, contracts, and certificates"
}'Response
{
"success": true,
"data": {
"id": "proj_new456",
"name": "HR Documents",
"description": "Offer letters, contracts, and certificates",
"templateCount": 0,
"createdAt": "2025-08-01T10:00:00Z",
"updatedAt": "2025-08-01T10:00:00Z"
}
}Update a Project
PUT /api/v1/projects/:id
curl -X PUT https://api.documentstack.dev/api/v1/projects/proj_new456 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "HR & Legal Documents" }'Delete a Project
DELETE /api/v1/projects/:id
curl -X DELETE https://api.documentstack.dev/api/v1/projects/proj_new456 \
-H "Authorization: Bearer YOUR_API_KEY"Destructive Action
Deleting a project permanently removes the project and all its templates. This action cannot be undone.Project Object
| Field | Type | Description |
|---|---|---|
id | string | Unique project identifier |
name | string | Project display name |
description | string | Optional project description |
templateCount | number | Number of templates in the project |
templates | array | Template summaries (only on single-project fetch) |
createdAt | string | ISO 8601 creation timestamp |
updatedAt | string | ISO 8601 last-modified timestamp |
Next Steps
- Templates API — Manage templates
- Generate API — Generate PDFs
- Error Handling — Handle API errors