# Projects

Source: https://www.pontive.com/docs/api-reference/platform/projects

Base URL: `https://api.pontive.com/v1` (operations that name another server say so).

## List projects

```http
GET https://api.pontive.com/v1/projects
```

Get a list of projects for a workspace

Operation ID: `ListProjects`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string |  | Workspace ID |
| `status` | "active" \| "paused" \| "deleted" |  | Filter by status |
| `region` | "us" \| "eu" \| "au" |  | Filter by region |
| `page` | integer |  | Page number |
| `limit` | integer |  | Page size (default 25, at most 100) |
| `sort` | string |  | Sort order |
| `search` | string |  | Search term (name depending on implementation) |

### Responses

- `200` OK: ListProjectsResponse
- `400` Bad Request: ErrResponse
- `500` Internal Server Error: ErrResponse

## Create project

```http
POST https://api.pontive.com/v1/projects
```

Create a new project in a workspace. The project is created with one non_production instance (Development, slug dev), returned in instances.

Operation ID: `CreateProject`

### Request body (`application/json`, required): CreateProjectRequest

Create Project Request

### Responses

- `201` Created: Project
- `400` invalid_slug, invalid_region, validation_error: ErrResponse
- `403` Forbidden: ErrResponse
- `409` slug_conflict, project_limit_exceeded: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get project

```http
GET https://api.pontive.com/v1/projects/{project_id}
```

Get project details by ID or slug

Operation ID: `GetProject`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes | Project ID |

### Responses

- `200` OK: Project
- `400` Bad Request: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update project

```http
PATCH https://api.pontive.com/v1/projects/{project_id}
```

Update an existing project

Operation ID: `UpdateProject`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes | Project ID |

### Request body (`application/json`, required): UpdateProjectRequest

Update Project Request

### Responses

- `200` OK: Project
- `400` Bad Request: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete project

```http
DELETE https://api.pontive.com/v1/projects/{project_id}
```

Soft-delete a project and every instance in it, recoverable for 30 days: it carries purge_scheduled_at, deleted_at plus 30 days, and is purged with its instances after it. Requires {"confirm_delete": true}; without it the API returns 400 confirmation_required.

Operation ID: `DeleteProject`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes | Project ID |

### Request body (`application/json`, required): DeleteProjectRequest

Delete confirmation

### Responses

- `204` Project deleted successfully
- `400` confirmation_required: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Pause project

```http
POST https://api.pontive.com/v1/projects/{project_id}/pause
```

Pause a project

Operation ID: `PauseProject`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes | Project ID |

### Responses

- `200` OK: Project
- `400` Bad Request: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Purge project

```http
POST https://api.pontive.com/v1/projects/{project_id}/purge
```

Permanently delete a deleted project and its instances now, rather than at its purge_scheduled_at, and retire its slug and host labels. Cannot be undone.

Operation ID: `PurgeProject`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes | Project ID |

### Responses

- `204` Project purged successfully
- `400` Bad Request: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Restore project

```http
POST https://api.pontive.com/v1/projects/{project_id}/restore
```

Restore a deleted project within 30 days of its deletion, until its purge_scheduled_at (409 restore_window_closed after, when it is purged).

Operation ID: `RestoreProject`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes | Project ID |

### Responses

- `200` OK: Project
- `400` Bad Request: ErrResponse
- `404` Not Found: ErrResponse
- `409` restore_window_closed: ErrResponse
- `500` Internal Server Error: ErrResponse

## Resume project

```http
POST https://api.pontive.com/v1/projects/{project_id}/resume
```

Resume a paused project

Operation ID: `ResumeProject`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | yes | Project ID |

### Responses

- `200` OK: Project
- `400` Bad Request: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListProjectsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Project[] |  | List of projects |
| `object` | string |  | The object type |
| `pagination` | Pagination |  | Pagination information |

### ErrResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | ErrBody |  |  |

### CreateProjectRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | The description of the project (0-500 chars) |
| `metadata` | Metadata |  | The new metadata for the project |
| `name` | string | yes | The name of the project (1-100 chars) |
| `region` | "us" \| "eu" \| "au" |  | The region where the project is deployed |
| `tenancy_mode` | "b2b" \| "b2c" | yes | The tenancy mode of the project: b2b (organizations) or b2c. Required and immutable once the project is created. |
| `workspace_id` | string | yes | The ID of the workspace the project is created in |

### Project

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `charges` | ProjectCharges |  | What the project started billing per month, on the project a create returns and nowhere else: nothing on Free or in one of the plan's included slots; else the additional-project fee and, on a b2b project, the uplift (pontive-spec 10). Absent where the installation bills nothing. |
| `compliance_tags` | ComplianceTags |  | Compliance tags of the project |
| `created_at` | string (date-time) |  | The time when the project was created |
| `deleted_at` | string (date-time) |  | The time when the project was deleted, if applicable |
| `description` | string |  | The description of the project |
| `id` | string |  | The unique identifier of the project |
| `instances` | InstanceSummary[] |  | Read-only summary of the project's instances, oldest first |
| `metadata` | Metadata |  | The new metadata for the project |
| `name` | string |  | The name of the project |
| `object` | string |  | The object type |
| `paused_at` | string (date-time) |  | The time when the project was paused, if applicable |
| `purge_scheduled_at` | string (date-time) |  | When a deleted project's restore window ends, deleted_at plus 30 days: it can be restored until then, and is purged after (route review D30). Null unless the project is deleted. |
| `region` | "us" \| "eu" \| "au" |  | The region where the project and all its instances are deployed |
| `slug` | string |  | The slug of the project. Client-supplied, permanent, globally unique and never reused. |
| `status` | "active" \| "paused" \| "deleted" |  | The current status of the project |
| `tenancy_mode` | "b2b" \| "b2c" |  | The project's tenancy mode, chosen at creation and immutable. Every instance inherits it. |
| `updated_at` | string (date-time) |  | The time when the project was last updated |
| `workspace_id` | string |  | The ID of the workspace that owns this project |

### UpdateProjectRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | The new description for the project |
| `metadata` | Metadata |  | The new metadata for the project |
| `name` | string |  | The new name for the project minLength: 1 maxLength: 255 |

### DeleteProjectRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `confirm_delete` | boolean |  | Must be true; without it the API returns 400 confirmation_required. Deleting a project soft-deletes every instance in it. |

### Pagination

Pagination information

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer |  | Number of records per page |
| `page` | integer |  | Current page number |
| `total` | integer |  | Total number of records |
| `total_pages` | integer |  | Total number of pages |

### ErrBody

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string |  | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). |
| `doc_url` | string |  | DocURL links to documentation about this error, when available. |
| `message` | string |  | Message is a human-readable description of what went wrong. |
| `object` | string |  | Object is the discriminator; always "error". |
| `param` | string |  | Param names the request parameter this error refers to, when applicable. |
| `type` | string |  | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. |

### Metadata

The new metadata for the project

Type: Record<string, string>

### ProjectCharges

What the project started billing per month, on the project a create
returns and nowhere else: nothing on Free or in one of the plan's
included slots; else the additional-project fee and, on a b2b project,
the uplift (pontive-spec 10). Absent where the installation bills
nothing.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `included` | boolean |  | Whether the project took one of the plan's included slots. |

### ComplianceTags

Compliance tags of the project

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `GDPR` | boolean |  |  |
| `HIPAA` | boolean |  |  |

### InstanceSummary

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `environment` | "production" \| "non_production" |  | The environment of the instance |
| `id` | string |  | The unique identifier of the instance |
| `name` | string |  | The name of the instance |
| `slug` | string |  | The slug of the instance |
| `status` | "active" \| "paused" \| "deleted" |  | The effective status of the instance |
