> For the complete documentation index, see [llms.txt](https://docs.terrakube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terrakube.io/api/methods/project-access.md).

# Project Access

This endpoint is used to manage team access within a Terrakube project. Project-level permissions are inherited by all workspaces within the project.

{% hint style="warning" %}
To use this endpoint you should have "manageWorkspace" access at team level or be a project admin
{% endhint %}

### Roles

| Role  | Description                                                                    |
| ----- | ------------------------------------------------------------------------------ |
| admin | Full control: manage workspaces, plan/approve jobs, manage project team access |
| write | Manage workspaces, plan and apply jobs                                         |
| plan  | Plan jobs only (cannot approve or apply)                                       |
| read  | Read-only access (no changes allowed)                                          |

### Entity fields:

| Path                            | Type    | Description                                                            |
| ------------------------------- | ------- | ---------------------------------------------------------------------- |
| data.type                       | string  | Should be "project\_access"                                            |
| data.attributes.name            | string  | Team name to grant access                                              |
| data.attributes.role            | string  | Role: "admin", "write", "plan", or "read"                              |
| data.attributes.manageWorkspace | boolean | Permission to create, update, and delete workspaces within the project |
| data.attributes.manageJob       | boolean | Permission to manage jobs within the project                           |
| data.attributes.planJob         | boolean | Permission to plan jobs within the project                             |
| data.attributes.approveJob      | boolean | Permission to approve and apply jobs within the project                |
| data.attributes.manageState     | boolean | Permission to manage Terraform state within the project                |

### Example:

```json
{
    "data": {
        "type": "project_access",
        "attributes": {
            "name": "DEVELOPERS",
            "role": "write"
        }
    }
}
```

### Supported Operations

{% openapi src="/files/SRDoGWJ2keFnStreqMbm" path="/organization/{organizationId}/project/{projectId}/projectAccess" method="get" %}
[v2\_7.yaml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-a0835f006f08c9cf0115fe717f9c0da99ac9cfda%2Fv2_7.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/SRDoGWJ2keFnStreqMbm" path="/organization/{organizationId}/project/{projectId}/projectAccess" method="post" %}
[v2\_7.yaml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-a0835f006f08c9cf0115fe717f9c0da99ac9cfda%2Fv2_7.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/SRDoGWJ2keFnStreqMbm" path="/organization/{organizationId}/project/{projectId}/projectAccess/{projectAccessId}" method="get" %}
[v2\_7.yaml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-a0835f006f08c9cf0115fe717f9c0da99ac9cfda%2Fv2_7.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/SRDoGWJ2keFnStreqMbm" path="/organization/{organizationId}/project/{projectId}/projectAccess/{projectAccessId}" method="patch" %}
[v2\_7.yaml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-a0835f006f08c9cf0115fe717f9c0da99ac9cfda%2Fv2_7.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/SRDoGWJ2keFnStreqMbm" path="/organization/{organizationId}/project/{projectId}/projectAccess/{projectAccessId}" method="delete" %}
[v2\_7.yaml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-a0835f006f08c9cf0115fe717f9c0da99ac9cfda%2Fv2_7.yaml?alt=media)
{% endopenapi %}

{% hint style="info" %}
For a complete list of organization operation please visit the [OpenAPI specification](https://github.com/AzBuilder/terrakube-server/tree/main/openapi-spec)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.terrakube.io/api/methods/project-access.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
