# Get a project's deployment settings

> A project's g1t.page deployment settings, as its Settings → Deployments page shows them: whether Deployments are on (enabled; off for every project until someone turns them on), whether the default branch deploys to production on every push (production) and every pull request gets a preview (previews), production's address (production_url, and primary_domain once a custom domain serves it), how it builds (build_as: auto, static, workers or docker; build_command, output_dir, dockerfile and instance_type for a container; via_workflow to build through the deploy workflow g1t manages), how many days an unvisited preview stays up (idle_days), and what its last finished build found it to be (detected: workers, static, html or container, with framework), null before one has.

<div class="g1t-endpoint"><span class="g1t-method" data-method="get">GET</span><code>/workspaces/{workspace}/projects/{project}/deployments/settings</code></div>

A repository's own project has its name. Needs the Read role on the project's repository.

A repository's own project has the repository's name, so `flagon-io/session-lab`'s settings are at `/workspaces/flagon-io/projects/session-lab/deployments/settings`. `production_url` is where production is served once Deployments are on; `primary_domain` is the first active custom domain that serves it. `detected` and `framework` are what the last finished build found, and null before one has. Needs the Read role on the project's repository (`404` to anyone who cannot see it). See [Deployments](/guides/deployments/#settings).

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`workflow`](/reference/mcp/#workflow) with `action` `get_deployment_settings`, and the same inputs
- **Scope:** An access token needs [`deployments:read`](/guides/authentication/#scopes).

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace` | string | Yes | The workspace's slug, e.g. "flagon-io". |
| `project` | string | Yes | The project's slug, as in g1t.sh/{workspace}/{project}; a repository's own project has its name. |

## Example request

```sh
curl https://api.g1t.sh/workspaces/flagon-io/projects/session-lab/deployments/settings \
  -H "Authorization: Bearer $G1T_TOKEN"
```

## Example response

A successful request answers `200` with:

```json
{
  "workspace": "flagon-io",
  "project": "session-lab",
  "enabled": false,
  "production": true,
  "previews": true,
  "production_url": "https://session-lab-flagonio.g1t.page",
  "primary_domain": null,
  "build_as": "auto",
  "build_command": null,
  "output_dir": null,
  "dockerfile": null,
  "instance_type": "lite",
  "idle_days": 7,
  "via_workflow": false,
  "detected": null,
  "framework": null
}
```

## Errors

A failed request answers with one of these statuses and a body like `{"error": {"code": "not_found", "message": "Repository not found."}}`. See [errors](/reference/api/#errors).

| Status | Code | When |
| --- | --- | --- |
| 401 | `unauthenticated` | A token is required, or the one sent is not valid. |
| 403 | `forbidden` | The token is valid but not allowed to do this, such as a member-only change, or a token without the scope it needs. |
| 404 | `not_found` | It does not exist, or you cannot see it. |
| 422 | `invalid` | The input is not valid. `message` says which field and why. |
