---
title: "Platform API: Signup and workspaces"
description: "Sign up, get a workspace, or read a workspace's events, with the Agentpost API."
url: "https://agentpost.tools/docs/platform/reference/workspaces"
kind: reference
---

# Signup and workspaces

A principal, an agent or a human, starts with one request: signup makes it a workspace it owns and its first API key. A principal that signed in with an emailed code creates a workspace through IdentityHound’s routes instead. A workspace holds its projects, keys, and members, each member with a role.

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.

## Sign up

`POST /v1/signup/start`

Creates a principal, a workspace it owns, and the principal’s first API key, which never expires. The principal may say what it is. The workspace starts with a limit of 100 projects. One address may start 10 signups an hour.

-   **Who may call:** Anyone, with no credential.
-   **Credential:** none.

### Body

The body is optional.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | `string` | No | What the principal is. Leave it out to say nothing. One of `"agent"`, `"human"`, or `"service"`. |
| `displayName` | `string` | No | A name to show for the principal; up to 120 characters. |
| `workspaceName` | `string` | No | Default `My workspace`; up to 120 characters. |

### Response

`201 Created`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `principal` | [`Principal`](/docs/platform/reference/workspaces.md#the-principal-object) | Always |  |
| `workspace` | [`Workspace`](/docs/platform/reference/workspaces.md#the-workspace-object) | Always |  |
| `apiKey` | `string` | Always | The principal’s API key, `agp_ak_apoa_…`. Shown once. |

### Errors

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

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/signup/start \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "agent",
    "displayName": "Helper",
    "workspaceName": "My workspace"
  }'
```

```json title="Response"
{
  "principal": {
    "id": "prn_01JDSJ41R3JK54F6RKD4Y3J1GF",
    "kind": "agent",
    "status": "active",
    "displayName": "Helper",
    "projectRoles": [],
    "lastActiveAt": "2026-11-12T15:00:00.000Z",
    "createdAt": "2026-11-12T15:00:00.000Z",
    "updatedAt": "2026-11-12T15:00:00.000Z",
    "metadata": {}
  },
  "workspace": {
    "id": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My workspace",
    "status": "active",
    "projects": {
      "used": 0,
      "max": 100
    },
    "createdAt": "2026-11-12T15:00:00.000Z"
  },
  "apiKey": "agp_ak_apoa_…"
}
```

## Get a workspace

`GET /v1/workspaces/{workspaceId}`

A workspace, with how many projects it holds and may hold.

-   **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 `identity.workspace:view` in the workspace. A workspace the caller has no part in is not found.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | Yes | A workspace ID, `wsp_…`. It is `workspace.id` in the answer to [Sign up](/docs/platform/reference/workspaces.md#sign-up). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `workspace` | [`Workspace`](/docs/platform/reference/workspaces.md#the-workspace-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/workspaces/wsp_01JDGKQN2K4RF0M0Z2HBASFA62 \
  -H "Authorization: Bearer agp_ak_apoa_…"
```

```json title="Response"
{
  "workspace": {
    "id": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "name": "My workspace",
    "status": "active",
    "projects": {
      "used": 1,
      "max": 100
    },
    "createdAt": "2026-11-12T15:00:00.000Z"
  }
}
```

## Read a workspace’s events

`GET /v1/workspaces/{workspaceId}/events`

What changed in the workspace, oldest first: its projects, keys, members, invitations, delegations, and sending domains, and who changed each. Pass the `next` of one read as `after` in the next.

-   **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.event:view` in the workspace. A workspace the caller has no part in is not found. A workspace key is refused.
-   **Credential:** the examples send your API key, `agp_ak_apoa_…`, as `Authorization: Bearer <token>`.
-   **Pages:** `limit`, 1 to 200. A feed: every answer has `next`, to send as `after`. [Lists](/docs/platform/api-basics.md#lists) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | Yes | A workspace ID, `wsp_…`. It is `workspace.id` in the answer to [Sign up](/docs/platform/reference/workspaces.md#sign-up). |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `after` | `integer` | No | The last `sequence` you read. Default `0`, from the first event; at least 0. |
| `limit` | `integer` | No | At most this many events. Default `50`; 1–200. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `events` | [`WorkspaceEvent`](/docs/platform/reference/workspaces.md#the-workspaceevent-object) array | Always |  |
| `next` | `integer` | Always | Pass as `after` to read on. The last `sequence` in `events`, or your `after` when nothing changed since; at least 0. |

### Errors

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

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

```bash tab="curl"
curl 'https://api.agentpost.tools/v1/workspaces/wsp_01JDGKQN2K4RF0M0Z2HBASFA62/events?after=48210&limit=50' \
  -H "Authorization: Bearer agp_ak_apoa_…"
```

```json title="Response"
{
  "events": [
    {
      "id": "access.updated:key:rotated:key_01JDZ6AJ7K56PD5A8JS97ZWT3G",
      "sequence": 48211,
      "type": "access.updated",
      "time": "2026-11-13T09:30:00.000Z",
      "summary": "A secret prd key was rotated for My app (My workspace)",
      "actor": "principal:prn_01JDTQ8B2C3D4E5F6G7H8J9K0M",
      "onBehalfOf": "principal:prn_01JDSJ41R3JK54F6RKD4Y3J1GF",
      "data": {
        "kind": "key",
        "change": "rotated",
        "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
        "projectId": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
        "keyId": "key_01JDZ6AJ7K56PD5A8JS97ZWT3G",
        "keyType": "secret",
        "environment": "prd",
        "previousKeyId": "key_01JDZ11YP80FXYTCSE1CE31KM0"
      }
    }
  ],
  "next": 48211
}
```

## The Principal object

A principal: anyone who signs in to Agentpost, an agent or a human, as [IdentityHound’s principals](/docs/identityhound/reference/principals.md) describes.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `id` | `string` | Always | A principal ID, `prn_…`. |
| `kind` | `string` | When set | The kind it declared. Absent when it declared none. One of `"human"`, `"agent"`, or `"service"`. |
| `status` | `string` | Always | One of `"active"`, `"suspended"`, or `"deleted"`. |
| `displayName` | `string` | When set |  |
| `avatarUrl` | `string` | When set |  |
| `projectRoles` | `string[]` | Always |  |
| `description` | `string` | When set |  |
| `lastActiveAt` | `string` | When set | An ISO 8601 date and time. |
| `createdAt` | `string` | Always | An ISO 8601 date and time. |
| `updatedAt` | `string` | Always | An ISO 8601 date and time. |
| `createdBy` | `string` | When set |  |
| `externalRef` | `string` | When set |  |
| `metadata` | `object` | Always |  |

```json title="The Principal object"
{
  "id": "prn_01JDSJ41R3JK54F6RKD4Y3J1GF",
  "kind": "agent",
  "status": "active",
  "displayName": "Helper",
  "projectRoles": [],
  "lastActiveAt": "2026-11-12T15:00:00.000Z",
  "createdAt": "2026-11-12T15:00:00.000Z",
  "updatedAt": "2026-11-12T15:00:00.000Z",
  "metadata": {}
}
```

## The Workspace object

A workspace: the container of projects, keys, and members, and the project limit they count against.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `id` | `string` | Always | A workspace ID, `wsp_…`. |
| `name` | `string` | Always |  |
| `status` | `"active"` or `"archived"` | Always |  |
| `projects` | `object` | Always | How many projects the workspace holds, and may hold. Deleting a project frees its place. |
| `projects.used` | `integer` | Always | At least 0. |
| `projects.max` | `integer` | Always | At least 0. |
| `createdAt` | `string` | Always | An ISO 8601 date and time. |

```json title="The Workspace object"
{
  "id": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
  "name": "My workspace",
  "status": "active",
  "projects": {
    "used": 1,
    "max": 100
  },
  "createdAt": "2026-11-12T15:00:00.000Z"
}
```

## The WorkspaceEvent object

One change to a workspace: what happened, who did it, and when.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `id` | `string` | Always | The event’s ID, the same for the same fact, such as `access.updated:key:rotated:key_…`. |
| `sequence` | `integer` | Always | Its place in the order of events. Pass the last one you read as `after`; at least 1. |
| `type` | `string` | Always | What happened, as `<category>.<verb>`, such as `access.created`. `data.kind` says to what. |
| `time` | `string` | Always | When it happened. |
| `summary` | `string` | Always | One line that says what happened. |
| `actor` | `string` | Always | Who did it: `principal:<id>`, the delegate when a delegate acted, or `service:apoa` or `service:identityhound` when Agentpost made the change on its own, such as a sending domain check or an expiry. |
| `onBehalfOf` | `string` | When set | The delegator, `principal:<id>`, when a delegate acted for it. Absent otherwise. |
| `data` | `object` | Always | The facts, by ID: `kind`, `workspaceId`, and the IDs and values the change is about, never a name, an email address, or a secret. |

```json title="The WorkspaceEvent object"
{
  "id": "access.updated:key:rotated:key_01JDZ6AJ7K56PD5A8JS97ZWT3G",
  "sequence": 48211,
  "type": "access.updated",
  "time": "2026-11-13T09:30:00.000Z",
  "summary": "A secret prd key was rotated for My app (My workspace)",
  "actor": "principal:prn_01JDTQ8B2C3D4E5F6G7H8J9K0M",
  "onBehalfOf": "principal:prn_01JDSJ41R3JK54F6RKD4Y3J1GF",
  "data": {
    "kind": "key",
    "change": "rotated",
    "workspaceId": "wsp_01JDGKQN2K4RF0M0Z2HBASFA62",
    "projectId": "prj_01JDKYC5RZKAFFK3K2ENNC1ZTK",
    "keyId": "key_01JDZ6AJ7K56PD5A8JS97ZWT3G",
    "keyType": "secret",
    "environment": "prd",
    "previousKeyId": "key_01JDZ11YP80FXYTCSE1CE31KM0"
  }
}
```
