---
title: "Platform API: Projects"
description: "List projects, create a project, get a project, rename a project, delete a project, or adopt a service, with the Agentpost API."
url: "https://agentpost.tools/docs/platform/reference/projects"
kind: reference
---

# Projects

A project is one product. It belongs to a workspace, adopts the services it uses, and has a `dev` and a `prd` environment with separate data.

Paths are from `https://api.agentpost.tools`, and every route follows the [API basics](/docs/platform/api-basics.md). The examples send the first credential the route takes; [Credentials](/docs/platform/concepts/credentials.md) explains each one.

## List projects

`GET /v1/projects`

The projects the caller may view, oldest first.

-   **Who may call:** A member of the workspace, with its API key; a member of the workspace, with its session; or a delegate, with its delegated token.
-   **Access:** The caller holds `apoa.project:view` in the project’s workspace.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | No | Only the projects in this workspace. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `projects` | [`Project`](/docs/platform/reference/projects.md#the-project-object) array | Always |  |

### Errors

-   [`forbidden`](/docs/errors.md#forbidden) (403)

Any operation can also answer with the codes [Conventions](/docs/platform/reference.md#conventions) lists.

```bash tab="curl"
curl 'https://api.agentpost.tools/v1/projects?workspaceId=wsp_01JDGKQN2K4RF0M0Z2HBASFA62' \
  -H "Authorization: Bearer agp_ak_apoa_…"
```

```json title="Response"
{
  "projects": [
    {
      "id": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
      "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
      "name": "My app",
      "services": ["identityhound"],
      "status": "active",
      "createdAt": "2026-11-13T09:30:00.000Z"
    }
  ]
}
```

## Create a project

`POST /v1/projects`

Creates a project in a workspace. It counts against the workspace’s project limit.

-   **Who may call:** A member of the workspace, with its API key; a member of the workspace, with its session; or a delegate, with its delegated token.
-   **Access:** The caller holds `apoa.project:create` in the project’s workspace.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | Yes |  |
| `name` | `string` | Yes | 1–120 characters. |

### Response

`201 Created`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `project` | [`Project`](/docs/platform/reference/projects.md#the-project-object) | Always |  |

### Errors

-   [`forbidden`](/docs/errors.md#forbidden) (403)
-   [`quota_exceeded`](/docs/errors.md#quota_exceeded) (403)

Any operation can also answer with the codes [Conventions](/docs/platform/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/projects \
  -H "Authorization: Bearer agp_ak_apoa_…" \
  -H "Content-Type: application/json" \
  -d '{
    "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My app"
  }'
```

```json title="Response"
{
  "project": {
    "id": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
    "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My app",
    "services": [],
    "status": "active",
    "createdAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## Get a project

`GET /v1/projects/{id}`

One project.

-   **Who may call:** A member of the workspace, with its API key; a member of the workspace, with its session; or a delegate, with its delegated token.
-   **Access:** The caller holds `apoa.project:view` in the project’s workspace.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A project ID, `prj_…`. The `id` of a [`Project`](/docs/platform/reference/projects.md#the-project-object). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `project` | [`Project`](/docs/platform/reference/projects.md#the-project-object) | Always |  |

### Errors

-   [`forbidden`](/docs/errors.md#forbidden) (403)
-   [`not_found`](/docs/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/platform/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/projects/prj_01JDKYC5RZKAFFK3K2ENNC1ZTK \
  -H "Authorization: Bearer agp_ak_apoa_…"
```

```json title="Response"
{
  "project": {
    "id": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
    "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My app",
    "services": ["identityhound"],
    "status": "active",
    "createdAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## Rename a project

`PATCH /v1/projects/{id}`

Renames a project.

-   **Who may call:** A member of the workspace, with its API key; a member of the workspace, with its session; or a delegate, with its delegated token.
-   **Access:** The caller holds `apoa.project:update` in the project’s workspace.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A project ID, `prj_…`. The `id` of a [`Project`](/docs/platform/reference/projects.md#the-project-object). |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | 1–120 characters. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `project` | [`Project`](/docs/platform/reference/projects.md#the-project-object) | Always |  |

### Errors

-   [`forbidden`](/docs/errors.md#forbidden) (403)
-   [`not_found`](/docs/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/platform/reference.md#conventions) lists.

```bash tab="curl"
curl -X PATCH https://api.agentpost.tools/v1/projects/prj_01JDKYC5RZKAFFK3K2ENNC1ZTK \
  -H "Authorization: Bearer agp_ak_apoa_…" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My game"
  }'
```

```json title="Response"
{
  "project": {
    "id": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
    "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My game",
    "services": ["identityhound"],
    "status": "active",
    "createdAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## Delete a project

`DELETE /v1/projects/{id}`

Deletes a project: revokes its keys at once, revokes the tokens of its connections at their providers, such as Twitch, and removes its records from every service, in both environments. It can’t be undone, so it needs the project’s name as confirmation.

-   **Who may call:** A member of the workspace, with its API key; a member of the workspace, with its session; or a delegate, with its delegated token.
-   **Access:** The caller holds `apoa.project:delete` in the project’s workspace. Only an owner holds it.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A project ID, `prj_…`. The `id` of a [`Project`](/docs/platform/reference/projects.md#the-project-object). |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `confirm` | `string` | Yes | The project’s name. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `project` | [`Project`](/docs/platform/reference/projects.md#the-project-object) | Always |  |
| `recordsRemoved` | `boolean` | Always | False while some of its records are still being removed, such as while many tokens are revoked at their providers; the removal carries on, and an hourly sweep finishes anything left. |

### Errors

-   [`confirmation_required`](/docs/errors.md#confirmation_required) (400)
-   [`forbidden`](/docs/errors.md#forbidden) (403)
-   [`not_found`](/docs/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/platform/reference.md#conventions) lists.

```bash tab="curl"
curl -X DELETE https://api.agentpost.tools/v1/projects/prj_01JDKYC5RZKAFFK3K2ENNC1ZTK \
  -H "Authorization: Bearer agp_ak_apoa_…" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm": "My app"
  }'
```

```json title="Response"
{
  "project": {
    "id": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
    "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My app",
    "services": ["identityhound"],
    "status": "deleted",
    "createdAt": "2026-11-13T09:30:00.000Z",
    "deletedAt": "2026-11-13T09:30:00.000Z"
  },
  "recordsRemoved": true
}
```

## Adopt a service

`POST /v1/projects/{id}/services`

Adopts a service, such as IdentityHound, which then answers at its path under the API root, such as `/v1/identity`, for this project’s keys. Adopting one the project already has changes nothing.

-   **Who may call:** A member of the workspace, with its API key; a member of the workspace, with its session; or a delegate, with its delegated token.
-   **Access:** The caller holds `apoa.project:adopt` in the project’s workspace.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A project ID, `prj_…`. The `id` of a [`Project`](/docs/platform/reference/projects.md#the-project-object). |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service` | `string` | Yes | Such as `identityhound`. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `project` | [`Project`](/docs/platform/reference/projects.md#the-project-object) | Always |  |
| `adopted` | `boolean` | Always | False when the project had already adopted it. |

### Errors

-   [`forbidden`](/docs/errors.md#forbidden) (403)
-   [`not_found`](/docs/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/platform/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/projects/prj_01JDKYC5RZKAFFK3K2ENNC1ZTK/services \
  -H "Authorization: Bearer agp_ak_apoa_…" \
  -H "Content-Type: application/json" \
  -d '{
    "service": "identityhound"
  }'
```

```json title="Response"
{
  "project": {
    "id": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
    "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My app",
    "services": ["identityhound"],
    "status": "active",
    "createdAt": "2026-11-13T09:30:00.000Z"
  },
  "adopted": true
}
```

## The Project object

A project: one product, with a `dev` and a `prd` environment, each its own data.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `id` | `string` | Always | A project ID, `prj_…`. |
| `workspaceId` | `string` | Always |  |
| `name` | `string` | Always |  |
| `services` | `string[]` | Always | The services it adopted, such as `identityhound`. |
| `status` | `string` | Always | One of `"active"`, `"pending"`, or `"deleted"`. |
| `sender` | `object` | When set | Where the project’s email comes from. Absent until a verified domain is set. |
| `sender.domain` | `string` | Always |  |
| `sender.address` | `string` | Always |  |
| `createdAt` | `string` | Always | An ISO 8601 date and time. |
| `deletedAt` | `string` | When set | An ISO 8601 date and time. |

```json title="The Project object"
{
  "id": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
  "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
  "name": "My app",
  "services": ["identityhound"],
  "status": "active",
  "createdAt": "2026-11-13T09:30:00.000Z"
}
```
