Document Stack
Document Stack
Docs

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

FieldTypeDescription
idstringUnique project identifier
namestringProject display name
descriptionstringOptional project description
templateCountnumberNumber of templates in the project
templatesarrayTemplate summaries (only on single-project fetch)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last-modified timestamp

Next Steps