Skip to main content

Get the Knowledge Base Data using the API

Integrating with Your Apps, Automations, and Workflows

SnackPrompt provides a robust and flexible API that allows you to integrate seamlessly with your applications, automations, and business processes. By leveraging the endpoints documented here, you can enhance your workflows, connect different systems, and automate various tasks efficiently.

Why Integrate with Snack Prompt?

  • Seamless Integration -- Connect with your existing applications, no matter the stack.
  • Powerful Automation -- Automate repetitive tasks and streamline operations.
  • Scalability -- Handle high-volume API calls efficiently.
  • Customization -- Adapt the API to fit your specific business needs.

Use Cases for API Integration

  • App Development -- Enhance your software by embedding Snack Prompt's functionalities.
  • Chatbots & Assistants -- Retrieve and compile Knowledge Base data dynamically.
  • Data Processing & Analysis -- Extract structured knowledge from Knowledge Base and integrate it into dashboards.
  • Task Automation -- Automate interactions with Knowledge Base and other APIs.
  • Third-Party Integrations -- Connect with tools like Zapier, CRMs, or internal databases.

How to Connect the Knowledge Base to an App

You can connect the Knowledge Base to an app by using the API of Snack Prompt. For this, you need to generate an API Key.

How to Generate an API Key

To generate an API Key, follow these steps:

  1. Log in to your Snack Prompt account.
  2. Navigate to the API Keys page: https://snackprompt.com/api-keys.
  3. Click the Create New API Key button.
  4. Provide a name for your Key to easily identify it later.
  5. Once created, you can:
    • Copy the Key for immediate use.
    • Delete the Key when it's no longer needed.
Note: API Keys do not have an expiration date and will remain valid until deleted.
How to generate an API Key

Using Your API Key

To authenticate your API requests, include your API Key in the request header as follows:

x-api-key: YOUR_API_KEY

Example Request

curl -X GET "https://api-integrations.snackprompt.com/v1/auth/token/validate" \
-H "x-api-key: YOUR_API_KEY"

How to Get your Knowledge Base using the API

To get your Knowledge Base using the API, you can make a GET request to the /v1/elemental/{id} endpoint. Here's how:

1. Get your Knowledge Base ID

  • Open your Knowledge Base in Snack Prompt
  • Click on the three-dot menu at the top of the Knowledge Base
  • Select "Copy the ID"

How to get your Knowledge Base ID

2. Make the API Request

You can customize the request with query parameters:

  • format: Choose the output format (text, markdown, json, or default)
  • group_by: Group data by row or column
  • fields: Select specific fields to return (id, title, type, description, etc.)

How to get your Knowledge Base data

Example request:

curl -X GET "https://api-integrations.snackprompt.com/v1/elemental/{id}" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"format": "json", "group_by": "row", "fields": ["id", "title", "description"]}'

Code Examples

Here are examples of how to consume the API endpoint in different programming languages:

