# Create a claim link

`POST /api/agent/signup`

With the person's permission, create a signup handoff. No tokens or email are issued. The person signs in with the supplied email, accepts terms and enters a card. Claims expire after 24 hours with 5 failed attempts. Signup limits: 20/IP/hour and 3/email/hour. Email is trimmed and lowercased; locally blocked temporary domains are rejected. Body limit: 4,096 bytes.

## Authentication

Public endpoint. No credentials or cookies required.

## Request body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "plan": {
      "default": "ink",
      "type": "string",
      "enum": [
        "ink",
        "ink_pro"
      ]
    },
    "interval": {
      "default": "monthly",
      "type": "string",
      "enum": [
        "monthly",
        "annual"
      ]
    },
    "agent": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[^\\p{Cc}\\p{Cf}]+$"
        },
        "url": {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "pattern": "^[^\\p{Cc}\\p{Cf}]+$"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}
```

## Responses

### HTTP 201

Claim handoff. Existing and new emails receive the same shape.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "claim_code",
          "claim_url",
          "expires_at",
          "next_steps"
        ],
        "properties": {
          "claim_code": {
            "type": "string"
          },
          "claim_url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "next_steps": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 400

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 413

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 415

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 429

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "headers": {
    "Retry-After": {
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 503

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```
