> ## Documentation Index
> Fetch the complete documentation index at: https://metacognition-fdc534de-master.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign up

> Create an org and receive the first API key.

Creates a new organization, a default user, and the first API key. The plaintext API key appears in the response **once**.

## Body

```json theme={null}
{
  "org_id": "acme",          // optional; auto-generated when omitted
  "name":   "acme corp"      // optional; label for the first key
}
```

<ParamField body="org_id" type="string">
  Optional org id. If omitted, the server generates `org_<10-char base62>`. Must be alphanumeric, with `-` or `_` allowed, and at most 64 chars. Returns `409 Conflict` if the id already exists.
</ParamField>

<ParamField body="name" type="string">
  Human-readable label for the org's first API key. Optional, max 64 chars.
</ParamField>

## Response — `201`

<ResponseField name="org_id" type="string">
  Server-generated org id. Format `org_<10 chars>`.
</ResponseField>

<ResponseField name="user_id" type="string">
  Server-generated user id inside that org.
</ResponseField>

<ResponseField name="api_key" type="string">
  The plaintext API key. **Save it now. It cannot be recovered later.**
</ResponseField>

<ResponseField name="key" type="object">
  Metadata about the key (id, prefix, display\_id, name, scopes, timestamps).
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.getmetacognition.com/signup \
    -H 'content-type: application/json' \
    -d '{"name": "acme corp"}'
  ```

  ```python Python theme={null}
  import httpx

  resp = httpx.post(
      "https://api.getmetacognition.com/signup",
      json={"name": "acme corp"},
  )
  data = resp.json()
  api_key = data["api_key"]   # store this securely
  ```
</CodeGroup>

```json Response theme={null}
{
  "org_id": "org_79d0fHwDRhoZ8Ww7",
  "user_id": "user_FuHtj0C14AaKHJq1",
  "api_key": "tex_live_LfbRIlFWtazFQaLw2C05IBTuoKX0B-sLFZ5XOHmkSJ8",
  "key": {
    "id": "a1247653-9646-4f32-b04f-72d2c0f5355b",
    "prefix": "tex_live_",
    "display_id": "LfbRIlFW",
    "name": "acme corp",
    "scopes": ["*"],
    "is_active": true,
    "created_at": "2026-05-08T09:56:42.855738",
    "last_used_at": null,
    "revoked_at": null
  }
}
```

<Warning>
  The `api_key` field appears only in this response. Store it server-side. We cannot recover or re-display it.
</Warning>

<Note>
  This endpoint is unauthenticated by design. Anyone can create an org. For a private launch, put your existing auth provider in front and only forward to `/signup` after your checks pass.
</Note>

## Errors

| Status                     | When                                                                           |
| -------------------------- | ------------------------------------------------------------------------------ |
| `409 Conflict`             | The `org_id` you supplied is already in use, or hash collision on key minting. |
| `422 Unprocessable Entity` | `org_id` failed the alphanumeric / length validation.                          |
