> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fullstackplus.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fullstackplus.ai/_mcp/server.

# Send a prompt to a project (project API key)

POST https://api.fullstackplus.ai/api/v1/projects/{projectId}/prompts
Content-Type: application/json

Queues a prompt exactly as if the key's creator typed it in the app. Needs a PROJECT key (Project settings → API), which only works on its own project. Returns at once with the prompt's id; poll its URL for the reply. Prompts from one key continue one conversation unless `freshSession` is true. Paid tools cannot be run this way.

A run may pause to ask a question (status `paused_for_question`); it then holds the project's queue until it is answered with the prompt's `/answer` call or cancelled. An unattended caller should send `questions: "never"`, which tells the run to state its assumptions and carry on instead of asking. `callbackUrl` is POSTed the prompt's view (plus `event`) when it pauses or finishes, so there is no need to poll; the callback carries no secret, so confirm anything that matters with a GET on the prompt.

Reference: https://docs.fullstackplus.ai/api-reference/send-a-prompt-to-a-project-project-api-key

## Authentication

- `X-API-Key` header (required) — Create one in the app under **Settings → API keys**. It is shown once and stored only as a hash, so it cannot be recovered — losing it means issuing a new one. A key reads the endpoints below and nothing else. It is not a session: it cannot create or delete projects, change settings, or issue another API key. It sees exactly what its owner sees, re-checked on every request, so removing someone's access to a project removes it from their key on the very next call.
- `Authorization` header (bearer token, required) — The same key, sent as `Authorization: Bearer <key>`.

## Request

### Path parameters

- `projectId` (integer, required)

### Body (application/json)

This endpoint expects an object.

- `prompt` (string, required)
- `callbackUrl` (string, optional) — Public https URL to POST when the prompt pauses on a question or finishes (events: paused_for_question, completed, error, cancelled).
- `freshSession` (boolean, optional, default: false) — Start a new conversation instead of continuing this key's.
- `questions` (enum, optional, default: ask) — `never`: the run must not ask; it states assumptions instead.
  - Allowed values: `ask`, `never`

## Response

### 202

Queued.

- `createdAt` (string, optional)
- `error` (string, optional, nullable)
- `finishedAt` (string, optional, nullable)
- `id` (integer, optional)
- `position` (integer, optional) — Prompts ahead of this one, while queued.
- `prompt` (string, optional)
- `question` (Question, optional, nullable) — Present while status is paused_for_question.
- `response` (string, optional) — The reply, once it has started.
- `startedAt` (string, optional, nullable)
- `status` (enum, optional)
  - Allowed values: `queued`, `running`, `completed`, `error`, `cancelled`, `paused_for_question`
- `summary` (string, optional)
- `url` (string, optional) — Returned on POST: where to poll.

## Errors

### 400 Bad Request Error

Missing or too-long prompt, bad `questions` value, or a callbackUrl that is not public https.

- `any`

### 401 Unauthorized Error

Key problem.

- `any`

### 402 Payment Required Error

The project's plan does not include prompting.

- `any`

### 403 Forbidden Error

Not a project key, a different project's key, or access removed.

- `any`

### 409 Conflict Error

Project disabled, or no Claude account connected.

- `any`

### 422 Unprocessable Entity Error

Asked for a paid tool; use the app.

- `any`

### 429 Too Many Requests Error

This key already has 5 prompts waiting.

- `any`

## Types

### Question

What a paused prompt is waiting to be told. Answer it with the prompt's `/answer` call.

- `id` (string, optional) — Quote this as `questionId` when answering.
- `questions` (list of QuestionQuestionsItems, optional)

### QuestionQuestionsItems

- `header` (string, optional) — A short label, e.g. "Hosting".
- `multiSelect` (boolean, optional) — More than one option may be chosen.
- `options` (list of QuestionQuestionsItemsOptionsItems, optional) — Suggested answers; free text is also accepted.
- `question` (string, optional)

### QuestionQuestionsItemsOptionsItems

- `description` (string, optional)
- `label` (string, optional)

## Examples

**Request**

```json
{
  "prompt": "string"
}
```

**Response**

```json
{
  "createdAt": "string",
  "error": "string",
  "finishedAt": "string",
  "id": 1,
  "position": 1,
  "prompt": "string",
  "question": {
    "id": "string",
    "questions": [
      {
        "header": "string",
        "multiSelect": true,
        "options": [
          {
            "description": "string",
            "label": "string"
          }
        ],
        "question": "string"
      }
    ]
  },
  "response": "string",
  "startedAt": "string",
  "status": "queued",
  "summary": "string",
  "url": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.fullstackplus.ai/api/v1/projects/1/prompts"

payload = { "prompt": "string" }
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.fullstackplus.ai/api/v1/projects/1/prompts';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"prompt":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fullstackplus.ai/api/v1/projects/1/prompts"

	payload := strings.NewReader("{\n  \"prompt\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.fullstackplus.ai/api/v1/projects/1/prompts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.fullstackplus.ai/api/v1/projects/1/prompts")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fullstackplus.ai/api/v1/projects/1/prompts', [
  'body' => '{
  "prompt": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.fullstackplus.ai/api/v1/projects/1/prompts");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["prompt": "string"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fullstackplus.ai/api/v1/projects/1/prompts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```