Inspiration & Templates

Search post templates

Searches Postiv's global post-writing templates plus the workspace's own custom templates by substring match across name/pattern/bestFor/example.

GET/api/public/templates
cURLGET /api/public/templates
curl "https://postiv.ai/api/public/templates?query=launch%20week&q=launch%20week&limit=10" \
  -H "Authorization: Bearer pk_postiv_..."
200Response
{
  "success": true,
  "templates": [
    {
      "id": "t1...",
      "slug": "problem-agitate-solve",
      "name": "Problem-Agitate-Solve",
      "pattern": "Open with a pain point...",
      "bestFor": "Educational hooks",
      "example": "Most founders...",
      "isCustom": false,
      "usageCount": 42
    }
  ]
}

Authorization

Requires an organization API key with the posts:read scope, sent as Authorization: Bearer or x-api-key.

Query parameters

querystring

Substring search, max 500 chars. Alias: q.

qstring

Alias for query.

limitintdefault: 20

Max results, 1-50 (service further caps at 50 regardless of a higher request).

Response

Matching templates, ranked by usage count then org-owned-first then sort order.

templates[].iduuid
templates[].slugstring
templates[].namestring
templates[].patternstring

The reusable structural pattern.

templates[].bestForstring|null
templates[].examplestring|null
templates[].isCustomboolean

true if owned by this workspace, false if a global template.

templates[].usageCountint

Times used by this org's posts.

Good to know

  • Only active templates (is_active=true) that are either global (org_id IS NULL) or owned by the calling org are returned; other workspaces' custom templates never leak.