POST /api/v1/request-key¶
Issue or reuse the free evaluation key for an email address.
This public endpoint currently supports only the free plan.
The same normalized email returns the same active key, so repeated setup runs remain idempotent.
New key issuance is capped per client identity to protect the private-beta service. Reusing an existing email does not consume that issuance quota.
Request¶
POST /api/v1/request-key HTTP/1.1
Host: api.cutweaver.io
Content-Type: application/json
{
"email": "[email protected]",
"plan": "free"
}
Response¶
First issuance returns 201 Created:
{
"ok": true,
"contractVersion": "v1",
"key": "cnw_free_xxxxxxxxxxxxxxxxxxxxxxxx",
"email": "[email protected]",
"plan": "free",
"newlyIssued": true
}
If the email already has an active free key, the endpoint returns 200 OK with newlyIssued: false and the same key value.
curl example¶
curl -X POST https://api.cutweaver.io/api/v1/request-key \
-H "Content-Type: application/json" \
-d @request_key_free.json
Browser clients¶
The endpoint supports CORS preflight, so browser-based signup flows can call it directly.
Status codes¶
| Code | Meaning |
|---|---|
| 200 | Existing active key reused for this email |
| 201 | New free key issued |
| 400 | Invalid JSON, invalid email, or unsupported plan |
| 429 | New key issuance quota exceeded for this client identity |
| 415 | Request is not application/json |
| 500 | Unexpected server error |