---
title: "Projects"
description: "Learn what an Agentpost project is, when to make a new one, how it adopts the services it uses, where its email comes from, and how long it lasts."
url: "https://agentpost.tools/docs/platform/concepts/projects"
kind: concept
---

# Projects

A project is one product built on Agentpost. It belongs to one [workspace](/docs/platform/concepts/workspaces.md), counts against the workspace’s [project limit](/docs/platform/concepts/workspaces.md#limits), and holds the services it adopted, its keys, and the address its email comes from. Its name is 1 to 120 characters, and its ID starts with `prj_`.

Make one project for each product. Two products in one project would share their principals, data, and keys; one product split across projects can’t share them. Every project has two [environments](/docs/platform/concepts/environments.md), `dev` and `prd`, from the start.

## Adopting a service

A project uses a service once it adopts it, with `POST /v1/projects/{id}/services`. The service then answers at its own path under `https://api.agentpost.tools`, such as `/v1/identity`, for the project’s keys, in both environments. A call to a service the project hasn’t adopted answers [`not_found`](/docs/errors.md#not_found). Adopting a service twice changes nothing. [Create a project and issue a key](/docs/platform/guides/keys.md) adopts one.

Adopting a service writes its full starting config in both environments. The service’s config operation replaces the whole config; its reference says which fields may be left out, such as secrets the config doesn’t show.

Adopting services together also starts the connections their docs describe, such as [automatic access history](/docs/identityhound/concepts/change-feed.md#event-history). Agentpost runs these connections for your project in each environment, including while your app is offline.

## Keys

A project’s server calls its services with a [secret key](/docs/platform/concepts/secret-keys.md), and its browser or native app code starts a sign-in with a [publishable key](/docs/platform/concepts/publishable-keys.md). Each key belongs to one project and one environment. A [workspace key](/docs/platform/concepts/workspace-keys.md) also reaches the project, read-only: it reads every project of its workspace that adopted the service its permissions read, one project per request.

## Email

A project’s email, such as sign-in codes, codes to add an email address, and invitations, comes from a domain it verified. Until one verifies, email to a real address isn’t sent: the request that would send it, such as asking for a sign-in code, answers as it always does, and no error says the email didn’t go. The [test inbox](/docs/platform/concepts/environments.md#test-inbox) holds email for tests. [Set up a sending domain](/docs/platform/guides/sending-domain.md) before the project emails real addresses.

A domain belongs to the first workspace that adds it; if verification fails and no project uses it as its sender, another workspace may add it. [Remove the sending domain](/docs/platform/reference/sending-domain.md#remove-the-sending-domain) stops the project’s email until another domain verifies.

## Lifetime

Only a workspace owner deletes a project. Deleting a project revokes its keys at once, gives its place back to the workspace’s limit, and can’t be undone. Agentpost tries to revoke its connected accounts’ tokens at their providers, then removes its service records in both environments even if a provider refused. The API waits up to 5 seconds for cleanup. If it answers with `recordsRemoved: false`, cleanup continues in the background or on the hourly sweep.

## Where to act on it

-   [Create a project and issue a key](/docs/platform/guides/keys.md) creates a project and adopts a service, and [Set up a sending domain](/docs/platform/guides/sending-domain.md) verifies the domain its email comes from.
-   [Delete a project](/docs/platform/reference/projects.md#delete-a-project) has the confirmation that deleting takes.
-   The [projects reference](/docs/platform/reference/projects.md) has every field.
