# Resume a paused project

## `POST /v1/projects/{projectId}/resume`

Clears the paused state on the project's spicepod and creates a new
deployment to bring the runtime back up. A project connected to a
GitHub repository deploys spicepod.yaml from its root directory on its
production branch, read when the project resumes. Requires
`apps:write`.

### Path parameters

- `projectId` (integer, required): The ID of the project to resume

### Header parameters

- `Authorization` (string, required): `Bearer <token>`. [Authentication](https://spice.ai/docs/cloud/api/management#authentication) lists the tokens it accepts.
- `X-Org-Name` (string, optional): The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own. A portal session token is bound to none, so it must send this header on every route but `GET /v1/orgs` (400 `org_assertion_required` otherwise). Pattern: `^[A-Za-z0-9._-]{1,255}$`.

### Example request

```bash
curl -X POST "https://api.spice.ai/v1/projects/<projectId>/resume" \
  -H "Authorization: Bearer <token>"
```

```http
POST /v1/projects/<projectId>/resume HTTP/1.1
Host: api.spice.ai
Authorization: Bearer <token>
```

### Responses

**200 OK**

Project resumed, deployment created

Content type: `application/json`

- `id` (integer, required): The project ID
- `name` (string, required): The project name
- `paused_at` (string (date-time) | null, required): Always null after a successful resume
- `deployment_id` (integer, required): ID of the deployment created to bring the runtime back up

**400 Bad Request**

Invalid project ID, missing API key, missing project organization, no spicepod configured, spicepod has been deleted, or the spicepod `name`, `kind` or `version` is missing or not valid (the body carries an `issues` array of `{path, message}`). For a project connected to a GitHub repository, also returned when the root directory has no spicepod.yaml or it is invalid or too large (`code: spicepod_not_found`, `spicepod_invalid` or `spicepod_too_large`). The project stays paused.

**401 Unauthorized**

Unauthorized

**403 Forbidden**

Insufficient scope, or the org's GitHub App installation cannot read the connected repository (`code: github_unauthorized` or `github_forbidden`). The project stays paused.

**404 Not Found**

Project not found, or the connected GitHub repository or its production branch was not found (`code: github_not_found`). The project stays paused.

**409 Conflict**

Project is not paused

**422 Unprocessable Content**

No runtime version in the catalog matches this project’s version range (`code: version_no_match`), or the spicepod uses version v1beta1, which the Spice 2 runtime cannot load (`code: spicepod_version_unsupported`). Also returned when the spicepod uses a connection credential that holds a secret reference deploy cannot resolve (`code: connection_credentials_unresolved`, with an `unresolved_credentials` array of `{connection, field}`). The project stays paused.

**429 Too Many Requests**

GitHub rate-limited the read of the connected repository (`code: github_rate_limited`). The project stays paused.

**500 Internal Server Error**

Internal server error

**502 Bad Gateway**

GitHub did not answer while the connected repository was read (`code: github_unavailable`). The project stays paused.

**503 Service Unavailable**

The runtime version catalog is unavailable or empty (`code: version_source_unavailable`), so an unpinned stable or preview resume cannot resolve an image tag.

## `POST /v1/orgs/{orgId}/projects/{projectId}/resume`

The org is `orgId` in the path. Clears the paused state on the project's spicepod and creates a new
deployment to bring the runtime back up. A project connected to a
GitHub repository deploys spicepod.yaml from its root directory on its
production branch, read when the project resumes. Requires
`apps:write`.

### Path parameters

- `orgId` (integer, required): The org id from GET /v1/orgs. Minimum: `1`.
- `projectId` (integer, required): The ID of the project to resume

### Header parameters

- `Authorization` (string, required): `Bearer <token>`. [Authentication](https://spice.ai/docs/cloud/api/management#authentication) lists the tokens it accepts.
- `X-Org-Name` (string, optional): When present, X-Org-Name must name the same org as orgId. Otherwise the request returns org\_path\_mismatch (400). Pattern: `^[A-Za-z0-9._-]{1,255}$`.

### Example request

```bash
curl -X POST "https://api.spice.ai/v1/orgs/<orgId>/projects/<projectId>/resume" \
  -H "Authorization: Bearer <token>"
```

```http
POST /v1/orgs/<orgId>/projects/<projectId>/resume HTTP/1.1
Host: api.spice.ai
Authorization: Bearer <token>
```

### Responses

**200 OK**

Project resumed, deployment created

Content type: `application/json`

- `id` (integer, required): The project ID
- `name` (string, required): The project name
- `paused_at` (string (date-time) | null, required): Always null after a successful resume
- `deployment_id` (integer, required): ID of the deployment created to bring the runtime back up

**400 Bad Request**

Invalid project ID, missing API key, missing project organization, no spicepod configured, spicepod has been deleted, or the spicepod `name`, `kind` or `version` is missing or not valid (the body carries an `issues` array of `{path, message}`). For a project connected to a GitHub repository, also returned when the root directory has no spicepod.yaml or it is invalid or too large (`code: spicepod_not_found`, `spicepod_invalid` or `spicepod_too_large`). The project stays paused. orgId is not a valid org id (`invalid_org_id`), or X-Org-Name does not name that org (`org_path_mismatch`).

**401 Unauthorized**

Unauthorized

**403 Forbidden**

Insufficient scope, or the org's GitHub App installation cannot read the connected repository (`code: github_unauthorized` or `github_forbidden`). The project stays paused. The caller is not a member of the org (`org_forbidden`). A machine credential named a different org (`org_assertion_mismatch`). The org is deleted (`org_deleted`).

**404 Not Found**

Project not found, or the connected GitHub repository or its production branch was not found (`code: github_not_found`). The project stays paused.

**409 Conflict**

Project is not paused

**422 Unprocessable Content**

No runtime version in the catalog matches this project’s version range (`code: version_no_match`), or the spicepod uses version v1beta1, which the Spice 2 runtime cannot load (`code: spicepod_version_unsupported`). Also returned when the spicepod uses a connection credential that holds a secret reference deploy cannot resolve (`code: connection_credentials_unresolved`, with an `unresolved_credentials` array of `{connection, field}`). The project stays paused.

**429 Too Many Requests**

GitHub rate-limited the read of the connected repository (`code: github_rate_limited`). The project stays paused.

**500 Internal Server Error**

Internal server error

**502 Bad Gateway**

GitHub did not answer while the connected repository was read (`code: github_unavailable`). The project stays paused.

**503 Service Unavailable**

The runtime version catalog is unavailable or empty (`code: version_source_unavailable`), so an unpinned stable or preview resume cannot resolve an image tag.

## `POST /v1/apps/{appId}/resume` (deprecated)

Legacy alias of `/v1/projects/{projectId}/resume` — projects were previously called apps. Clears the paused state on the project's spicepod and creates a new
deployment to bring the runtime back up. A project connected to a
GitHub repository deploys spicepod.yaml from its root directory on its
production branch, read when the project resumes. Requires
`apps:write`.

### Path parameters

- `appId` (integer, required): The ID of the project to resume

### Header parameters

- `Authorization` (string, required): `Bearer <token>`. [Authentication](https://spice.ai/docs/cloud/api/management#authentication) lists the tokens it accepts.
- `X-Org-Name` (string, optional): The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own. A portal session token is bound to none, so it must send this header on every route but `GET /v1/orgs` (400 `org_assertion_required` otherwise). Pattern: `^[A-Za-z0-9._-]{1,255}$`.

### Example request

```bash
curl -X POST "https://api.spice.ai/v1/apps/<appId>/resume" \
  -H "Authorization: Bearer <token>"
```

```http
POST /v1/apps/<appId>/resume HTTP/1.1
Host: api.spice.ai
Authorization: Bearer <token>
```

### Responses

**200 OK**

Project resumed, deployment created

Content type: `application/json`

- `id` (integer, required): The project ID
- `name` (string, required): The project name
- `paused_at` (string (date-time) | null, required): Always null after a successful resume
- `deployment_id` (integer, required): ID of the deployment created to bring the runtime back up

**400 Bad Request**

Invalid project ID, missing API key, missing project organization, no spicepod configured, spicepod has been deleted, or the spicepod `name`, `kind` or `version` is missing or not valid (the body carries an `issues` array of `{path, message}`). For a project connected to a GitHub repository, also returned when the root directory has no spicepod.yaml or it is invalid or too large (`code: spicepod_not_found`, `spicepod_invalid` or `spicepod_too_large`). The project stays paused.

**401 Unauthorized**

Unauthorized

**403 Forbidden**

Insufficient scope, or the org's GitHub App installation cannot read the connected repository (`code: github_unauthorized` or `github_forbidden`). The project stays paused.

**404 Not Found**

Project not found, or the connected GitHub repository or its production branch was not found (`code: github_not_found`). The project stays paused.

**409 Conflict**

Project is not paused

**422 Unprocessable Content**

No runtime version in the catalog matches this project’s version range (`code: version_no_match`), or the spicepod uses version v1beta1, which the Spice 2 runtime cannot load (`code: spicepod_version_unsupported`). Also returned when the spicepod uses a connection credential that holds a secret reference deploy cannot resolve (`code: connection_credentials_unresolved`, with an `unresolved_credentials` array of `{connection, field}`). The project stays paused.

**429 Too Many Requests**

GitHub rate-limited the read of the connected repository (`code: github_rate_limited`). The project stays paused.

**500 Internal Server Error**

Internal server error

**502 Bad Gateway**

GitHub did not answer while the connected repository was read (`code: github_unavailable`). The project stays paused.

**503 Service Unavailable**

The runtime version catalog is unavailable or empty (`code: version_source_unavailable`), so an unpinned stable or preview resume cannot resolve an image tag.

OpenAPI: [api.spice.ai/openapi.json](https://api.spice.ai/openapi.json)
