# Start agent access: a new owner creates an account with a configured sign-in method and no card; an existing owner signs in and allows the agent; never reveals whether the email has an account

`POST` `/api/v1/signup`

`startSignup`

Relay for_person unchanged alongside signup_url. It explains the no-card free start and selected plan's later renewal, or existing-owner sign-in and explicit Allow. If a price cannot be read, it tells the person to check the page rather than inventing a quote. Keep claim_code private. Who can call it: No sign-in needed.

**Scopes:** None. Public.

Relay for_person unchanged alongside signup_url; it ends with user_code. The person either creates an account with a configured sign-in method and no card, or signs in, types user_code and explicitly allows this agent. New, pending and existing emails get the same response, with a fresh link, code and claim code each time. Keep claim_code private; user_code isn't a secret like it, but only the agent that started the link shows it, to its own person. These placeholders cannot create an account.

**Parameters**

None.

**JSON body**

| Field | Required | Type and constraints | Description |
| --- | --- | --- | --- |
| `email` | Yes | `string`; format: `"email"`; pattern: `"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"`; maxLength: `254` | Kept for sign-in, receipts and account recovery. Surrounding whitespace is trimmed before validation. |
| `time_zone` | No | `string` | An IANA time zone, for example Europe/London or Asia/Tokyo. Best-times research, waking hours and heatmap cells use this local clock. Defaults to America/Los_Angeles when omitted at sign-up. |
| `plan` | No | `string`; enum: `["monthly","yearly","founding"]` | Optional plan preference, not a subscription. When omitted, the reply has plan: null; Checkout defaults to monthly unless another plan is chosen there. |
| `invite` | No | `string`; maxLength: `64` | The signup_id from a waitlist invite link (#invite=…). |
| `workspace_name` | No | `string`; maxLength: `80` | Optional plain-text name for a new workspace (default Personal). Surrounding whitespace is trimmed. Existing-owner Allow never renames their workspace; the ready claim says when this name was not applied. |
| `agent_name` | No | `string`; maxLength: `80` | Who started it, like "Claude Code". The sign-up page shows the person this name, as the name the agent gave itself, and sends them back to it when sign-up finishes. It also names the token the claim returns. |
| `found_via` | No | `string` | Optional: where the agent found the product, as a short description. This is self-reported, separate from a measured directory tag. |
| `oauth_authorization` | No | `string` | Optional pending OAuth authorization query when sign-up starts from a connector. Used transiently to identify the connecting app; never stored. |
| `referrer` | No | `string`; maxLength: `2000` | The page that sent them here; only its host is kept. |
| `landing_path` | No | `string`; maxLength: `500` |  |
| `utm_source` | No | `string`; maxLength: `500` |  |
| `utm_medium` | No | `string`; maxLength: `500` |  |
| `utm_campaign` | No | `string`; maxLength: `500` |  |
| `utm_content` | No | `string`; maxLength: `500` |  |
| `utm_term` | No | `string`; maxLength: `500` |  |

**Request example**

```http
POST https://app.flaghand.com/api/v1/signup
Content-Type: application/json

{
  "email": "alex@example.test",
  "plan": "monthly",
  "time_zone": "Europe/London",
  "agent_name": "Drafting assistant",
  "workspace_name": "My workspace",
  "found_via": "guide",
  "landing_path": "/start"
}
```

**Response example**

```json
{
  "signup_url": "https://app.flaghand.com/start#signup=sup_SYNTHETIC_DO_NOT_USE",
  "for_person": "Open this Flaghand sign-up link to create your account with a passkey and no card, or sign in and allow this agent to use a workspace you own, then return here. New workspaces have 7 days to draft free; add a card at first approval or to keep drafting after day 7 for $19 a month, renewing automatically until you cancel in Billing at https://app.flaghand.com/billing; Checkout shows the first-charge date. If you already have an account, type this code from your agent before you allow it: K7QM-2XRT. Never type a code from anyone else.",
  "user_code": "K7QM-2XRT",
  "claim_code": "claim_SYNTHETIC_DO_NOT_USE",
  "email": "alex@example.test",
  "plan": "monthly",
  "plan_note": "A plan preference was saved, not a subscription; the person confirms the current terms in Checkout.",
  "expires_at": "2026-10-26T16:00:00Z"
}
```

Success: HTTP 201. Content-Type: application/json.

**Errors:** `invalid_request` (400), `internal` (500), `invalid_json` (400), `signup_closed` (403). See the [error codes](https://app.flaghand.com/docs/errors.md) for meanings and the shared default error response. Other domain errors from that catalog may apply; the response's code and message are authoritative.

**CLI:** `flaghand sign-up start-signup`

```sh
flaghand sign-up start-signup -d '{"email":"alex@example.test","plan":"monthly","time_zone":"Europe/London","agent_name":"Drafting assistant","workspace_name":"My workspace","found_via":"guide","landing_path":"/start"}' --json
```

**MCP tool:** `startSignup` (also reachable through `callWriteOperation`; use `getOperation` to load its full schema).

```json
{
  "name": "callWriteOperation",
  "arguments": {
    "operation_id": "startSignup",
    "arguments": {
      "email": "alex@example.test",
      "plan": "monthly",
      "time_zone": "Europe/London",
      "agent_name": "Drafting assistant",
      "workspace_name": "My workspace",
      "found_via": "guide",
      "landing_path": "/start"
    }
  }
}
```

Base URL: `https://app.flaghand.com/api/v1`. Part of the [API reference](https://app.flaghand.com/docs/api.md); every error code is in [errors](https://app.flaghand.com/docs/errors.md).
