# Request lines Ask the Project Blue team for new lines in an area code. The request goes straight to our team, who provision the lines and reach out to you; this call does not return a line. Once they are live they show up in `/get-lines`. `POST /request-line` ### Request body - `requestedAreaCode` (string, required) — Three-digit US or Canada area code for the new lines, e.g. "512". A number is also accepted. - `quantity` (integer (1–50), required) — How many lines to request in that area code. ### Status codes - **202** — Request sent to the Project Blue team - **400** — requestedAreaCode is not a 3-digit area code, or quantity is not an integer from 1 to 50 - **401** — Missing or invalid API key - **429** — Rate limit exceeded - **500** — Internal server error **Request — cURL** ```bash curl -X POST https://api.tryprojectblue.com/request-line \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "requestedAreaCode": "512", "quantity": 3 }' ``` **Request — cURL · JavaScript** ```javascript // Run on your server. Keep your API key private. const response = await fetch("https://api.tryprojectblue.com/request-line", { method: "POST", headers: { "Authorization": `Bearer ${process.env.PB_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "requestedAreaCode": "512", "quantity": 3 }) }); const data = await response.json(); if (!response.ok) throw new Error(JSON.stringify(data)); console.log(data); ``` **Request — cURL · Python** ```python import os import requests response = requests.request( "POST", "https://api.tryprojectblue.com/request-line", headers={ "Authorization": "Bearer " + os.environ["PB_API_KEY"], "Content-Type": "application/json" }, json={"requestedAreaCode": "512", "quantity": 3}, timeout=30, ) response.raise_for_status() print(response.json()) ``` **Response — 202 Accepted** ```json { "status": "requested", "requestedAreaCode": "512", "quantity": 3 } ``` **Response — 400** ```json { "error": "requestedAreaCode must be a 3-digit US/Canada area code (e.g. "512")" } ```