const response = await fetch(
"https://api-integrations.snackprompt.com/v1/elemental/{id}",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log(data);

The response will be a JSON object containing the complete elemental data. Below is an example of the response you might receive:

Example Response
{
"code": 200,
"meta": {
"version": "v1.0.2",
"is_authenticaded": true
},
"response": {
"id": "S3bw9FLrf",
"is_list": false,
"type": {
"id": 7,
"name": "Table"
},
"category": {
"id": 17,
"name": "Basic"
},
"topics": null,
"title": "Knowledge Base: Simple",
"body_content": "",
"body_content_plaintext": "",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p>This is your brand’s <strong>AI-powered brain</strong>—<strong>a knowledge base</strong> that keeps all your business’s key info <strong>in one spot.</strong> Everything from what you sell to how you talk, neatly organized for easy access. AI thrives on context, and this system ensures your brand <strong>always shows up the right way.</strong></p><p><br></p><p>With this Knowledge Base, AI, automation, and your team stay <strong>on the same page,</strong> keeping your brand voice, messaging, and offers <strong>consistent across everything.</strong> 🚀</p>",
"description_plaintext": "This is your brand’s AI-powered brain—a knowledge base that keeps all your business’s key info in one spot. Everything from what you sell to how you talk, neatly organized for easy access. AI thrives on context, and this system ensures your brand always shows up the right way.\n\nWith this Knowledge Base, AI, automation, and your team stay on the same page, keeping your brand voice, messaging, and offers consistent across everything. 🚀",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": null,
"tutorial_steps": null,
"url": "https://snackprompt.com/table/knowledge-base-simple-146",
"is_premium": false,
"price": null,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.617019Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 1,
"command": "",
"columns": [
{
"id": 40311,
"title": "Name",
"visibility": {
"id": 0,
"name": ""
},
"cover_images": null,
"avatar_image": null,
"video_url": null,
"url": "S3bw9FLrfcolumn1F3Ic",
"is_premium": false,
"price": 0,
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"topics": null,
"total_items": 0,
"total_saves": 0,
"total_upvotes": 0,
"total_uses": 0,
"items": [
{
"id": "tb6HGJxSl",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "Name1",
"body_content": "<p><strong>Examples:</strong></p><ul><li><p>Nike</p></li><li><p>Tesla</p></li><li><p>Sons Coffee</p></li></ul>",
"body_content_plaintext": "Examples:\n\nNike\n\nTesla\n\nSons Coffee",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p><span style=\"background-color: rgb(246, 246, 255); color: rgb(33, 36, 44);\">The official name of my brand.</span></p>",
"description_plaintext": "The official name of my brand.",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/tb6HGJxSl",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
},
{
"id": "8GCpVTGbZ",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "Name2",
"body_content": "",
"body_content_plaintext": "",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p>this is a test</p>",
"description_plaintext": "this is a test",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/8GCpVTGbZ",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
},
{
"id": "UgdYO4wEY",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "Name3",
"body_content": "",
"body_content_plaintext": "",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "",
"description_plaintext": "",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/UgdYO4wEY",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
}
]
},
{
"id": 40312,
"title": "About",
"description": "<p><span style=\"background-color: rgb(246, 246, 255); color: rgb(33, 36, 44);\">A short, clear description of what my brand is and what it stands for.</span></p>",
"visibility": {
"id": 0,
"name": ""
},
"cover_images": null,
"avatar_image": null,
"video_url": null,
"url": "S3bw9FLrfcolumn2oht1",
"is_premium": false,
"price": 0,
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"topics": null,
"total_items": 0,
"total_saves": 0,
"total_upvotes": 0,
"total_uses": 0,
"items": [
{
"id": "xN1FnuqDW",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "About1",
"body_content": "<p><strong>Examples:</strong></p><p><strong>👟 Nike</strong></p><p><strong>Elevator Pitch </strong></p><p>Just Do It. Game-changing gear, next-level performance, and style that moves with you.</p><p><strong>Short Bio</strong></p><p>Nike delivers cutting-edge sportswear and performance-driven gear, empowering athletes of all levels to push limits and make history.</p><p><strong>Long About</strong></p><p>Nike is more than just sportswear; it’s a movement. With performance-driven gear, game-changing innovation, and an athlete-first mindset, Nike empowers everyone—from pros to everyday athletes—to break boundaries and just do it.</p><hr><p><strong>🚗 Tesla</strong></p><p><strong>Elevator Pitch </strong></p><p>The future is electric. Fast cars, clean energy, and AI-powered innovation—one charge at a time.</p><p><strong>Short Bio</strong></p><p>Electric speed, AI brains, zero emissions. Tesla is leading the charge in EVs, autonomous driving, and sustainable energy, making the future smarter and cleaner.</p><p><strong>Long About</strong></p><p>Tesla is revolutionizing transportation with cutting-edge electric vehicles, AI-powered self-driving technology, and sustainable energy solutions. From performance-driven EVs to solar innovations, Tesla is shaping a cleaner, smarter world—one innovation at a time.</p><hr><p><strong>☕ Sons Coffee</strong></p><p><strong>Short Bio</strong></p><p>Sons Coffee is all about rich flavors, quality brews, and a passion for crafting the perfect cup—without the pretense.</p><p><strong>Elevator Pitch</strong></p><p>Sons Coffee serves high-quality, ethically sourced beans with no fuss—just damn good coffee for caffeine lovers.</p><p><strong>Long About</strong></p><p> Sons Coffee is a craft coffee brand built for those who live life fully caffeinated. With ethically sourced beans, bold flavors, and a no-fuss approach, we fuel your hustle—one cup at a time.</p><p></p><p></p>",
"body_content_plaintext": "Examples:\n\n👟 Nike\n\nElevator Pitch \n\nJust Do It. Game-changing gear, next-level performance, and style that moves with you.\n\nShort Bio\n\nNike delivers cutting-edge sportswear and performance-driven gear, empowering athletes of all levels to push limits and make history.\n\nLong About\n\nNike is more than just sportswear; it’s a movement. With performance-driven gear, game-changing innovation, and an athlete-first mindset, Nike empowers everyone—from pros to everyday athletes—to break boundaries and just do it.\n\n🚗 Tesla\n\nElevator Pitch \n\nThe future is electric. Fast cars, clean energy, and AI-powered innovation—one charge at a time.\n\nShort Bio\n\nElectric speed, AI brains, zero emissions. Tesla is leading the charge in EVs, autonomous driving, and sustainable energy, making the future smarter and cleaner.\n\nLong About\n\nTesla is revolutionizing transportation with cutting-edge electric vehicles, AI-powered self-driving technology, and sustainable energy solutions. From performance-driven EVs to solar innovations, Tesla is shaping a cleaner, smarter world—one innovation at a time.\n\n☕ Sons Coffee\n\nShort Bio\n\nSons Coffee is all about rich flavors, quality brews, and a passion for crafting the perfect cup—without the pretense.\n\nElevator Pitch\n\nSons Coffee serves high-quality, ethically sourced beans with no fuss—just damn good coffee for caffeine lovers.\n\nLong About\n\n Sons Coffee is a craft coffee brand built for those who live life fully caffeinated. With ethically sourced beans, bold flavors, and a no-fuss approach, we fuel your hustle—one cup at a time.",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p>A short, clear description of what my brand is and what it stands for.</p>",
"description_plaintext": "A short, clear description of what my brand is and what it stands for.",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/xN1FnuqDW",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
},
{
"id": "Kxm_De1xx",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "About2",
"body_content": "<p></p>",
"body_content_plaintext": "",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p><br></p>",
"description_plaintext": "",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/Kxm_De1xx",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
},
{
"id": "WPfxFr9pP",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "About3",
"body_content": "",
"body_content_plaintext": "",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p>This is the description </p>",
"description_plaintext": "This is the description",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/WPfxFr9pP",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
}
]
},
{
"id": 40313,
"title": "Products & Services",
"description": "<p>Identifies paid offerings and any associated freemium tiers providing partial access before upgrading or completing a future purchase.</p>",
"visibility": {
"id": 0,
"name": ""
},
"cover_images": null,
"avatar_image": null,
"video_url": null,
"url": "S3bw9FLrfcolumn3pviH",
"is_premium": false,
"price": 0,
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"topics": null,
"total_items": 0,
"total_saves": 0,
"total_upvotes": 0,
"total_uses": 0,
"items": [
{
"id": "vcY5G2ksr",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "Products & Services1",
"body_content": "<p><strong>Examples: </strong></p><h3 class=\"heading\"><strong>👟 Nike</strong></h3><h4 class=\"heading\"><strong>Paid:</strong></h4><ul><li><p><strong>Air Max Sneakers</strong> – $140 | Ultimate comfort &amp; style.</p></li><li><p><strong>Dri-FIT Apparel</strong> – $50+ | Sweat-proof, athlete-approved.</p></li><li><p><strong>Nike Running Club Subscription</strong> – $10/month | Exclusive training &amp; challenges.</p></li></ul><h4 class=\"heading\"><strong>Free:</strong></h4><ul><li><p><strong>Nike Training App</strong> – Pro workout programs, no gym needed.</p></li><li><p><strong>Nike Run Club App</strong> – Track your runs, get personalized coaching.</p></li><li><p><strong>Nike Member Rewards</strong> – Early access to exclusive drops &amp; events.</p></li></ul><h4 class=\"heading\"><strong>Freemium:</strong></h4><ul><li><p><strong>Nike+ Membership</strong> – Free access to member-only products, but paid upgrades unlock <strong>VIP perks.</strong></p></li></ul><hr><h3 class=\"heading\"><strong>🚗 Tesla</strong></h3><h4 class=\"heading\"><strong>Paid:</strong></h4><ul><li><p><strong>Model S</strong> – $74,990 | Sleek, fast, and fully electric.</p></li><li><p><strong>Model 3</strong> – $40,000 | Affordable EV with Tesla’s signature tech.</p></li><li><p><strong>Solar Roof</strong> – Price varies | Power your home with the sun.</p></li></ul><h4 class=\"heading\"><strong>Free:</strong></h4><ul><li><p><strong>Supercharger Network Access</strong> – Free for select models.</p></li><li><p><strong>Tesla App</strong> – Track, summon, and manage your Tesla.</p></li><li><p><strong>Software Updates</strong> – Regular upgrades for better performance.</p></li></ul><h4 class=\"heading\"><strong>Freemium:</strong></h4><ul><li><p><strong>Full Self-Driving (FSD) Beta</strong> – Basic autopilot is free, but full self-driving is <strong>$199/month.</strong></p></li></ul><hr><h3 class=\"heading\"><strong>☕ Sons Coffee</strong></h3><h4 class=\"heading\"><strong>Paid (Coffee Menu):</strong></h4><p>☕ <strong>The Classics:</strong></p><ul><li><p><strong>Liberty Latte</strong> – $5 | Expresso, hose-made simple syrup and milk.</p></li><li><p><strong>Oat Milk Honey Latte</strong> – $5.50 | Sweet, creamy, and dairy-free.</p></li><li><p><strong>Espresso</strong> – $4 | Light roast, no nonsense, straight to the point.</p></li></ul><p>🥶 <strong>Iced &amp; Cold Brews:</strong></p><ul><li><p><strong>24hr Cold Brew</strong> – $5 | Deep, chocolatey, and slow-steeped.</p></li><li><p><strong>Iced Vanilla Latte</strong> – $5.50 | Espresso, milk, vanilla. Simple &amp; perfect.</p></li></ul><p>🍂 <strong>Seasonal Specials:</strong></p><ul><li><p><strong>Texas Pecan Mocha</strong> – $6 | Espresso meets rich, nutty chocolate.</p></li><li><p><strong>Spiced Maple Cappuccino</strong> – $5.50 | Cozy fall vibes in a cup.</p></li></ul><h4 class=\"heading\"><strong>Free:</strong></h4><ul><li><p><strong>Wi-Fi</strong> – Because coffee shops without Wi-Fi are just sad.</p></li><li><p><strong>Large Seating Area</strong> – Perfect for work, study, or coffee dates.</p></li><li><p><strong>Brewing Guides</strong> – Learn to make Sons-style coffee at home.</p></li></ul><h4 class=\"heading\"><strong>Freemium:</strong></h4><ul><li><p><strong>Coffee Tasting Events</strong> – First visit is free, premium tastings with rare beans are <strong>$10.</strong></p></li></ul>",
"body_content_plaintext": "Examples: \n\n👟 Nike\n\nPaid:\n\nAir Max Sneakers – $140 | Ultimate comfort &amp; style.\n\nDri-FIT Apparel – $50+ | Sweat-proof, athlete-approved.\n\nNike Running Club Subscription – $10/month | Exclusive training &amp; challenges.\n\nFree:\n\nNike Training App – Pro workout programs, no gym needed.\n\nNike Run Club App – Track your runs, get personalized coaching.\n\nNike Member Rewards – Early access to exclusive drops &amp; events.\n\nFreemium:\n\nNike+ Membership – Free access to member-only products, but paid upgrades unlock VIP perks.\n\n🚗 Tesla\n\nPaid:\n\nModel S – $74,990 | Sleek, fast, and fully electric.\n\nModel 3 – $40,000 | Affordable EV with Tesla’s signature tech.\n\nSolar Roof – Price varies | Power your home with the sun.\n\nFree:\n\nSupercharger Network Access – Free for select models.\n\nTesla App – Track, summon, and manage your Tesla.\n\nSoftware Updates – Regular upgrades for better performance.\n\nFreemium:\n\nFull Self-Driving (FSD) Beta – Basic autopilot is free, but full self-driving is $199/month.\n\n☕ Sons Coffee\n\nPaid (Coffee Menu):\n\n☕ The Classics:\n\nLiberty Latte – $5 | Expresso, hose-made simple syrup and milk.\n\nOat Milk Honey Latte – $5.50 | Sweet, creamy, and dairy-free.\n\nEspresso – $4 | Light roast, no nonsense, straight to the point.\n\n🥶 Iced &amp; Cold Brews:\n\n24hr Cold Brew – $5 | Deep, chocolatey, and slow-steeped.\n\nIced Vanilla Latte – $5.50 | Espresso, milk, vanilla. Simple &amp; perfect.\n\n🍂 Seasonal Specials:\n\nTexas Pecan Mocha – $6 | Espresso meets rich, nutty chocolate.\n\nSpiced Maple Cappuccino – $5.50 | Cozy fall vibes in a cup.\n\nFree:\n\nWi-Fi – Because coffee shops without Wi-Fi are just sad.\n\nLarge Seating Area – Perfect for work, study, or coffee dates.\n\nBrewing Guides – Learn to make Sons-style coffee at home.\n\nFreemium:\n\nCoffee Tasting Events – First visit is free, premium tastings with rare beans are $10.",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p>Identifies paid offerings and any associated freemium tiers providing partial access before upgrading or completing a future purchase. </p>",
"description_plaintext": "Identifies paid offerings and any associated freemium tiers providing partial access before upgrading or completing a future purchase.",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/vcY5G2ksr",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
},
{
"id": "xL-SPN9Qj",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "Products & Services2",
"body_content": "",
"body_content_plaintext": "",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p>Identifies paid offerings and any associated freemium tiers providing partial access before upgrading or completing a future purchase.</p>",
"description_plaintext": "Identifies paid offerings and any associated freemium tiers providing partial access before upgrading or completing a future purchase.",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/xL-SPN9Qj",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
},
{
"id": "H_vE42gvn",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 18,
"name": "Text"
},
"topics": null,
"title": "Products & Services3",
"body_content": "",
"body_content_plaintext": "",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "<p>Identifies paid offerings and any associated freemium tiers providing partial access before upgrading or completing a future purchase.</p>",
"description_plaintext": "Identifies paid offerings and any associated freemium tiers providing partial access before upgrading or completing a future purchase.",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": "",
"tutorial_steps": null,
"url": "https://snackprompt.com/document/H_vE42gvn",
"is_premium": false,
"price": 0,
"average_rate": 0,
"video_url": "",
"created_at": "2025-03-26T23:24:33.678551Z",
"updated_at": null,
"user": {
"id": "9X8KhDvWL4bFfU1Q3Gc02jap25C2",
"name": "Gabriel Pessoni",
"username": "gabriel_pessoni",
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocJ7VbaMvtmKfxLwR4UverpCSjJb3pBWMeq45S0aLQRF9zPUrNoV=s96-c"
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
}
]
},
}
}

For a complete documentation of the endpoint, please refer to the API Reference.


How to Get the Compiled Knowledge Base using the API

To get the compiled Knowledge Base using the API, you can make a GET request to the /v1/elemental/{id}/knowledge-base endpoint. Here's how:

  1. Get your Knowledge Base ID
    • Open your Knowledge Base in Snack Prompt
    • Click on the three-dot menu at the top of the Knowledge Base
    • Select "Copy the ID"

How to get your Knowledge Base ID

  1. Make the API Request You can customize the request with query parameters:

    • format: Choose the output format (text, markdown, json, or default)
    • group_by: Group data by row or column
    • fields: Select specific fields to return (id, title, type, description, etc.)

    For the complete documentation of the request, please refer to the API Reference.

    How to use the API to get the compiled Knowledge Base

On this example, we are using the API to get the compiled Knowledge Base in JSON format, grouped by row and with the fields id, title and description. We test the endpoint using the POSTMAN app. On the Header we pass the X-API-KEY

curl -X GET "https://api-integrations.snackprompt.com/v1/elemental/{id}/knowledge-base" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"format": "json", "group_by": "row", "fields": ["id", "title", "description"]}'

Code Examples

Here are examples of how to consume the API endpoint in different programming languages:

const response = await fetch(
"https://api-integrations.snackprompt.com/v1/elemental/{id}/knowledge-base",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log(data);
Example Response
{
"code": 200,
"meta": {
"version": "v1.0.2",
"is_authenticaded": true
},
"response": {
"knowledge_base": {
"id": "bV940mIXP",
"title": "Table 3/24/25 16:11:56 - CST",
"content": "",
"items": [
{
"id": "46777",
"title": "Row 1",
"content": "",
"items": [
{
"id": "AKphPJjgL",
"title": "Name1",
"content": ""
},
{
"id": "ngq_mPsJ7",
"title": "Bio1",
"content": ""
},
{
"id": "A-mcOOJ8P",
"title": "Services1",
"content": ""
}
]
},
{
"id": "46778",
"title": "Row 2",
"content": "",
"items": [
{
"id": "9_mKMykMF",
"title": "Name2",
"content": ""
},
{
"id": "U7mn367L5",
"title": "Bio2",
"content": ""
},
{
"id": "TquSPing9",
"title": "Services2",
"content": ""
}
]
},
{
"id": "46779",
"title": "Row 3",
"content": "",
"items": [
{
"id": "vFDpwFiLP",
"title": "Name3",
"content": ""
},
{
"id": "BcO3CrMO_",
"title": "Bio3",
"content": ""
},
{
"id": "CL-yOvuti",
"title": "Services3",
"content": ""
}
]
}
]
}
}