Get Started

API Reference / Projects

List Projects

Retrieve all projects associated with your API key. This endpoint supports pagination and filtering to help you manage large numbers of projects.

Endpoint

HTTP
GET /projects

Headers

NameRequiredDescription
AuthorizationYesBearer $PAGEGUN_API_KEY
Content-TypeNoapplication/json

Query Parameters

NameTypeRequiredDefaultDescription
limitintegerNo25Number of projects to return per page (1-100)
offsetintegerNo0Number of projects to skip for pagination
statusstringNoallFilter by status: active, archived, or all
domainstringNo-Filter by custom domain
created_afterstringNo-ISO 8601 timestamp to filter projects created after this date
created_beforestringNo-ISO 8601 timestamp to filter projects created before this date
sortstringNocreated_atSort field: created_at, updated_at, or name
orderstringNodescSort order: asc or desc

Response

Returns a paginated list of project objects.

JSON
{
  "data": [
    {
      "id": "proj_abc123",
      "name": "My Website",
      "slug": "my-website",
      "domain": "mywebsite.com",
      "status": "active",
      "hosting_mode": "full_host",
      "page_count": 12,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-20T14:00:00Z"
    }
  ],
  "meta": {
    "total": 156,
    "limit": 25,
    "offset": 0,
    "has_more": true
  }
}

Response Fields

Project Object

FieldTypeDescription
idstringUnique identifier for the project
namestringDisplay name of the project
slugstringURL-friendly version of the project name
domainstringCustom domain for the project (if configured)
statusstringCurrent status: active or archived
hosting_modestringHosting configuration: full_host, rewrite, or data_mode
page_countintegerNumber of pages in this project
created_atstringISO 8601 timestamp when project was created
updated_atstringISO 8601 timestamp when project was last modified

Meta Object

FieldTypeDescription
totalintegerTotal number of projects matching the filter
limitintegerMaximum number of items returned in this response
offsetintegerNumber of items skipped for pagination
has_morebooleanWhether there are more results available

Examples

Basic Request

Terminal
curl -X GET "https://api.pagegun.com/projects" \
  -H "Authorization: Bearer $PAGEGUN_API_KEY"

With Pagination

Terminal
curl -X GET "https://api.pagegun.com/projects?limit=10&offset=20" \
  -H "Authorization: Bearer $PAGEGUN_API_KEY"

Filter by Status and Domain

Terminal
curl -X GET "https://api.pagegun.com/projects?status=active&domain=mysite.com" \
  -H "Authorization: Bearer $PAGEGUN_API_KEY"

Sort by Name

Terminal
curl -X GET "https://api.pagegun.com/projects?sort=name&order=asc" \
  -H "Authorization: Bearer $PAGEGUN_API_KEY"

Error Responses

401 Unauthorized

JSON
{
  "statusCode": 401,
  "name": "unauthorized",
  "message": "Invalid or missing API key"
}

400 Bad Request

JSON
{
  "statusCode": 422,
  "name": "invalid_request",
  "message": "Invalid parameter value"
}

429 Too Many Requests

JSON
{
  "statusCode": 429,
  "name": "rate_limit_exceeded",
  "message": "Too many requests. Please try again later."
}

500 Internal Server Error

JSON
{
  "statusCode": 500,
  "name": "internal_error",
  "message": "An internal error occurred. Please try again."
}
© 2026 PageGun. All rights reserved.