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. The examples send the first credential the route takes; Credentials 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:viewin the project’s workspace. - Credential: the examples send your API key,
agp_ak_apoa_…, asAuthorization: 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 array |
Always |
Errors
forbidden(403)
Any operation can also answer with the codes Conventions lists.
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:createin the project’s workspace. - Credential: the examples send your API key,
agp_ak_apoa_…, asAuthorization: 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 |
Always |
Errors
forbidden(403)quota_exceeded(403)
Any operation can also answer with the codes Conventions lists.
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:viewin the project’s workspace. - Credential: the examples send your API key,
agp_ak_apoa_…, asAuthorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | A project ID, prj_…. The id of a Project. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
project |
Project |
Always |
Errors
Any operation can also answer with the codes Conventions lists.
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:updatein the project’s workspace. - Credential: the examples send your API key,
agp_ak_apoa_…, asAuthorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | A project ID, prj_…. The id of a Project. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | 1–120 characters. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
project |
Project |
Always |
Errors
Any operation can also answer with the codes Conventions lists.
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:deletein the project’s workspace. Only an owner holds it. - Credential: the examples send your API key,
agp_ak_apoa_…, asAuthorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | A project ID, prj_…. The id of a Project. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
confirm |
string |
Yes | The project’s name. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
project |
Project |
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(400)forbidden(403)not_found(404)
Any operation can also answer with the codes Conventions lists.
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:adoptin the project’s workspace. - Credential: the examples send your API key,
agp_ak_apoa_…, asAuthorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | A project ID, prj_…. The id of a Project. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
service |
string |
Yes | Such as identityhound. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
project |
Project |
Always | |
adopted |
boolean |
Always | False when the project had already adopted it. |
Errors
Any operation can also answer with the codes Conventions lists.
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. |
string |
Always | |
sender. |
string |
Always | |
createdAt |
string |
Always | An ISO 8601 date and time. |
deletedAt |
string |
When set | An ISO 8601 date and time. |