Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.neariq.io/llms.txt

Use this file to discover all available pages before exploring further.

GET /api/v1/content returns recent generated content history for the caller’s active business. POST /api/v1/content generates a new draft or refines an existing draft for the caller’s active business. Use an API key with the competitors:read scope for history reads. Use an API key with the content:write scope for generation and refinement. This endpoint is available on Growth plans and higher.

Query parameters

NameTypeDefaultNotes
limitinteger20Maximum 100.
typeenumnoneOptional filter: landing_page, faq, gbp_post, social_post, review_response_template, or blog_outline.
presetCategoryenumnoneOptional filter: local_business, product_demo, ecommerce, or professional_services.

Response

{
  "connected": true,
  "businessId": "8a18b4f8-7b6a-4b5d-a4cc-0adcbcfcc8e7",
  "businessName": "Riverside Fitness",
  "count": 1,
  "generations": [
    {
      "id": "f2d4b5cc-1c25-4d87-9e8b-72a6579b9641",
      "type": "faq",
      "presetCategory": "local_business",
      "topic": "membership pricing",
      "content": {},
      "sourceSummary": {},
      "generatedAt": "2026-05-01T00:00:00.000Z",
      "createdAt": "2026-05-01T00:00:00.000Z"
    }
  ]
}

Create or refine content

curl https://app.neariq.io/api/v1/content \
  -X POST \
  -H "X-NearIQ-Key: niq_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "social_post",
    "presetCategory": "professional_services",
    "topic": "spring maintenance checklist",
    "tone": "professional",
    "length": "medium"
  }'

Request body

NameTypeRequiredNotes
typeenumnoDefaults from presetCategory when omitted. Values: landing_page, faq, gbp_post, social_post, review_response_template, blog_outline.
presetCategoryenumnoDefaults to local_business. Values: local_business, product_demo, ecommerce, professional_services.
topicstringnoOptional custom prompt or subject, up to 180 characters.
toneenumnoprofessional, friendly, casual, persuasive, or informative.
lengthenumnoshort, medium, or long.
platformenumnoOptional social platform hint: facebook, instagram, or linkedin.
refinementFeedbackstringnoUser feedback for revising a prior draft, up to 1,000 characters. Requires previousOutput.
previousOutputobject or stringnoThe prior generated content to revise. Requires refinementFeedback; maximum serialized size is 50 KB.

Refinement example

curl https://app.neariq.io/api/v1/content \
  -X POST \
  -H "X-NearIQ-Key: niq_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "gbp_post",
    "presetCategory": "local_business",
    "topic": "new seasonal offer",
    "previousOutput": {
      "title": "Spring Tune-Up Special",
      "body": "Book your service today."
    },
    "refinementFeedback": "Make it warmer and add a clearer call to action."
  }'

Create response

{
  "connected": true,
  "businessId": "8a18b4f8-7b6a-4b5d-a4cc-0adcbcfcc8e7",
  "generation": {
    "id": "f2d4b5cc-1c25-4d87-9e8b-72a6579b9641",
    "type": "gbp_post",
    "presetCategory": "local_business",
    "topic": "new seasonal offer",
    "content": {},
    "sourceSummary": {
      "refinement": {
        "requested": true,
        "previousOutputProvided": true,
        "feedbackLength": 53
      }
    },
    "generatedAt": "2026-05-01T00:00:00.000Z",
    "createdAt": "2026-05-01T00:00:00.000Z"
  },
  "usage": {
    "used": 2,
    "limit": 3
  },
  "dataCoverage": {}
}

Access

The endpoint uses the caller’s active personal or organization business context. Organization members only see history for businesses they can access. Accounts below Growth receive 403. API keys without competitors:read on GET or content:write on POST receive 403 requiredScope. Generated history stores structured output and derived source counts. It does not store raw review text.