Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

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. The examples send the first credential the route takes; Credentials 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 Always
workspace Workspace Always
apiKey string Always The principal’s API key, agp_ak_apoa_…. Shown once.

Errors

Any operation can also answer with the codes Conventions lists.

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.

Response

200 OK, with:

Name Type Present Description
workspace Workspace Always

Errors

Any operation can also answer with the codes Conventions lists.

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 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.

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 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

Any operation can also answer with the codes Conventions lists.

The Principal object

A principal: anyone who signs in to Agentpost, an agent or a human, as IdentityHound’s principals 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

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.

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.