Skip to content

AI​

AI-powered content tools


Enhance text​

POST
/ai/enhance-text

Rewrite or generate one campaign field with an LLM. Requires a bearer session and is gated by the features.ai_text_enhancement flag. Throughput is capped per user (10 requests per minute by default).
context.field selects the system prompt and must be one of summary, story or milestone; any other value falls back to the summary prompt. text is capped at the server's maximum length.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"action": "string",
"text": "string",
"context": {
"field": "string",
"title": "string",
"category": "string",
"goalAmount": 0,
"beneficiaryName": "string",
"milestoneTitle": "string",
"milestoneAmount": 0
}
}

Responses​

Enhanced text

application/json
JSON
{
"enhancedText": "string"
}

Playground​

Server
Authorization
Body

Samples​


Campaign AI chat​

POST
/ai/campaign-chat

Conversational assistant for the campaign-creation wizard. Requires a
bearer session; throughput is capped per user (10 requests per minute
by default).

The response is a Server-Sent Events stream (text/event-stream),
not a JSON document. Each event carries one JSON object:

  • {"type":"token","content":"…"} — one streamed text token
  • {"type":"campaign_data","data":{…}} — campaign fields the model extracted
  • {"type":"done"} — stream complete
  • {"type":"error","message":"…"} — the stream failed mid-flight

Only the most recent 30 messages of messages are sent to the model.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"messages": [
{
"role": "string",
"content": "string"
}
],
"extractedData": {
"additionalProperties": "string"
}
}

Responses​

Server-Sent Events stream of tokens and extracted campaign data.

text/event-stream
JSON
"string"

Playground​

Server
Authorization
Body

Samples​


Detect category​

POST
/ai/detect-category

Classifies a campaign into one of the platform's categories. Requires a bearer session; throughput is capped per user (10 requests per minute by default).
Send any combination of title, summary and description — they are joined, truncated to 500 characters and classified. At least one must be present and the joined text must be 3 characters or longer.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"title": "string",
"summary": "string",
"description": "string"
}

Responses​

Detected category

application/json
JSON
{
"categoryName": "string"
}

Playground​

Server
Authorization
Body

Samples​


Generate a project update​

POST
/ai/generate-update

Writes or rewrites a campaign update's text with an LLM. Requires a bearer session and is gated by the features.ai_update_generation flag. Throughput is capped per user inside the handler (10 requests per minute by default).
context.fundraiserTitle is required. Up to three context.previousUpdates are folded into the prompt for generate and improve.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"action": "string",
"text": "string",
"context": {
"fundraiserTitle": "string",
"fundraiserId": "string",
"milestoneTitle": "string",
"previousUpdates": [
"string"
]
}
}

Responses​

Generated text

application/json
JSON
{
"enhancedText": "string"
}

Playground​

Server
Authorization
Body

Samples​


Import a campaign from a URL​

POST
/ai/scrape-campaign-url

Reads a campaign page on another platform and extracts its fields with an LLM, for the "import from link" step of the campaign builder. Requires a bearer session; throughput is capped per user inside the handler (10 requests per minute by default).
The response carries a one-time scrape_token, valid for 30 minutes; pass it on POST /fundraisers when creating the imported campaign. When the LLM is not configured, only the page title is returned, with a note and no token.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"url": "string"
}

Responses​

Extracted campaign fields

application/json
JSON
{
"success": true,
"data": {
"title": "string",
"summary": "string",
"story": "string",
"goalAmount": 0,
"categoryName": "string",
"beneficiaryName": "string",
"location": "string",
"type": "string",
"isProject": true,
"coverImage": "string",
"galleryImages": [
"string"
],
"additionalProperties": "string"
},
"platform": "string",
"scrape_token": "string",
"note": "string"
}

Playground​

Server
Authorization
Body

Samples​


Powered by VitePress OpenAPI

Built with VitePress