openapi: 3.0.3
info:
  title: Snack Prompt Integration API
  version: v1.0.2
  description: >
    # Snack Prompt Integration API

    The Snack Prompt API provides efficient and customizable access to prompts,
    snippets, documents, and more for various applications and services. This
    API enables third-party developers to integrate, manage, and utilize
    elemental data seamlessly.
   
  contact:
    name: API Support
    email: support@snackprompt.com
  x-gitbook-description-document:
    object: document
    data:
      schemaVersion: 9
    nodes:
      - object: block
        type: heading-1
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Snack Prompt Integration API
                marks: []
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: >-
                  The Snack Prompt API provides efficient and customizable
                  access to prompts, snippets, documents, and more for various
                  applications and services. This API enables third-party
                  developers to integrate, manage, and utilize elemental data
                  seamlessly.
                marks: []
      - object: block
        type: hint
        isVoid: false
        data:
          style: info
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Audience
                    marks:
                      - object: mark
                        type: bold
                        data: {}
                  - object: leaf
                    text: ' This API is intended for third-party developers who need to integrate elemental management capabilities into their applications, whether for educational tools, interactive chatbots, content creation platforms, or other innovative uses.'
                    marks: []
      - object: block
        type: heading-2
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Getting Started
                marks: []
      - object: block
        type: stepper
        isVoid: false
        data: {}
        nodes:
          - object: block
            type: stepper-step
            isVoid: false
            data: {}
            nodes:
              - object: block
                type: heading-3
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Register
                        marks: []
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: 'Sign up at '
                        marks: []
                  - object: inline
                    type: link
                    isVoid: false
                    data:
                      ref:
                        kind: url
                        url: https://snackprompt.com
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: snackprompt.com
                            marks: []
                  - object: text
                    leaves:
                      - object: leaf
                        text: ' and create an account.'
                        marks: []
          - object: block
            type: stepper-step
            isVoid: false
            data: {}
            nodes:
              - object: block
                type: heading-3
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Get Your API Key
                        marks: []
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: 'Navigate to '
                        marks: []
                  - object: inline
                    type: link
                    isVoid: false
                    data:
                      ref:
                        kind: url
                        url: https://snackprompt.com/api-keys
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: snackprompt.com/api-keys
                            marks: []
                  - object: text
                    leaves:
                      - object: leaf
                        text: ' and generate a new API key.'
                        marks: []
          - object: block
            type: stepper-step
            isVoid: false
            data: {}
            nodes:
              - object: block
                type: heading-3
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Authenticate
                        marks: []
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: 'Include your API key in the '
                        marks: []
                      - object: leaf
                        text: x-api-key
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' header with every request.'
                        marks: []
          - object: block
            type: stepper-step
            isVoid: false
            data: {}
            nodes:
              - object: block
                type: heading-3
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Make Your First Request
                        marks: []
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: 'Call '
                        marks: []
                      - object: leaf
                        text: GET /v1/auth/token/validate
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' to verify your API key works correctly.'
                        marks: []
      - object: block
        type: heading-2
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Example Use Case
                marks: []
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: >-
                  Imagine you are building an educational platform that needs to
                  generate daily writing prompts for students. With the Snack
                  Prompt API, you can easily fetch a new prompt each day,
                  categorize them, and even allow students to submit their
                  responses.
                marks: []
      - object: block
        type: heading-2
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Core Concepts
                marks: []
      - object: block
        type: tabs
        isVoid: false
        data: {}
        nodes:
          - object: block
            type: tabs-item
            isVoid: false
            data:
              title: Elementals
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Elementals
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: ' are the core content units in Snack Prompt:'
                        marks: []
              - object: block
                type: list-unordered
                isVoid: false
                data: {}
                nodes:
                  - object: block
                    type: list-item
                    isVoid: false
                    data: {}
                    nodes:
                      - object: block
                        type: paragraph
                        isVoid: false
                        data: {}
                        nodes:
                          - object: text
                            leaves:
                              - object: leaf
                                text: Prompts
                                marks:
                                  - object: mark
                                    type: bold
                                    data: {}
                              - object: leaf
                                text: ' (type_id: 1): AI prompt templates with variable tags like '
                                marks: []
                              - object: leaf
                                text: '#topic'
                                marks:
                                  - object: mark
                                    type: code
                                    data: {}
                              - object: leaf
                                text: ', '
                                marks: []
                              - object: leaf
                                text: '#style'
                                marks:
                                  - object: mark
                                    type: code
                                    data: {}
                  - object: block
                    type: list-item
                    isVoid: false
                    data: {}
                    nodes:
                      - object: block
                        type: paragraph
                        isVoid: false
                        data: {}
                        nodes:
                          - object: text
                            leaves:
                              - object: leaf
                                text: Snippets
                                marks:
                                  - object: mark
                                    type: bold
                                    data: {}
                              - object: leaf
                                text: ' (type_id: 2): Reusable text blocks'
                                marks: []
                  - object: block
                    type: list-item
                    isVoid: false
                    data: {}
                    nodes:
                      - object: block
                        type: paragraph
                        isVoid: false
                        data: {}
                        nodes:
                          - object: text
                            leaves:
                              - object: leaf
                                text: Documents
                                marks:
                                  - object: mark
                                    type: bold
                                    data: {}
                              - object: leaf
                                text: ' (type_id: 3): Long-form content'
                                marks: []
          - object: block
            type: tabs-item
            isVoid: false
            data:
              title: Lists
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Lists
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: ' are collections/folders that organize elementals. They can contain multiple prompts, snippets, or documents and support features like:'
                        marks: []
              - object: block
                type: list-unordered
                isVoid: false
                data: {}
                nodes:
                  - object: block
                    type: list-item
                    isVoid: false
                    data: {}
                    nodes:
                      - object: block
                        type: paragraph
                        isVoid: false
                        data: {}
                        nodes:
                          - object: text
                            leaves:
                              - object: leaf
                                text: Favorites and saves
                                marks: []
                  - object: block
                    type: list-item
                    isVoid: false
                    data: {}
                    nodes:
                      - object: block
                        type: paragraph
                        isVoid: false
                        data: {}
                        nodes:
                          - object: text
                            leaves:
                              - object: leaf
                                text: Ratings and votes
                                marks: []
                  - object: block
                    type: list-item
                    isVoid: false
                    data: {}
                    nodes:
                      - object: block
                        type: paragraph
                        isVoid: false
                        data: {}
                        nodes:
                          - object: text
                            leaves:
                              - object: leaf
                                text: Premium content
                                marks: []
          - object: block
            type: tabs-item
            isVoid: false
            data:
              title: Tags
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Tags
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: ' provide flexible categorization for your content. Create custom tags with colors and descriptions to organize elementals and lists.'
                        marks: []
          - object: block
            type: tabs-item
            isVoid: false
            data:
              title: Template Tags
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Template Tags
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: ' are placeholders in prompts prefixed with '
                        marks: []
                      - object: leaf
                        text: '#'
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' (e.g., '
                        marks: []
                      - object: leaf
                        text: '#topic'
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ', '
                        marks: []
                      - object: leaf
                        text: '#style'
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: >-
                          ). Use the prepare endpoint to replace these with
                          actual values.
                        marks: []
      - object: block
        type: heading-2
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Authentication
                marks: []
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: 'All API requests require authentication via the '
                marks: []
              - object: leaf
                text: x-api-key
                marks:
                  - object: mark
                    type: code
                    data: {}
              - object: leaf
                text: ' header:'
                marks: []
      - object: block
        type: code
        isVoid: false
        data: {}
        nodes:
          - object: block
            type: code-line
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: 'x-api-key: YOUR_API_KEY'
                    marks: []
          - object: block
            type: code-line
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: 'Content-Type: application/json'
                    marks: []
      - object: block
        type: hint
        isVoid: false
        data:
          style: warning
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: API Key Security
                    marks:
                      - object: mark
                        type: bold
                        data: {}
                  - object: leaf
                    text: ' Keep your API key secure. Never share it publicly or commit it to version control. API keys do not expire but can be deleted at any time from your account settings.'
                    marks: []
      - object: block
        type: heading-2
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Rate Limits & Pagination
                marks: []
      - object: block
        type: list-unordered
        isVoid: false
        data: {}
        nodes:
          - object: block
            type: list-item
            isVoid: false
            data: {}
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Pagination defaults
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: ': page=1, size=4, max size=100'
                        marks: []
          - object: block
            type: list-item
            isVoid: false
            data: {}
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Order options
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: >-
                          : order_by (default: created_at), order_dir (asc/desc,
                          default: desc)
                        marks: []
servers:
  - url: https://api-integrations.snackprompt.com
    description: Production server
    x-gitbook-description-html: <p>Production server</p>
tags:
  - name: authentication
    x-page-title: Authentication
    x-page-description: Validate API tokens and authenticate requests
    x-page-icon: key
    description: >
      ## Authentication


      The Snack Prompt API uses API Key authentication. Include your API key in
      the `x-api-key` header with every request.


      ### Required Headers


      | Header | Value | Required |

      |--------|-------|----------|

      | `x-api-key` | Your API key | Yes |

      | `Content-Type` | application/json | For POST/PUT requests |
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: heading-2
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Authentication
                  marks: []
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    The Snack Prompt API uses API Key authentication. Include
                    your API key in the 
                  marks: []
                - object: leaf
                  text: x-api-key
                  marks:
                    - object: mark
                      type: code
                      data: {}
                - object: leaf
                  text: ' header with every request.'
                  marks: []
        - object: block
          type: heading-3
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Required Headers
                  marks: []
        - object: block
          type: table
          isVoid: true
          data:
            records:
              9YeG6MwOFQfL:
                orderIndex: '0|hzzzbb:'
                values:
                  9GdeW0OibNtL: M95PRCGkMInt
                  80BlxwDBYwUQ: PXjYLq0Ovryy
                  IhmnKWTyFbx8: 7UFHX8RjOnHb
              0Q6VXPy04OU6:
                orderIndex: '0|i0001j:'
                values:
                  9GdeW0OibNtL: lTcFJdfr7pIJ
                  80BlxwDBYwUQ: fGLlpGNkcOiO
                  IhmnKWTyFbx8: 3GNgHHkVPYWw
            definition:
              9GdeW0OibNtL:
                id: 9GdeW0OibNtL
                title: Header
                type: text
                textAlignment: left
              80BlxwDBYwUQ:
                id: 80BlxwDBYwUQ
                title: Value
                type: text
                textAlignment: left
              IhmnKWTyFbx8:
                id: IhmnKWTyFbx8
                title: Required
                type: text
                textAlignment: left
            view:
              type: grid
              columns:
                - 9GdeW0OibNtL
                - 80BlxwDBYwUQ
                - IhmnKWTyFbx8
              useNewSizing: true
              hideHeader: false
              columnWidths: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: ''
                  marks: []
          fragments:
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: x-api-key
                          marks:
                            - object: mark
                              type: code
                              data: {}
              fragment: M95PRCGkMInt
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: Your API key
                          marks: []
              fragment: PXjYLq0Ovryy
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: 'Yes'
                          marks: []
              fragment: 7UFHX8RjOnHb
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: Content-Type
                          marks:
                            - object: mark
                              type: code
                              data: {}
              fragment: lTcFJdfr7pIJ
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: application/json
                          marks: []
              fragment: fGLlpGNkcOiO
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: For POST/PUT requests
                          marks: []
              fragment: 3GNgHHkVPYWw
              type: table-cell
    x-gitbook-description-html: >-
      <h2>Authentication</h2><p>The Snack Prompt API uses API Key
      authentication. Include your API key in the <code>x-api-key</code> header
      with every request.</p><h3>Required
      Headers</h3><table><thead><tr><th>Header</th><th>Value</th><th>Required</th></tr></thead><tbody><tr><td><code>x-api-key</code></td><td>Your
      API
      key</td><td>Yes</td></tr><tr><td><code>Content-Type</code></td><td>application/json</td><td>For
      POST/PUT requests</td></tr></tbody></table>
  - name: elementals
    x-page-title: Elementals
    x-page-description: Manage prompts, snippets, and documents
    x-page-icon: file-lines
    description: >
      ## Elementals


      Elementals are the core content units in Snack Prompt. They come in three
      types:


      | Type ID | Name | Description |

      |---------|------|-------------|

      | 1 | Prompt | AI prompt templates with variable tags |

      | 2 | Snippet | Reusable text blocks |

      | 3 | Document | Long-form content |
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: heading-2
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Elementals
                  marks: []
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Elementals are the core content units in Snack Prompt. They
                    come in three types:
                  marks: []
        - object: block
          type: table
          isVoid: true
          data:
            records:
              xxAyYEoqQdkV:
                orderIndex: '0|hzzzdr:'
                values:
                  SjlGQt1sD6yq: O5ndCC8d6FXX
                  tTspYnHxQVVk: pqdqAkOJeAOt
                  DMPcxcBdNArV: HbAxCqwvjwO4
              9W79elVOQtrg:
                orderIndex: '0|hzzzzb:'
                values:
                  SjlGQt1sD6yq: SqVhaEerHrN9
                  tTspYnHxQVVk: 3nBx1cEfdJZs
                  DMPcxcBdNArV: 4xcEweXdvZBe
              qVyVDiIRBvkN:
                orderIndex: '0|i000hj:'
                values:
                  SjlGQt1sD6yq: M2oU0333tTkv
                  tTspYnHxQVVk: XGQVSsvzpZF6
                  DMPcxcBdNArV: cJ3hewQybIHQ
            definition:
              SjlGQt1sD6yq:
                id: SjlGQt1sD6yq
                title: Type ID
                type: text
                textAlignment: left
              tTspYnHxQVVk:
                id: tTspYnHxQVVk
                title: Name
                type: text
                textAlignment: left
              DMPcxcBdNArV:
                id: DMPcxcBdNArV
                title: Description
                type: text
                textAlignment: left
            view:
              type: grid
              columns:
                - SjlGQt1sD6yq
                - tTspYnHxQVVk
                - DMPcxcBdNArV
              useNewSizing: true
              hideHeader: false
              columnWidths: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: ''
                  marks: []
          fragments:
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: '1'
                          marks: []
              fragment: O5ndCC8d6FXX
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: Prompt
                          marks: []
              fragment: pqdqAkOJeAOt
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: AI prompt templates with variable tags
                          marks: []
              fragment: HbAxCqwvjwO4
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: '2'
                          marks: []
              fragment: SqVhaEerHrN9
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: Snippet
                          marks: []
              fragment: 3nBx1cEfdJZs
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: Reusable text blocks
                          marks: []
              fragment: 4xcEweXdvZBe
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: '3'
                          marks: []
              fragment: M2oU0333tTkv
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: Document
                          marks: []
              fragment: XGQVSsvzpZF6
              type: table-cell
            - object: fragment
              nodes:
                - object: block
                  type: paragraph
                  isVoid: false
                  data: {}
                  nodes:
                    - object: text
                      leaves:
                        - object: leaf
                          text: Long-form content
                          marks: []
              fragment: cJ3hewQybIHQ
              type: table-cell
    x-gitbook-description-html: >-
      <h2>Elementals</h2><p>Elementals are the core content units in Snack
      Prompt. They come in three types:</p><table><thead><tr><th>Type
      ID</th><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Prompt</td><td>AI
      prompt templates with variable
      tags</td></tr><tr><td>2</td><td>Snippet</td><td>Reusable text
      blocks</td></tr><tr><td>3</td><td>Document</td><td>Long-form
      content</td></tr></tbody></table>
  - name: elemental-read
    x-parent: elementals
    x-page-title: Read & Search
    x-page-description: Retrieve and search elementals
    x-page-icon: search
    description: Retrieve individual elementals or search across your collection.
    x-gitbook-description-html: <p>Retrieve individual elementals or search across your collection.</p>
  - name: elemental-create
    x-parent: elementals
    x-page-title: Create a Elemental
    x-page-description: Create new elementals
    x-page-icon: plus
    description: Create new prompts, snippets, and documents.
    x-gitbook-description-html: <p>Create new prompts, snippets, and documents.</p>
  - name: elemental-update
    x-parent: elementals
    x-page-title: Update a Elemental
    x-page-description: Update existing elementals
    x-page-icon: pencil
    description: Modify existing elementals with partial or full updates.
    x-gitbook-description-html: <p>Modify existing elementals with partial or full updates.</p>
  - name: elemental-delete
    x-parent: elementals
    x-page-title: Delete a Elemental
    x-page-description: Delete elementals
    x-page-icon: trash
    description: Remove elementals from your collection permanently.
    x-gitbook-description-html: <p>Remove elementals from your collection permanently.</p>
  - name: elemental-favorites
    x-parent: elementals
    x-page-title: Manage Favorites
    x-page-description: Manage favorite elementals
    x-page-icon: star
    description: Add or remove elementals from your favorites list.
    x-gitbook-description-html: <p>Add or remove elementals from your favorites list.</p>
  - name: elemental-files
    x-parent: elementals
    x-page-title: File Management
    x-page-description: Upload and manage elemental files and images
    x-page-icon: upload
    description: Upload images, documents, and other files to enhance your elementals.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Upload images, documents, and other files to enhance your
                    elementals.
                  marks: []
    x-gitbook-description-html: >-
      <p>Upload images, documents, and other files to enhance your
      elementals.</p>
  - name: elemental-templates
    x-parent: elementals
    x-page-title: Template Tags
    x-page-description: 'Work with template variable tags like #topic and #style'
    x-page-icon: hash
    description: >-
      Template tags are placeholders in prompts (e.g., `#topic`, `#style`) that
      can be dynamically replaced with actual values.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: 'Template tags are placeholders in prompts (e.g., '
                  marks: []
                - object: leaf
                  text: '#topic'
                  marks:
                    - object: mark
                      type: code
                      data: {}
                - object: leaf
                  text: ', '
                  marks: []
                - object: leaf
                  text: '#style'
                  marks:
                    - object: mark
                      type: code
                      data: {}
                - object: leaf
                  text: ) that can be dynamically replaced with actual values.
                  marks: []
    x-gitbook-description-html: >-
      <p>Template tags are placeholders in prompts (e.g., <code>#topic</code>,
      <code>#style</code>) that can be dynamically replaced with actual
      values.</p>
  - name: elemental-metadata
    x-parent: elementals
    x-page-title: Types & Categories
    x-page-description: Get elemental types, categories, and topics
    x-page-icon: layer-group
    description: >-
      Retrieve available elemental types, categories, and topics for organizing
      and creating content.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Retrieve available elemental types, categories, and topics
                    for organizing and creating content.
                  marks: []
    x-gitbook-description-html: >-
      <p>Retrieve available elemental types, categories, and topics for
      organizing and creating content.</p>
  - name: lists
    x-page-title: Manage Lists
    x-page-description: Organize content with lists and folders
    x-page-icon: folder
    description: >
      ## Lists


      Lists are collections that organize elementals. Use them to group related
      prompts, snippets, or documents together.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: heading-2
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Lists
                  marks: []
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Lists are collections that organize elementals. Use them to
                    group related prompts, snippets, or documents together.
                  marks: []
    x-gitbook-description-html: >-
      <h2>Lists</h2><p>Lists are collections that organize elementals. Use them
      to group related prompts, snippets, or documents together.</p>
  - name: tags
    x-page-title: Manage Tags
    x-page-description: Create and manage tags for categorization
    x-page-icon: tag
    description: >
      ## Tags


      Tags provide flexible categorization for your content. Create custom tags
      with colors and descriptions.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: heading-2
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Tags
                  marks: []
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Tags provide flexible categorization for your content.
                    Create custom tags with colors and descriptions.
                  marks: []
    x-gitbook-description-html: >-
      <h2>Tags</h2><p>Tags provide flexible categorization for your content.
      Create custom tags with colors and descriptions.</p>
  - name: knowledge-base
    x-page-title: Manage Knowledge Base
    x-page-description: Compile data in AI-ready formats
    x-page-icon: brain
    description: >-
      Export elementals and lists in AI-ready formats (text, markdown, JSON) for
      RAG systems, training data, or documentation.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Export elementals and lists in AI-ready formats (text,
                    markdown, JSON) for RAG systems, training data, or
                    documentation.
                  marks: []
    x-gitbook-description-html: >-
      <p>Export elementals and lists in AI-ready formats (text, markdown, JSON)
      for RAG systems, training data, or documentation.</p>
  - name: visibility
    x-page-title: Manage Visibility
    x-page-description: Access control and visibility settings
    x-page-icon: eye
    description: >-
      Control who can see your content with visibility settings: Public
      (everyone) or Unlisted (link only).
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Control who can see your content with visibility settings:
                    Public (everyone) or Unlisted (link only).
                  marks: []
    x-gitbook-description-html: >-
      <p>Control who can see your content with visibility settings: Public
      (everyone) or Unlisted (link only).</p>
  - name: support
    x-page-title: Support
    x-page-description: Submit support issues
    x-page-icon: circle-question
    description: >-
      Submit bug reports, feedback, or support requests to the Snack Prompt
      team.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Submit bug reports, feedback, or support requests to the
                    Snack Prompt team.
                  marks: []
    x-gitbook-description-html: >-
      <p>Submit bug reports, feedback, or support requests to the Snack Prompt
      team.</p>
  - name: health
    x-page-title: Health
    x-page-description: System health checks
    x-page-icon: heart-pulse
    description: >-
      Check the API status and availability before making authenticated
      requests.
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Check the API status and availability before making
                    authenticated requests.
                  marks: []
    x-gitbook-description-html: >-
      <p>Check the API status and availability before making authenticated
      requests.</p>
paths:
  /health:
    get:
      summary: Check System Health
      description: >
        Returns the current health status of the system.


        {% hint style="info" %}

        **No Authentication Required**

        This endpoint does not require any authentication headers. Use it to
        verify the API is reachable before making authenticated requests.

        {% endhint %}
      tags:
        - health
      operationId: checkHealth
      security: []
      responses:
        '200':
          description: System is healthy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
              example:
                status: UP
          x-gitbook-description-html: <p>System is healthy</p>
        '500':
          description: System health check failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          x-gitbook-description-html: <p>System health check failed</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |
            curl -X GET "https://api-integrations.snackprompt.com/health"
        - lang: Python
          label: Python
          source: |
            import requests

            url = "https://api-integrations.snackprompt.com/health"

            response = requests.get(url)
            print(response.json())  # {'status': 'UP'}
        - lang: JavaScript
          label: JavaScript
          source: |
            fetch('https://api-integrations.snackprompt.com/health')
              .then(r => r.json())
              .then(console.log)  // { status: 'UP' }
        - lang: Go
          label: Go
          source: >
            resp, err :=
            http.Get("https://api-integrations.snackprompt.com/health")

            if err != nil {
                log.Fatal(err)
            }

            defer resp.Body.Close()

            // Response: {"status": "UP"}
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Returns the current health status of the system.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: info
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: No Authentication Required
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: ' This endpoint does not require any authentication headers. Use it to verify the API is reachable before making authenticated requests.'
                        marks: []
      x-gitbook-description-html: >-
        <p>Returns the current health status of the system.</p><div
        data-gb-custom-block data-tag="hint" data-style="info" class="hint
        hint-info"><p><strong>No Authentication Required</strong> This endpoint
        does not require any authentication headers. Use it to verify the API is
        reachable before making authenticated requests.</p></div>
  /v1/auth/token/validate:
    get:
      summary: Validate API Token
      description: >
        Validates the API token and returns the authenticated user's details,
        such as ID and email.


        {% hint style="success" %}

        Use this endpoint to verify your API key is working correctly before
        making other requests.

        {% endhint %}
      tags:
        - authentication
      operationId: validateToken
      security:
        - ApiKeyAuth: []
      responses:
        '200':
          description: Token is valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenValidationResponse'
              example:
                code: 200
                meta:
                  version: v1.0.2
                  is_authenticaded: true
                response:
                  id: 1q2w3e4r5t6y7u8i9o0p
                  name: John Doe
                  username: john_doe
                  email: user@example.com
                  avatar: http://files.snackprompt.com.....png
          x-gitbook-description-html: <p>Token is valid</p>
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 401
                meta:
                  version: v1.0.2
                error_message: Your session token is missing. Please log in again
          x-gitbook-description-html: <p>Invalid or missing API key</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/auth/token/validate" \
              -H "x-api-key: YOUR_API_KEY"
        - lang: Python
          label: Python
          source: >
            import requests


            url =
            "https://api-integrations.snackprompt.com/v1/auth/token/validate"

            headers = {"x-api-key": "YOUR_API_KEY"}


            response = requests.get(url, headers=headers)

            print(response.json())
        - lang: JavaScript
          label: JavaScript
          source: >
            fetch('https://api-integrations.snackprompt.com/v1/auth/token/validate',
            {
              headers: { 'x-api-key': 'YOUR_API_KEY' }
            })
              .then(r => r.json())
              .then(console.log)
        - lang: Go
          label: Go
          source: |
            req, _ := http.NewRequest("GET",
              "https://api-integrations.snackprompt.com/v1/auth/token/validate", nil)
            req.Header.Set("x-api-key", "YOUR_API_KEY")
            client := &http.Client{}
            resp, _ := client.Do(req)
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Validates the API token and returns the authenticated
                      user's details, such as ID and email.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: success
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: >-
                          Use this endpoint to verify your API key is working
                          correctly before making other requests.
                        marks: []
      x-gitbook-description-html: >-
        <p>Validates the API token and returns the authenticated user's details,
        such as ID and email.</p><div data-gb-custom-block data-tag="hint"
        data-style="success" class="hint hint-success"><p>Use this endpoint to
        verify your API key is working correctly before making other
        requests.</p></div>
  /v1/elemental/types:
    get:
      summary: Get Elemental Types
      description: |
        Fetch a list of elemental types available in the system.

        | Type ID | Name | Description |
        |---------|------|-------------|
        | 1 | Prompt | AI prompt templates with variable tags |
        | 2 | Snippet | Reusable text blocks |
        | 3 | Document | Long-form content |
      tags:
        - elemental-metadata
      operationId: getElementalTypes
      security:
        - ApiKeyAuth: []
      responses:
        '200':
          code: 200
          meta:
            version: v1.0.2
            is_authenticaded: true
          response:
            - id: 1
              name: Prompt
            - id: 2
              name: Snippet
            - id: 3
              name: Document
            - id: 5
              name: Automation
            - id: 7
              name: Table
            - id: 11
              name: Image
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          x-gitbook-description-html: <p>Unauthorized</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elemental/types" \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Fetch a list of elemental types available in the system.
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                hQlc6OWOGUzP:
                  orderIndex: '0|hzzzon:'
                  values:
                    144K9U1uPjt5: EThsvDGHSplZ
                    7c8V1SgBHsPB: AwW5tcIWUCbS
                    6dgzoTvEhqlC: 6n9JfEn53nzz
                tPKlcV70Jw7n:
                  orderIndex: '0|i0003j:'
                  values:
                    144K9U1uPjt5: 7e1GlhnBMpCR
                    7c8V1SgBHsPB: llNKzzaTdOeo
                    6dgzoTvEhqlC: luYjSFBY7OE4
                CRdzqYUSegmv:
                  orderIndex: '0|i000vb:'
                  values:
                    144K9U1uPjt5: JECbd2sEIOkt
                    7c8V1SgBHsPB: I4tTYIGh1f9Q
                    6dgzoTvEhqlC: QcxjVscL0F79
              definition:
                144K9U1uPjt5:
                  id: 144K9U1uPjt5
                  title: Type ID
                  type: text
                  textAlignment: left
                7c8V1SgBHsPB:
                  id: 7c8V1SgBHsPB
                  title: Name
                  type: text
                  textAlignment: left
                6dgzoTvEhqlC:
                  id: 6dgzoTvEhqlC
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - 144K9U1uPjt5
                  - 7c8V1SgBHsPB
                  - 6dgzoTvEhqlC
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '1'
                            marks: []
                fragment: EThsvDGHSplZ
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Prompt
                            marks: []
                fragment: AwW5tcIWUCbS
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: AI prompt templates with variable tags
                            marks: []
                fragment: 6n9JfEn53nzz
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '2'
                            marks: []
                fragment: 7e1GlhnBMpCR
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Snippet
                            marks: []
                fragment: llNKzzaTdOeo
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Reusable text blocks
                            marks: []
                fragment: luYjSFBY7OE4
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '3'
                            marks: []
                fragment: JECbd2sEIOkt
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Document
                            marks: []
                fragment: I4tTYIGh1f9Q
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Long-form content
                            marks: []
                fragment: QcxjVscL0F79
                type: table-cell
      x-gitbook-description-html: >-
        <p>Fetch a list of elemental types available in the
        system.</p><table><thead><tr><th>Type
        ID</th><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Prompt</td><td>AI
        prompt templates with variable
        tags</td></tr><tr><td>2</td><td>Snippet</td><td>Reusable text
        blocks</td></tr><tr><td>3</td><td>Document</td><td>Long-form
        content</td></tr></tbody></table>
  /v1/elemental/type/{type_id}/categories:
    get:
      summary: Get Type Categories
      description: >
        Returns available categories for a specific elemental type.


        ### How to Use


        Pass the elemental type ID as a path parameter to get categories for
        that type.


        | Type ID | Name |

        |---------|------|

        | 1 | Prompt |

        | 2 | Snippet |

        | 3 | Document |
      tags:
        - elemental-metadata
      operationId: getTypeCategories
      security:
        - ApiKeyAuth: []
      parameters:
        - name: type_id
          in: path
          required: true
          description: The elemental type ID (1=Prompt, 2=Snippet, 3=Document)
          schema:
            type: integer
            enum:
              - 1
              - 2
              - 3
          x-gitbook-description-html: <p>The elemental type ID (1=Prompt, 2=Snippet, 3=Document)</p>
      responses:
        '200':
          description: List of categories
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
          x-gitbook-description-html: <p>List of categories</p>
        '401':
          description: Unauthorized
          x-gitbook-description-html: <p>Unauthorized</p>
        '404':
          description: Type not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: Type not found.
          x-gitbook-description-html: <p>Type not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elemental/type/1/categories"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Returns available categories for a specific elemental
                      type.
                    marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: How to Use
                    marks: []
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Pass the elemental type ID as a path parameter to get
                      categories for that type.
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                eDFYUlGRUZsQ:
                  orderIndex: '0|hzzzqv:'
                  values:
                    HtgiUCtIsSDE: VWlPiSz0BQXB
                    EiLYWShsolkt: TI6AAi8N5cEc
                l7jgMK458dpx:
                  orderIndex: '0|hzzzz3:'
                  values:
                    HtgiUCtIsSDE: g4bXTte98pJT
                    EiLYWShsolkt: UeNztOhpvwWC
                QhSeho4dhXAX:
                  orderIndex: '0|i0001b:'
                  values:
                    HtgiUCtIsSDE: Kl2PjepGzCGi
                    EiLYWShsolkt: A60UpgStlrzi
              definition:
                HtgiUCtIsSDE:
                  id: HtgiUCtIsSDE
                  title: Type ID
                  type: text
                  textAlignment: left
                EiLYWShsolkt:
                  id: EiLYWShsolkt
                  title: Name
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - HtgiUCtIsSDE
                  - EiLYWShsolkt
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '1'
                            marks: []
                fragment: VWlPiSz0BQXB
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Prompt
                            marks: []
                fragment: TI6AAi8N5cEc
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '2'
                            marks: []
                fragment: g4bXTte98pJT
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Snippet
                            marks: []
                fragment: UeNztOhpvwWC
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '3'
                            marks: []
                fragment: Kl2PjepGzCGi
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Document
                            marks: []
                fragment: A60UpgStlrzi
                type: table-cell
      x-gitbook-description-html: >-
        <p>Returns available categories for a specific elemental
        type.</p><h3>How to Use</h3><p>Pass the elemental type ID as a path
        parameter to get categories for that type.</p><table><thead><tr><th>Type
        ID</th><th>Name</th></tr></thead><tbody><tr><td>1</td><td>Prompt</td></tr><tr><td>2</td><td>Snippet</td></tr><tr><td>3</td><td>Document</td></tr></tbody></table>
  /v1/elemental/type/category/{category_id}/topics:
    get:
      summary: Get Category Topics
      description: >
        Returns available topics for a specific category.


        {% hint style="info" %}

        Topics are required when creating prompts (type_id=1). Use this endpoint
        to get valid topic IDs.

        {% endhint %}
      tags:
        - elemental-metadata
      operationId: getCategoryTopics
      security:
        - ApiKeyAuth: []
      parameters:
        - name: category_id
          in: path
          required: true
          description: Category ID
          schema:
            type: integer
          x-gitbook-description-html: <p>Category ID</p>
      responses:
        '200':
          description: List of topics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
          x-gitbook-description-html: <p>List of topics</p>
        '401':
          description: Unauthorized
          x-gitbook-description-html: <p>Unauthorized</p>
        '404':
          description: Category not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: Category not found.
          x-gitbook-description-html: <p>Category not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elemental/type/category/1/topics"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Returns available topics for a specific category.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: info
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: >-
                          Topics are required when creating prompts (type_id=1).
                          Use this endpoint to get valid topic IDs.
                        marks: []
      x-gitbook-description-html: >-
        <p>Returns available topics for a specific category.</p><div
        data-gb-custom-block data-tag="hint" data-style="info" class="hint
        hint-info"><p>Topics are required when creating prompts (type_id=1). Use
        this endpoint to get valid topic IDs.</p></div>
  /v1/elemental/{elemental_id}:
    get:
      summary: Get Elemental by ID
      description: |
        Retrieves a specific elemental by its unique identifier.

        ### Query Parameters

        | Parameter | Type | Description |
        |-----------|------|-------------|
        | `format` | string | Output format: `text`, `markdown`, or `json` |
        | `group_by` | string | Group results by: `row` or `column` |
        | `fields` | string | Comma-separated list of fields to return |
      tags:
        - elemental-read
      operationId: getElementalById
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          description: Unique identifier of the elemental
          schema:
            type: string
          x-gitbook-description-html: <p>Unique identifier of the elemental</p>
        - name: format
          in: query
          description: Output format
          schema:
            type: string
            enum:
              - text
              - markdown
              - json
          x-gitbook-description-html: <p>Output format</p>
        - name: group_by
          in: query
          description: Group results by row or column
          schema:
            type: string
            enum:
              - row
              - column
          x-gitbook-description-html: <p>Group results by row or column</p>
        - name: fields
          in: query
          description: Comma-separated list of fields to return
          schema:
            type: string
          x-gitbook-description-html: <p>Comma-separated list of fields to return</p>
      responses:
        '200':
          description: Elemental retrieved successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        $ref: '#/components/schemas/ElementalResponse'
          x-gitbook-description-html: <p>Elemental retrieved successfully</p>
        '401':
          description: Unauthorized - You don't have access to get this elemental
          x-gitbook-description-html: <p>Unauthorized - You don't have access to get this elemental</p>
        '404':
          description: Elemental not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: Elemental(s) not found.
          x-gitbook-description-html: <p>Elemental not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elemental/abc123" \
              -H "x-api-key: YOUR_API_KEY"
        - lang: Python
          label: Python
          source: >
            import requests


            elemental_id = "abc123"

            url =
            f"https://api-integrations.snackprompt.com/v1/elemental/{elemental_id}"

            headers = {"x-api-key": "YOUR_API_KEY"}


            response = requests.get(url, headers=headers)

            print(response.json())
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves a specific elemental by its unique identifier.
                    marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Query Parameters
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                e3rUYusePXAJ:
                  orderIndex: '0|hzzzgf:'
                  values:
                    h5RPlrzf8iSG: Yfg5jRZ9KHhh
                    FXKKAn2cxSVi: EU8CDD4EMAnN
                    5R7khhfy9R7F: uNm4uxgQ9L9B
                cSiNlqzRhXSj:
                  orderIndex: '0|hzzzkf:'
                  values:
                    h5RPlrzf8iSG: oD6pv2PTVhYQ
                    FXKKAn2cxSVi: nM2JcTj0d5Eu
                    5R7khhfy9R7F: GuKNKOgtvMiE
                tTU6qSLQJEkv:
                  orderIndex: '0|hzzzz3:'
                  values:
                    h5RPlrzf8iSG: ThtJExM2Z685
                    FXKKAn2cxSVi: zp9TXce62IX0
                    5R7khhfy9R7F: CCARjS4oJ1eL
              definition:
                h5RPlrzf8iSG:
                  id: h5RPlrzf8iSG
                  title: Parameter
                  type: text
                  textAlignment: left
                FXKKAn2cxSVi:
                  id: FXKKAn2cxSVi
                  title: Type
                  type: text
                  textAlignment: left
                5R7khhfy9R7F:
                  id: 5R7khhfy9R7F
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - h5RPlrzf8iSG
                  - FXKKAn2cxSVi
                  - 5R7khhfy9R7F
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: format
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: Yfg5jRZ9KHhh
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: string
                            marks: []
                fragment: EU8CDD4EMAnN
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: 'Output format: '
                            marks: []
                          - object: leaf
                            text: text
                            marks:
                              - object: mark
                                type: code
                                data: {}
                          - object: leaf
                            text: ', '
                            marks: []
                          - object: leaf
                            text: markdown
                            marks:
                              - object: mark
                                type: code
                                data: {}
                          - object: leaf
                            text: ', or '
                            marks: []
                          - object: leaf
                            text: json
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: uNm4uxgQ9L9B
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: group_by
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: oD6pv2PTVhYQ
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: string
                            marks: []
                fragment: nM2JcTj0d5Eu
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: 'Group results by: '
                            marks: []
                          - object: leaf
                            text: row
                            marks:
                              - object: mark
                                type: code
                                data: {}
                          - object: leaf
                            text: ' or '
                            marks: []
                          - object: leaf
                            text: column
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: GuKNKOgtvMiE
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: fields
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: ThtJExM2Z685
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: string
                            marks: []
                fragment: zp9TXce62IX0
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Comma-separated list of fields to return
                            marks: []
                fragment: CCARjS4oJ1eL
                type: table-cell
      x-gitbook-description-html: >-
        <p>Retrieves a specific elemental by its unique identifier.</p><h3>Query
        Parameters</h3><table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td>string</td><td>Output
        format: <code>text</code>, <code>markdown</code>, or
        <code>json</code></td></tr><tr><td><code>group_by</code></td><td>string</td><td>Group
        results by: <code>row</code> or
        <code>column</code></td></tr><tr><td><code>fields</code></td><td>string</td><td>Comma-separated
        list of fields to return</td></tr></tbody></table>
  /v1/elementals:
    get:
      summary: Search Elementals
      description: >
        Search for elementals across the platform.


        {% hint style="info" %}

        Use the `search` parameter to find elementals by title, description, or
        template content.

        {% endhint %}
      tags:
        - elemental-read
      operationId: searchElementals
      security:
        - ApiKeyAuth: []
      parameters:
        - name: search
          in: query
          description: Search query string
          schema:
            type: string
          x-gitbook-description-html: <p>Search query string</p>
        - name: size
          in: query
          description: Number of results per page (default 4, max 100)
          schema:
            type: integer
            default: 4
            maximum: 100
          x-gitbook-description-html: <p>Number of results per page (default 4, max 100)</p>
        - name: page
          in: query
          description: Page number (default 1)
          schema:
            type: integer
            default: 1
          x-gitbook-description-html: <p>Page number (default 1)</p>
        - name: order_by
          in: query
          description: Field to order by
          schema:
            type: string
            default: created_at
          x-gitbook-description-html: <p>Field to order by</p>
        - name: order_dir
          in: query
          description: Order direction
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          x-gitbook-description-html: <p>Order direction</p>
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse'
          x-gitbook-description-html: <p>Search results</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elementals?search=marketing&size=10&page=1"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Search for elementals across the platform.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: info
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: 'Use the '
                        marks: []
                      - object: leaf
                        text: search
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' parameter to find elementals by title, description, or template content.'
                        marks: []
      x-gitbook-description-html: >-
        <p>Search for elementals across the platform.</p><div
        data-gb-custom-block data-tag="hint" data-style="info" class="hint
        hint-info"><p>Use the <code>search</code> parameter to find elementals
        by title, description, or template content.</p></div>
  /v1/elemental/{elemental_id}/file/{file_id}:
    get:
      summary: Get Elemental File
      description: Retrieves a specific file attached to an elemental.
      tags:
        - elemental-files
      operationId: getElementalFile
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          description: Elemental ID
          schema:
            type: string
          x-gitbook-description-html: <p>Elemental ID</p>
        - name: file_id
          in: path
          required: true
          description: File ID
          schema:
            type: integer
          x-gitbook-description-html: <p>File ID</p>
      responses:
        '200':
          description: File data
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        $ref: '#/components/schemas/ElementalFileResponse'
          x-gitbook-description-html: <p>File data</p>
        '400':
          description: Invalid file ID parameter
          x-gitbook-description-html: <p>Invalid file ID parameter</p>
        '401':
          description: Unauthorized
          x-gitbook-description-html: <p>Unauthorized</p>
        '403':
          description: Access forbidden
          x-gitbook-description-html: <p>Access forbidden</p>
        '404':
          description: File not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: File not found.
          x-gitbook-description-html: <p>File not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elemental/abc123/file/1"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves a specific file attached to an elemental.
                    marks: []
      x-gitbook-description-html: <p>Retrieves a specific file attached to an elemental.</p>
  /v1/elemental/{elemental_id}/tags:
    get:
      summary: Get Template Tags
      description: >
        Return all template variable tags inside an elemental (mostly used in
        prompts).


        Tags like: `#name`, `#age`, `#state`


        {% hint style="info" %}

        Use this endpoint to discover what values need to be provided before
        calling the prepare endpoint.

        {% endhint %}
      tags:
        - elemental-templates
      operationId: getTemplateTags
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          description: Elemental ID
          schema:
            type: string
          x-gitbook-description-html: <p>Elemental ID</p>
      responses:
        '200':
          description: List of template tags
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        $ref: '#/components/schemas/PlaceholdersResponse'
              example:
                code: 200
                meta:
                  version: v1.0.2
                response:
                  list:
                    - '#topic'
                    - '#tone'
                    - '#audience'
                    - '#length'
                  plaintext: '#topic #tone #audience #length'
          x-gitbook-description-html: <p>List of template tags</p>
        '401':
          description: Unauthorized
          x-gitbook-description-html: <p>Unauthorized</p>
        '404':
          description: Elemental not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: Elemental(s) not found.
          x-gitbook-description-html: <p>Elemental not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elemental/abc123/tags"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Return all template variable tags inside an elemental
                      (mostly used in prompts).
                    marks: []
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: 'Tags like: '
                    marks: []
                  - object: leaf
                    text: '#name'
                    marks:
                      - object: mark
                        type: code
                        data: {}
                  - object: leaf
                    text: ', '
                    marks: []
                  - object: leaf
                    text: '#age'
                    marks:
                      - object: mark
                        type: code
                        data: {}
                  - object: leaf
                    text: ', '
                    marks: []
                  - object: leaf
                    text: '#state'
                    marks:
                      - object: mark
                        type: code
                        data: {}
          - object: block
            type: hint
            isVoid: false
            data:
              style: info
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: >-
                          Use this endpoint to discover what values need to be
                          provided before calling the prepare endpoint.
                        marks: []
      x-gitbook-description-html: >-
        <p>Return all template variable tags inside an elemental (mostly used in
        prompts).</p><p>Tags like: <code>#name</code>, <code>#age</code>,
        <code>#state</code></p><div data-gb-custom-block data-tag="hint"
        data-style="info" class="hint hint-info"><p>Use this endpoint to
        discover what values need to be provided before calling the prepare
        endpoint.</p></div>
  /v1/elemental/{elemental_id}/template/prepare:
    post:
      summary: Prepare Template
      description: >
        Return the elemental template with replaced tags.


        {% hint style="success" %}

        This is the key endpoint for generating prompts dynamically. Pass tag
        values as key-value pairs in the request body.

        {% endhint %}


        ### Request Body Format


        ```json

        {
          "#name": "John",
          "#lastname": "Doe",
          "#topic": "artificial intelligence"
        }

        ```
      tags:
        - elemental-templates
      operationId: prepareTemplate
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          description: Elemental ID
          schema:
            type: string
          x-gitbook-description-html: <p>Elemental ID</p>
      requestBody:
        required: true
        description: Tags with their replacement values
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
              description: Key-value pairs where keys are tag names (with
              x-gitbook-description-html: <p>Key-value pairs where keys are tag names (with</p>
            example:
              '#topic': artificial intelligence
              '#tone': professional
              '#audience': business executives
              '#length': '500'
        x-gitbook-description-html: <p>Tags with their replacement values</p>
      responses:
        '200':
          description: Prepared template with replaced values
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        type: object
                        properties:
                          result:
                            type: string
                            description: The template with all tags replaced
                            x-gitbook-description-html: <p>The template with all tags replaced</p>
              example:
                code: 200
                meta:
                  version: v1.0.2
                response:
                  result: >-
                    Write a professional blog post about artificial intelligence
                    that is approximately 500 words. Target audience: business
                    executives.
          x-gitbook-description-html: <p>Prepared template with replaced values</p>
        '401':
          description: Unauthorized
          x-gitbook-description-html: <p>Unauthorized</p>
        '404':
          description: Elemental not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: Elemental(s) not found.
          x-gitbook-description-html: <p>Elemental not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST
            "https://api-integrations.snackprompt.com/v1/elemental/abc123/template/prepare"
            \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "#topic": "artificial intelligence",
                "#tone": "professional",
                "#audience": "business executives"
              }'
        - lang: Python
          label: Python
          source: >
            import requests


            url =
            "https://api-integrations.snackprompt.com/v1/elemental/abc123/template/prepare"

            headers = {
                "x-api-key": "YOUR_API_KEY",
                "Content-Type": "application/json"
            }

            payload = {
                "#topic": "artificial intelligence",
                "#tone": "professional",
                "#audience": "business executives"
            }


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

            print(response.json())
        - lang: JavaScript
          label: JavaScript
          source: >
            fetch('https://api-integrations.snackprompt.com/v1/elemental/abc123/template/prepare',
            {
              method: 'POST',
              headers: {
                'x-api-key': 'YOUR_API_KEY',
                'Content-Type': 'application/json'
              },
              body: JSON.stringify({
                '#topic': 'artificial intelligence',
                '#tone': 'professional',
                '#audience': 'business executives'
              })
            })
              .then(r => r.json())
              .then(console.log)
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Return the elemental template with replaced tags.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: success
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: >-
                          This is the key endpoint for generating prompts
                          dynamically. Pass tag values as key-value pairs in the
                          request body.
                        marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Request Body Format
                    marks: []
          - object: block
            type: code
            isVoid: false
            data:
              syntax: json
            nodes:
              - object: block
                type: code-line
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: '{'
                        marks: []
              - object: block
                type: code-line
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: '  "#name": "John",'
                        marks: []
              - object: block
                type: code-line
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: '  "#lastname": "Doe",'
                        marks: []
              - object: block
                type: code-line
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: '  "#topic": "artificial intelligence"'
                        marks: []
              - object: block
                type: code-line
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: '}'
                        marks: []
      x-gitbook-description-html: >-
        <p>Return the elemental template with replaced tags.</p><div
        data-gb-custom-block data-tag="hint" data-style="success" class="hint
        hint-success"><p>This is the key endpoint for generating prompts
        dynamically. Pass tag values as key-value pairs in the request
        body.</p></div><h3>Request Body Format</h3><pre
        class="language-json"><code class="lang-json">{
          "#name": "John",
          "#lastname": "Doe",
          "#topic": "artificial intelligence"
        }

        </code></pre>
  /v1/user/elementals:
    get:
      summary: Get User Elementals
      description: >
        Retrieves all elementals belonging to the authenticated user, filtered
        by type.


        ### Elemental Types


        | Type | Description |

        |------|-------------|

        | `prompt` | AI prompt templates with variable tags |

        | `snippet` | Reusable text blocks |

        | `document` | Long-form content |
      tags:
        - elemental-read
      operationId: getUserElementals
      security:
        - ApiKeyAuth: []
      parameters:
        - name: type
          in: query
          required: true
          description: Filter by elemental type
          schema:
            type: string
            enum:
              - prompt
              - snippet
              - document
          x-gitbook-description-html: <p>Filter by elemental type</p>
        - name: size
          in: query
          schema:
            type: integer
            default: 4
            maximum: 100
        - name: page
          in: query
          schema:
            type: integer
            default: 1
      responses:
        '200':
          description: List of user elementals
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse'
          x-gitbook-description-html: <p>List of user elementals</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/user/elementals?type=prompt"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Retrieves all elementals belonging to the authenticated
                      user, filtered by type.
                    marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Elemental Types
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                xbk2TfDBiGxh:
                  orderIndex: '0|hzzzan:'
                  values:
                    1FRhnDVv7U57: A76LPLmjk5aT
                    zYt9HejX9wdS: uDEOH7n5eq17
                qVnd8vS2zjpo:
                  orderIndex: '0|hzzzyn:'
                  values:
                    1FRhnDVv7U57: v4Fnl5KKDX9c
                    zYt9HejX9wdS: 8mJO0FQiUBLr
                czBm4BfkaoYb:
                  orderIndex: '0|i000nj:'
                  values:
                    1FRhnDVv7U57: rydsGJSyNha9
                    zYt9HejX9wdS: 7Nu6WoPw7gBl
              definition:
                1FRhnDVv7U57:
                  id: 1FRhnDVv7U57
                  title: Type
                  type: text
                  textAlignment: left
                zYt9HejX9wdS:
                  id: zYt9HejX9wdS
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - 1FRhnDVv7U57
                  - zYt9HejX9wdS
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: prompt
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: A76LPLmjk5aT
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: AI prompt templates with variable tags
                            marks: []
                fragment: uDEOH7n5eq17
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: snippet
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: v4Fnl5KKDX9c
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Reusable text blocks
                            marks: []
                fragment: 8mJO0FQiUBLr
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: document
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: rydsGJSyNha9
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Long-form content
                            marks: []
                fragment: 7Nu6WoPw7gBl
                type: table-cell
      x-gitbook-description-html: >-
        <p>Retrieves all elementals belonging to the authenticated user,
        filtered by type.</p><h3>Elemental
        Types</h3><table><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>prompt</code></td><td>AI
        prompt templates with variable
        tags</td></tr><tr><td><code>snippet</code></td><td>Reusable text
        blocks</td></tr><tr><td><code>document</code></td><td>Long-form
        content</td></tr></tbody></table>
    post:
      summary: Create Multiple Elementals
      description: >
        Creates multiple elementals in a single request.


        {% hint style="info" %}

        Returns `201 Created` if all succeed, or `206 Partial Content` if some
        fail.

        {% endhint %}
      tags:
        - elemental-create
      operationId: createMultipleElementals
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ElementalPayload'
      responses:
        '201':
          description: All elementals created successfully
          x-gitbook-description-html: <p>All elementals created successfully</p>
        '206':
          description: Partial success - some elementals created
          x-gitbook-description-html: <p>Partial success - some elementals created</p>
        '400':
          description: Invalid request body
          x-gitbook-description-html: <p>Invalid request body</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST
            "https://api-integrations.snackprompt.com/v1/user/elementals" \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '[
                {"title": "Prompt 1", "type_id": 1, "template": "Write about #topic", "category_id": 1, "topic_ids": [1]},
                {"title": "Prompt 2", "type_id": 1, "template": "Create a #style post", "category_id": 1, "topic_ids": [1]}
              ]'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Creates multiple elementals in a single request.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: info
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: 'Returns '
                        marks: []
                      - object: leaf
                        text: 201 Created
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' if all succeed, or '
                        marks: []
                      - object: leaf
                        text: 206 Partial Content
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' if some fail.'
                        marks: []
      x-gitbook-description-html: >-
        <p>Creates multiple elementals in a single request.</p><div
        data-gb-custom-block data-tag="hint" data-style="info" class="hint
        hint-info"><p>Returns <code>201 Created</code> if all succeed, or
        <code>206 Partial Content</code> if some fail.</p></div>
    delete:
      summary: Delete Multiple Elementals
      description: Deletes multiple elementals by their IDs.
      tags:
        - elemental-delete
      operationId: deleteMultipleElementals
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - elemental_ids
              properties:
                elemental_ids:
                  type: array
                  items:
                    type: string
                  description: Array of elemental IDs to delete
                  x-gitbook-description-html: <p>Array of elemental IDs to delete</p>
            example:
              elemental_ids:
                - uuid-1
                - uuid-2
                - uuid-3
      responses:
        '204':
          description: Elementals deleted successfully
          x-gitbook-description-html: <p>Elementals deleted successfully</p>
        '403':
          description: You don't have access to edit/delete this elemental
          x-gitbook-description-html: <p>You don't have access to edit/delete this elemental</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X DELETE
            "https://api-integrations.snackprompt.com/v1/user/elementals" \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"elemental_ids": ["uuid-1", "uuid-2"]}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes multiple elementals by their IDs.
                    marks: []
      x-gitbook-description-html: <p>Deletes multiple elementals by their IDs.</p>
  /v1/user/elementals/summary:
    get:
      summary: Get User Elementals Summary
      description: Returns a summary/key-value list of the user's elementals by type.
      tags:
        - elemental-read
      operationId: getUserElementalsSummary
      security:
        - ApiKeyAuth: []
      parameters:
        - name: type
          in: query
          required: true
          schema:
            type: string
            enum:
              - prompt
              - snippet
              - document
      responses:
        '200':
          description: Summary of user elementals
          x-gitbook-description-html: <p>Summary of user elementals</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/user/elementals/summary?type=prompt"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Returns a summary/key-value list of the user's elementals
                      by type.
                    marks: []
      x-gitbook-description-html: >-
        <p>Returns a summary/key-value list of the user's elementals by
        type.</p>
  /v1/user/elemental:
    post:
      summary: Create Elemental
      description: >
        Creates a new elemental (prompt, snippet, or document).


        {% hint style="info" %}

        **Template Tags**

        For prompts, use `#` prefix for variable tags (e.g., `#topic`,
        `#style`). These can be replaced dynamically using the prepare endpoint.

        {% endhint %}


        ### Required Fields


        | Field | Type | Description |

        |-------|------|-------------|

        | `title` | string | Title (10-100 characters, must contain at least one
        letter) |

        | `type_id` | integer | 1=Prompt, 2=Snippet, 3=Document |

        | `template` | string | Content/template text (required for all types) |

        | `category_id` | integer | Category ID |

        | `topic_ids` | array | Array of topic IDs (required for prompts only) |


        ### Validation Rules


        - **Title**: Must be 10-100 characters, contain at least one letter

        - **Template/Body Content**: Required for prompt, snippet, or document
        types

        - **Topic**: Required for prompt type elementals

        - **Snippets**: Title must be unique per user
      tags:
        - elemental-create
      operationId: createElemental
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ElementalPayload'
            example:
              title: Blog Post Generator
              type_id: 1
              template: >-
                Write a #tone blog post about #topic that is approximately
                #length words. Target audience: #audience.
              description: A flexible prompt for generating blog posts
              category_id: 1
              topic_ids:
                - 1
                - 2
              visibility: 1
      responses:
        '201':
          description: Elemental created successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        $ref: '#/components/schemas/ElementalResponse'
          x-gitbook-description-html: <p>Elemental created successfully</p>
        '400':
          description: >
            Invalid request body. Possible errors:

            - Title is invalid, it should be between 10 and 100 and contain
            least one letter

            - Elemental type_id is required

            - Elemental type_id is invalid
          x-gitbook-description-html: >-
            <p>Invalid request body. Possible errors:</p>

            <ul>

            <li>Title is invalid, it should be between 10 and 100 and contain
            least one letter</li>

            <li>Elemental type_id is required</li>

            <li>Elemental type_id is invalid</li>

            </ul>
        '403':
          description: |
            Forbidden:
            - Snippet title is not unique
            - Your Stripe account is incomplete (for premium content)
          x-gitbook-description-html: |-
            <p>Forbidden:</p>
            <ul>
            <li>Snippet title is not unique</li>
            <li>Your Stripe account is incomplete (for premium content)</li>
            </ul>
        '422':
          description: >
            Validation error:

            - Item of prompt type must have a topic

            - The body content is required for items of type: prompt, snippet,
            or document
          x-gitbook-description-html: >-
            <p>Validation error:</p>

            <ul>

            <li>Item of prompt type must have a topic</li>

            <li>The body content is required for items of type: prompt, snippet,
            or document</li>

            </ul>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST
            "https://api-integrations.snackprompt.com/v1/user/elemental" \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "title": "Blog Post Generator",
                "type_id": 1,
                "template": "Write a #tone blog post about #topic",
                "category_id": 1,
                "topic_ids": [1, 2],
                "visibility": 1
              }'
        - lang: Python
          label: Python
          source: |
            import requests

            url = "https://api-integrations.snackprompt.com/v1/user/elemental"
            headers = {
                "x-api-key": "YOUR_API_KEY",
                "Content-Type": "application/json"
            }
            payload = {
                "title": "Blog Post Generator",
                "type_id": 1,
                "template": "Write a #tone blog post about #topic",
                "category_id": 1,
                "topic_ids": [1, 2],
                "visibility": 1
            }

            response = requests.post(url, headers=headers, json=payload)
            print(response.json())
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Creates a new elemental (prompt, snippet, or document).
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: info
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Template Tags
                        marks:
                          - object: mark
                            type: bold
                            data: {}
                      - object: leaf
                        text: ' For prompts, use '
                        marks: []
                      - object: leaf
                        text: '#'
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' prefix for variable tags (e.g., '
                        marks: []
                      - object: leaf
                        text: '#topic'
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ', '
                        marks: []
                      - object: leaf
                        text: '#style'
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: >-
                          ). These can be replaced dynamically using the prepare
                          endpoint.
                        marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Required Fields
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                3wcbNjZ9nSYq:
                  orderIndex: '0|hzzznr:'
                  values:
                    kkKqQMJQsdMc: S2dr5H31zyBi
                    mSz5jiEJabQE: FLUuYs5HpmTq
                    GhuSPsjgaCgC: NOcBebX4D3Et
                TXC9NV32ULVx:
                  orderIndex: '0|hzzzuv:'
                  values:
                    kkKqQMJQsdMc: LMeF6EsCtuZf
                    mSz5jiEJabQE: PWKmuU5OM6EK
                    GhuSPsjgaCgC: EX7Yma8NCMxj
                Ze9OiiPR4Pac:
                  orderIndex: '0|i000jz:'
                  values:
                    kkKqQMJQsdMc: Rdb5XaiHcdy0
                    mSz5jiEJabQE: 7vyoH6gp3BIb
                    GhuSPsjgaCgC: gnYAUqIbbf47
                whR0aZKMnM9i:
                  orderIndex: '0|i0018n:'
                  values:
                    kkKqQMJQsdMc: KpBdb1BxaNqb
                    mSz5jiEJabQE: gXLX8Rk0STne
                    GhuSPsjgaCgC: d8xEVMl6Vdj7
                G87kgqaGuNAD:
                  orderIndex: '0|i00233:'
                  values:
                    kkKqQMJQsdMc: ZHgRcqDu7AjG
                    mSz5jiEJabQE: yeDLZIhEPF4S
                    GhuSPsjgaCgC: ncbdJdbHskNY
              definition:
                kkKqQMJQsdMc:
                  id: kkKqQMJQsdMc
                  title: Field
                  type: text
                  textAlignment: left
                mSz5jiEJabQE:
                  id: mSz5jiEJabQE
                  title: Type
                  type: text
                  textAlignment: left
                GhuSPsjgaCgC:
                  id: GhuSPsjgaCgC
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - kkKqQMJQsdMc
                  - mSz5jiEJabQE
                  - GhuSPsjgaCgC
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: title
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: S2dr5H31zyBi
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: string
                            marks: []
                fragment: FLUuYs5HpmTq
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: >-
                              Title (10-100 characters, must contain at least
                              one letter)
                            marks: []
                fragment: NOcBebX4D3Et
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: type_id
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: LMeF6EsCtuZf
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: integer
                            marks: []
                fragment: PWKmuU5OM6EK
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: 1=Prompt, 2=Snippet, 3=Document
                            marks: []
                fragment: EX7Yma8NCMxj
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: template
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: Rdb5XaiHcdy0
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: string
                            marks: []
                fragment: 7vyoH6gp3BIb
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Content/template text (required for all types)
                            marks: []
                fragment: gnYAUqIbbf47
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: category_id
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: KpBdb1BxaNqb
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: integer
                            marks: []
                fragment: gXLX8Rk0STne
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Category ID
                            marks: []
                fragment: d8xEVMl6Vdj7
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: topic_ids
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: ZHgRcqDu7AjG
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: array
                            marks: []
                fragment: yeDLZIhEPF4S
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Array of topic IDs (required for prompts only)
                            marks: []
                fragment: ncbdJdbHskNY
                type: table-cell
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Validation Rules
                    marks: []
          - object: block
            type: list-unordered
            isVoid: false
            data: {}
            nodes:
              - object: block
                type: list-item
                isVoid: false
                data: {}
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Title
                            marks:
                              - object: mark
                                type: bold
                                data: {}
                          - object: leaf
                            text: >-
                              : Must be 10-100 characters, contain at least one
                              letter
                            marks: []
              - object: block
                type: list-item
                isVoid: false
                data: {}
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Template/Body Content
                            marks:
                              - object: mark
                                type: bold
                                data: {}
                          - object: leaf
                            text: ': Required for prompt, snippet, or document types'
                            marks: []
              - object: block
                type: list-item
                isVoid: false
                data: {}
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Topic
                            marks:
                              - object: mark
                                type: bold
                                data: {}
                          - object: leaf
                            text: ': Required for prompt type elementals'
                            marks: []
              - object: block
                type: list-item
                isVoid: false
                data: {}
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Snippets
                            marks:
                              - object: mark
                                type: bold
                                data: {}
                          - object: leaf
                            text: ': Title must be unique per user'
                            marks: []
      x-gitbook-description-html: >-
        <p>Creates a new elemental (prompt, snippet, or document).</p><div
        data-gb-custom-block data-tag="hint" data-style="info" class="hint
        hint-info"><p><strong>Template Tags</strong> For prompts, use
        <code>#</code> prefix for variable tags (e.g., <code>#topic</code>,
        <code>#style</code>). These can be replaced dynamically using the
        prepare endpoint.</p></div><h3>Required
        Fields</h3><table><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td>string</td><td>Title
        (10-100 characters, must contain at least one
        letter)</td></tr><tr><td><code>type_id</code></td><td>integer</td><td>1=Prompt,
        2=Snippet,
        3=Document</td></tr><tr><td><code>template</code></td><td>string</td><td>Content/template
        text (required for all
        types)</td></tr><tr><td><code>category_id</code></td><td>integer</td><td>Category
        ID</td></tr><tr><td><code>topic_ids</code></td><td>array</td><td>Array
        of topic IDs (required for prompts
        only)</td></tr></tbody></table><h3>Validation
        Rules</h3><ul><li><strong>Title</strong>: Must be 10-100 characters,
        contain at least one letter</li><li><strong>Template/Body
        Content</strong>: Required for prompt, snippet, or document
        types</li><li><strong>Topic</strong>: Required for prompt type
        elementals</li><li><strong>Snippets</strong>: Title must be unique per
        user</li></ul>
  /v1/user/elemental/{elemental_id}:
    put:
      summary: Update Elemental
      description: Updates an existing elemental. Only include fields you want to update.
      tags:
        - elemental-update
      operationId: updateElemental
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ElementalPayload'
            example:
              id: elemental-uuid-here
              title: Updated Blog Post Generator
              template: 'Write a #tone blog post about #topic with #length words.'
      responses:
        '200':
          description: Elemental updated successfully
          x-gitbook-description-html: <p>Elemental updated successfully</p>
        '403':
          description: You don't have access to edit/delete this elemental
          x-gitbook-description-html: <p>You don't have access to edit/delete this elemental</p>
        '404':
          description: Elemental not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: Elemental(s) not found.
          x-gitbook-description-html: <p>Elemental not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X PUT
            "https://api-integrations.snackprompt.com/v1/user/elemental/abc123"
            \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"id": "abc123", "title": "Updated Title"}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Updates an existing elemental. Only include fields you
                      want to update.
                    marks: []
      x-gitbook-description-html: >-
        <p>Updates an existing elemental. Only include fields you want to
        update.</p>
    delete:
      summary: Delete Elemental
      description: Deletes a specific elemental.
      tags:
        - elemental-delete
      operationId: deleteElemental
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Elemental deleted successfully
          x-gitbook-description-html: <p>Elemental deleted successfully</p>
        '403':
          description: You don't have access to edit/delete this elemental
          x-gitbook-description-html: <p>You don't have access to edit/delete this elemental</p>
        '404':
          description: Elemental not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: Elemental(s) not found.
          x-gitbook-description-html: <p>Elemental not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X DELETE
            "https://api-integrations.snackprompt.com/v1/user/elemental/abc123"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes a specific elemental.
                    marks: []
      x-gitbook-description-html: <p>Deletes a specific elemental.</p>
  /v1/user/elemental/{elemental_id}/files:
    post:
      summary: Upload Files to Elemental
      description: |
        Uploads files to an elemental.

        ### File Limits

        | Type | Max Count | Description |
        |------|-----------|-------------|
        | `images` | 4 | Regular images |
        | `cover_images` | 4 | Featured/cover images |
        | `avatar` | 1 | Main avatar/icon |
        | `files` | 3 per request, 15 total | Document attachments |
      tags:
        - elemental-files
      operationId: uploadFiles
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUploadRequest'
      responses:
        '201':
          description: Files uploaded successfully
          x-gitbook-description-html: <p>Files uploaded successfully</p>
        '403':
          description: |
            Forbidden:
            - You can send a maximum of 3 files at a time
            - You can only add 15 files total
            - You can only have 4 images and 4 cover images
          x-gitbook-description-html: |-
            <p>Forbidden:</p>
            <ul>
            <li>You can send a maximum of 3 files at a time</li>
            <li>You can only add 15 files total</li>
            <li>You can only have 4 images and 4 cover images</li>
            </ul>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST
            "https://api-integrations.snackprompt.com/v1/user/elemental/abc123/files"
            \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "images": [{
                  "file_name": "screenshot.png",
                  "file_buffer": {"type": "Buffer", "data": []}
                }]
              }'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Uploads files to an elemental.
                    marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: File Limits
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                ouH7QJ3ggZ9Q:
                  orderIndex: '0|hzzzxj:'
                  values:
                    08eSWdyPmlOb: VRvsmz4XXYhr
                    KqTwpjxavS2J: uMEGOAy3D6HO
                    yfh4mmueWnxd: tOaMQVTRYplk
                tTiqHxCdSHj1:
                  orderIndex: '0|i000br:'
                  values:
                    08eSWdyPmlOb: jFfv2uXVPHOX
                    KqTwpjxavS2J: 32lUErPm2CJs
                    yfh4mmueWnxd: DsbGUdZdv9j0
                HdOd14gvnxUs:
                  orderIndex: '0|i000vr:'
                  values:
                    08eSWdyPmlOb: u4cmuN5QYbbo
                    KqTwpjxavS2J: 8c3JrKtkmk43
                    yfh4mmueWnxd: JVAi5mqZatRZ
                M9HCsg7LiH7q:
                  orderIndex: '0|i001iv:'
                  values:
                    08eSWdyPmlOb: HsoukBcBrH8e
                    KqTwpjxavS2J: fe3eHBDIsWqF
                    yfh4mmueWnxd: WpJlsrPxwFW0
              definition:
                08eSWdyPmlOb:
                  id: 08eSWdyPmlOb
                  title: Type
                  type: text
                  textAlignment: left
                KqTwpjxavS2J:
                  id: KqTwpjxavS2J
                  title: Max Count
                  type: text
                  textAlignment: left
                yfh4mmueWnxd:
                  id: yfh4mmueWnxd
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - 08eSWdyPmlOb
                  - KqTwpjxavS2J
                  - yfh4mmueWnxd
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: images
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: VRvsmz4XXYhr
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '4'
                            marks: []
                fragment: uMEGOAy3D6HO
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Regular images
                            marks: []
                fragment: tOaMQVTRYplk
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: cover_images
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: jFfv2uXVPHOX
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '4'
                            marks: []
                fragment: 32lUErPm2CJs
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Featured/cover images
                            marks: []
                fragment: DsbGUdZdv9j0
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: avatar
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: u4cmuN5QYbbo
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '1'
                            marks: []
                fragment: 8c3JrKtkmk43
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Main avatar/icon
                            marks: []
                fragment: JVAi5mqZatRZ
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: files
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: HsoukBcBrH8e
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: 3 per request, 15 total
                            marks: []
                fragment: fe3eHBDIsWqF
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Document attachments
                            marks: []
                fragment: WpJlsrPxwFW0
                type: table-cell
      x-gitbook-description-html: >-
        <p>Uploads files to an elemental.</p><h3>File
        Limits</h3><table><thead><tr><th>Type</th><th>Max
        Count</th><th>Description</th></tr></thead><tbody><tr><td><code>images</code></td><td>4</td><td>Regular
        images</td></tr><tr><td><code>cover_images</code></td><td>4</td><td>Featured/cover
        images</td></tr><tr><td><code>avatar</code></td><td>1</td><td>Main
        avatar/icon</td></tr><tr><td><code>files</code></td><td>3 per request,
        15 total</td><td>Document attachments</td></tr></tbody></table>
    delete:
      summary: Delete Files from Elemental
      description: Deletes specific files from an elemental by their IDs.
      tags:
        - elemental-files
      operationId: deleteFiles
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileDeleteRequest'
            example:
              images:
                - 1
                - 2
              files:
                - 3
      responses:
        '204':
          description: Files deleted successfully
          x-gitbook-description-html: <p>Files deleted successfully</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X DELETE
            "https://api-integrations.snackprompt.com/v1/user/elemental/abc123/files"
            \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"images": [1, 2]}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes specific files from an elemental by their IDs.
                    marks: []
      x-gitbook-description-html: <p>Deletes specific files from an elemental by their IDs.</p>
  /v1/elemental/{elemental_id}/favorite:
    post:
      summary: Favorite Elemental
      description: Adds an elemental to the user's favorites.
      tags:
        - elemental-favorites
      operationId: favoriteElemental
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Elemental favorited
          x-gitbook-description-html: <p>Elemental favorited</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST
            "https://api-integrations.snackprompt.com/v1/elemental/abc123/favorite"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Adds an elemental to the user's favorites.
                    marks: []
      x-gitbook-description-html: <p>Adds an elemental to the user's favorites.</p>
    delete:
      summary: Unfavorite Elemental
      description: Removes an elemental from the user's favorites.
      tags:
        - elemental-favorites
      operationId: unfavoriteElemental
      security:
        - ApiKeyAuth: []
      parameters:
        - name: elemental_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Elemental unfavorited
          x-gitbook-description-html: <p>Elemental unfavorited</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X DELETE
            "https://api-integrations.snackprompt.com/v1/elemental/abc123/favorite"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Removes an elemental from the user's favorites.
                    marks: []
      x-gitbook-description-html: <p>Removes an elemental from the user's favorites.</p>
  /v1/user/elemental/{id}/tag/{tag_id}:
    post:
      summary: Add Tag to Elemental
      description: Applies a user tag to an elemental.
      tags:
        - tags
      operationId: addTagToElemental
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Elemental ID
          schema:
            type: string
          x-gitbook-description-html: <p>Elemental ID</p>
        - name: tag_id
          in: path
          required: true
          description: Tag ID
          schema:
            type: integer
          x-gitbook-description-html: <p>Tag ID</p>
      responses:
        '200':
          description: Tag added to elemental
          x-gitbook-description-html: <p>Tag added to elemental</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST
            "https://api-integrations.snackprompt.com/v1/user/elemental/abc123/tag/1"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Applies a user tag to an elemental.
                    marks: []
      x-gitbook-description-html: <p>Applies a user tag to an elemental.</p>
    delete:
      summary: Remove Tag from Elemental
      description: Removes a tag from an elemental.
      tags:
        - tags
      operationId: removeTagFromElemental
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: tag_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Tag removed from elemental
          x-gitbook-description-html: <p>Tag removed from elemental</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X DELETE
            "https://api-integrations.snackprompt.com/v1/user/elemental/abc123/tag/1"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Removes a tag from an elemental.
                    marks: []
      x-gitbook-description-html: <p>Removes a tag from an elemental.</p>
  /v1/list/{list_id}:
    get:
      summary: Get List by ID
      description: Retrieves a specific list with optional expanded items.
      tags:
        - lists
      operationId: getListById
      security:
        - ApiKeyAuth: []
      parameters:
        - name: list_id
          in: path
          required: true
          schema:
            type: string
        - name: format
          in: query
          schema:
            type: string
            enum:
              - text
              - markdown
              - json
        - name: expand_items
          in: query
          description: Include full elemental details
          schema:
            type: boolean
          x-gitbook-description-html: <p>Include full elemental details</p>
      responses:
        '200':
          description: List details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        $ref: '#/components/schemas/ListResponse'
          x-gitbook-description-html: <p>List details</p>
        '403':
          description: You don't have access to this premium list
          x-gitbook-description-html: <p>You don't have access to this premium list</p>
        '404':
          description: List not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
              example:
                code: 404
                meta:
                  version: v1.0.2
                  is_authenticaded: false
                error_message: List not found.
          x-gitbook-description-html: <p>List not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/list/list123?expand_items=true"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves a specific list with optional expanded items.
                    marks: []
      x-gitbook-description-html: <p>Retrieves a specific list with optional expanded items.</p>
  /v1/list/{list_id}/items:
    get:
      summary: Get List Items
      description: Retrieves paginated items from a list.
      tags:
        - lists
      operationId: getListItems
      security:
        - ApiKeyAuth: []
      parameters:
        - name: list_id
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: size
          in: query
          schema:
            type: integer
            default: 4
            maximum: 100
      responses:
        '200':
          description: List items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse'
          x-gitbook-description-html: <p>List items</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/list/list123/items?page=1&size=10"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves paginated items from a list.
                    marks: []
      x-gitbook-description-html: <p>Retrieves paginated items from a list.</p>
  /v1/lists:
    get:
      summary: Search Lists
      description: Search for lists across the platform.
      tags:
        - lists
      operationId: searchLists
      security:
        - ApiKeyAuth: []
      parameters:
        - name: search
          in: query
          schema:
            type: string
        - name: size
          in: query
          schema:
            type: integer
            default: 4
        - name: page
          in: query
          schema:
            type: integer
            default: 1
      responses:
        '200':
          description: Search results
          x-gitbook-description-html: <p>Search results</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/lists?search=marketing"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Search for lists across the platform.
                    marks: []
      x-gitbook-description-html: <p>Search for lists across the platform.</p>
  /v1/user/lists:
    get:
      summary: Get User Lists
      description: Retrieves all lists belonging to the authenticated user.
      tags:
        - lists
      operationId: getUserLists
      security:
        - ApiKeyAuth: []
      responses:
        '200':
          description: User's lists
          x-gitbook-description-html: <p>User's lists</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET "https://api-integrations.snackprompt.com/v1/user/lists"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves all lists belonging to the authenticated user.
                    marks: []
      x-gitbook-description-html: <p>Retrieves all lists belonging to the authenticated user.</p>
  /v1/user/list:
    post:
      summary: Create List
      description: Creates a new list for organizing elementals.
      tags:
        - lists
      operationId: createList
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListRequest'
            example:
              title: Marketing Prompts
              description: Collection of prompts for marketing content
              visibility: 1
      responses:
        '201':
          description: List created
          x-gitbook-description-html: <p>List created</p>
        '400':
          description: Missing body or invalid request
          x-gitbook-description-html: <p>Missing body or invalid request</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST "https://api-integrations.snackprompt.com/v1/user/list"
            \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"title": "Marketing Prompts", "description": "Collection for marketing", "visibility": 1}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Creates a new list for organizing elementals.
                    marks: []
      x-gitbook-description-html: <p>Creates a new list for organizing elementals.</p>
  /v1/user/list/{list_id}:
    put:
      summary: Update List
      description: Updates an existing list.
      tags:
        - lists
      operationId: updateList
      security:
        - ApiKeyAuth: []
      parameters:
        - name: list_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListRequest'
            example:
              title: Updated List Name
      responses:
        '200':
          description: List updated
          x-gitbook-description-html: <p>List updated</p>
        '403':
          description: You don't have access to edit/delete this list
          x-gitbook-description-html: <p>You don't have access to edit/delete this list</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X PUT
            "https://api-integrations.snackprompt.com/v1/user/list/list123" \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"title": "Updated Name"}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Updates an existing list.
                    marks: []
      x-gitbook-description-html: <p>Updates an existing list.</p>
  /v1/user/list/{list_id}/elementals:
    delete:
      summary: Remove Elementals from List
      description: Removes specified elementals from a list.
      tags:
        - lists
      operationId: removeFromList
      security:
        - ApiKeyAuth: []
      parameters:
        - name: list_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                item_ids:
                  type: array
                  items:
                    type: object
                    properties:
                      elemental_id:
                        type: string
            example:
              item_ids:
                - elemental_id: abc123
      responses:
        '204':
          description: Elementals removed from list
          x-gitbook-description-html: <p>Elementals removed from list</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X DELETE
            "https://api-integrations.snackprompt.com/v1/user/list/list123/elementals"
            \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"item_ids": [{"elemental_id": "abc123"}]}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Removes specified elementals from a list.
                    marks: []
      x-gitbook-description-html: <p>Removes specified elementals from a list.</p>
  /v1/user/tags:
    get:
      summary: Get User Tags
      description: Retrieves all tags created by the authenticated user.
      tags:
        - tags
      operationId: getUserTags
      security:
        - ApiKeyAuth: []
      responses:
        '200':
          description: User's tags
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        type: array
                        items:
                          $ref: '#/components/schemas/TagResponse'
          x-gitbook-description-html: <p>User's tags</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET "https://api-integrations.snackprompt.com/v1/user/tags"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves all tags created by the authenticated user.
                    marks: []
      x-gitbook-description-html: <p>Retrieves all tags created by the authenticated user.</p>
    post:
      summary: Create Tag
      description: |
        Creates a new tag for categorizing elementals.

        ### Required Fields

        | Field | Type | Description |
        |-------|------|-------------|
        | `title` | string | Tag name |
        | `color` | string | Hex color code (e.g., "#FF5733") |
        | `elementalTypeId` | integer | Elemental type this tag applies to |
      tags:
        - tags
      operationId: createTag
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTagRequest'
            example:
              title: Favorites
              color: '#FF5733'
              description: My favorite prompts
              elementalTypeId: 1
      responses:
        '201':
          description: Tag created
          x-gitbook-description-html: <p>Tag created</p>
        '400':
          description: Body should not be empty or error creating tag
          x-gitbook-description-html: <p>Body should not be empty or error creating tag</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST "https://api-integrations.snackprompt.com/v1/user/tags"
            \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"title": "Favorites", "color": "#FF5733", "description": "My favorites", "elementalTypeId": 1}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Creates a new tag for categorizing elementals.
                    marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Required Fields
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                tDRA7ZT69WkU:
                  orderIndex: '0|hzzzmv:'
                  values:
                    dF8LQlBxQ5BZ: HcQbMlyzthZe
                    iG13mE6SdIHe: RvYXNjKYb17q
                    swYGfSWp7d4B: CAafj2E6iwos
                oXuyXZj12C3S:
                  orderIndex: '0|hzzzrz:'
                  values:
                    dF8LQlBxQ5BZ: fZfxhb4Az1VO
                    iG13mE6SdIHe: OzNdpmpzJ55e
                    swYGfSWp7d4B: 6j6daixmhvZ9
                44UqC5rsHvF2:
                  orderIndex: '0|i0002n:'
                  values:
                    dF8LQlBxQ5BZ: pvTivfIRLTzw
                    iG13mE6SdIHe: ZL6HjhTPEIu5
                    swYGfSWp7d4B: AbzP76Fl4VRq
              definition:
                dF8LQlBxQ5BZ:
                  id: dF8LQlBxQ5BZ
                  title: Field
                  type: text
                  textAlignment: left
                iG13mE6SdIHe:
                  id: iG13mE6SdIHe
                  title: Type
                  type: text
                  textAlignment: left
                swYGfSWp7d4B:
                  id: swYGfSWp7d4B
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - dF8LQlBxQ5BZ
                  - iG13mE6SdIHe
                  - swYGfSWp7d4B
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: title
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: HcQbMlyzthZe
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: string
                            marks: []
                fragment: RvYXNjKYb17q
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Tag name
                            marks: []
                fragment: CAafj2E6iwos
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: color
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: fZfxhb4Az1VO
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: string
                            marks: []
                fragment: OzNdpmpzJ55e
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Hex color code (e.g., "#FF5733")
                            marks: []
                fragment: 6j6daixmhvZ9
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: elementalTypeId
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: pvTivfIRLTzw
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: integer
                            marks: []
                fragment: ZL6HjhTPEIu5
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Elemental type this tag applies to
                            marks: []
                fragment: AbzP76Fl4VRq
                type: table-cell
      x-gitbook-description-html: >-
        <p>Creates a new tag for categorizing elementals.</p><h3>Required
        Fields</h3><table><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td>string</td><td>Tag
        name</td></tr><tr><td><code>color</code></td><td>string</td><td>Hex
        color code (e.g.,
        "#FF5733")</td></tr><tr><td><code>elementalTypeId</code></td><td>integer</td><td>Elemental
        type this tag applies to</td></tr></tbody></table>
  /v1/user/tags/all:
    get:
      summary: Get All Tags
      description: Retrieves all tags including system tags.
      tags:
        - tags
      operationId: getAllTags
      security:
        - ApiKeyAuth: []
      responses:
        '200':
          description: All available tags
          x-gitbook-description-html: <p>All available tags</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/user/tags/all" \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves all tags including system tags.
                    marks: []
      x-gitbook-description-html: <p>Retrieves all tags including system tags.</p>
  /v1/user/tags/{id}:
    get:
      summary: Get Tag by ID
      description: Retrieves a specific tag by ID.
      tags:
        - tags
      operationId: getTagById
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Tag details
          x-gitbook-description-html: <p>Tag details</p>
        '204':
          description: Tag not found
          x-gitbook-description-html: <p>Tag not found</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/user/tags/1" \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves a specific tag by ID.
                    marks: []
      x-gitbook-description-html: <p>Retrieves a specific tag by ID.</p>
    put:
      summary: Update Tag
      description: Updates an existing tag.
      tags:
        - tags
      operationId: updateTag
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                color:
                  type: string
                description:
                  type: string
            example:
              title: Updated Tag
              color: '#00FF00'
      responses:
        '200':
          description: Tag updated
          x-gitbook-description-html: <p>Tag updated</p>
        '400':
          description: Error updating tag
          x-gitbook-description-html: <p>Error updating tag</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X PUT
            "https://api-integrations.snackprompt.com/v1/user/tags/1" \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"title": "Updated Tag", "color": "#00FF00"}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Updates an existing tag.
                    marks: []
      x-gitbook-description-html: <p>Updates an existing tag.</p>
    delete:
      summary: Delete Tag
      description: Deletes a tag.
      tags:
        - tags
      operationId: deleteTag
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: Tag deleted
          x-gitbook-description-html: <p>Tag deleted</p>
        '400':
          description: Error deleting tag
          x-gitbook-description-html: <p>Error deleting tag</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X DELETE
            "https://api-integrations.snackprompt.com/v1/user/tags/1" \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes a tag.
                    marks: []
      x-gitbook-description-html: <p>Deletes a tag.</p>
  /v1/user/tags/{id}/items:
    get:
      summary: Get Tag Items
      description: Retrieves all elementals with a specific tag.
      tags:
        - tags
      operationId: getTagItems
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Elementals with this tag
          x-gitbook-description-html: <p>Elementals with this tag</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/user/tags/1/items" \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Retrieves all elementals with a specific tag.
                    marks: []
      x-gitbook-description-html: <p>Retrieves all elementals with a specific tag.</p>
  /v1/elemental/{id}/knowledge-base:
    get:
      summary: Compile Knowledge Base (Elemental)
      description: >
        Compiles an elemental's data into an AI-ready format.


        {% hint style="success" %}

        Use this to export prompts and content in formats suitable for AI
        training, RAG systems, or documentation.

        {% endhint %}


        ### Output Formats


        | Format | Description |

        |--------|-------------|

        | `text` | Plain text output |

        | `markdown` | Markdown formatted |

        | `json` | Structured JSON |
      tags:
        - knowledge-base
      operationId: compileElementalKnowledgeBase
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: format
          in: query
          schema:
            type: string
            enum:
              - text
              - markdown
              - json
            default: text
        - name: group_by
          in: query
          schema:
            type: string
            enum:
              - row
              - column
        - name: fields
          in: query
          description: Comma-separated list of fields to include
          schema:
            type: string
          x-gitbook-description-html: <p>Comma-separated list of fields to include</p>
      responses:
        '200':
          description: Compiled knowledge base data
          x-gitbook-description-html: <p>Compiled knowledge base data</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/elemental/abc123/knowledge-base?format=markdown"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Compiles an elemental's data into an AI-ready format.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: success
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: >-
                          Use this to export prompts and content in formats
                          suitable for AI training, RAG systems, or
                          documentation.
                        marks: []
          - object: block
            type: heading-3
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Output Formats
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                JYfzvqJ3bTNA:
                  orderIndex: '0|hzzzhj:'
                  values:
                    EKvkzBindESG: M5SMZ7avl2bZ
                    zgfWyhfY4u5y: 7bc4Hw7C5GlU
                8ISanBxmAJ6F:
                  orderIndex: '0|hzzzzz:'
                  values:
                    EKvkzBindESG: trgKJD9tobDD
                    zgfWyhfY4u5y: tdnb8B7RbByD
                FB6OCzQFXYRL:
                  orderIndex: '0|i0002f:'
                  values:
                    EKvkzBindESG: uX4cEhVLTxN4
                    zgfWyhfY4u5y: VDR99tTzGoQw
              definition:
                EKvkzBindESG:
                  id: EKvkzBindESG
                  title: Format
                  type: text
                  textAlignment: left
                zgfWyhfY4u5y:
                  id: zgfWyhfY4u5y
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - EKvkzBindESG
                  - zgfWyhfY4u5y
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: text
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: M5SMZ7avl2bZ
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Plain text output
                            marks: []
                fragment: 7bc4Hw7C5GlU
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: markdown
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: trgKJD9tobDD
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Markdown formatted
                            marks: []
                fragment: tdnb8B7RbByD
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: json
                            marks:
                              - object: mark
                                type: code
                                data: {}
                fragment: uX4cEhVLTxN4
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Structured JSON
                            marks: []
                fragment: VDR99tTzGoQw
                type: table-cell
      x-gitbook-description-html: >-
        <p>Compiles an elemental's data into an AI-ready format.</p><div
        data-gb-custom-block data-tag="hint" data-style="success" class="hint
        hint-success"><p>Use this to export prompts and content in formats
        suitable for AI training, RAG systems, or
        documentation.</p></div><h3>Output
        Formats</h3><table><thead><tr><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>text</code></td><td>Plain
        text output</td></tr><tr><td><code>markdown</code></td><td>Markdown
        formatted</td></tr><tr><td><code>json</code></td><td>Structured
        JSON</td></tr></tbody></table>
  /v1/list/{id}/knowledge-base:
    get:
      summary: Compile Knowledge Base (List)
      description: Compiles all elementals in a list into an AI-ready format.
      tags:
        - knowledge-base
      operationId: compileListKnowledgeBase
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: format
          in: query
          schema:
            type: string
            enum:
              - text
              - markdown
              - json
      responses:
        '200':
          description: Compiled knowledge base data
          x-gitbook-description-html: <p>Compiled knowledge base data</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/list/list123/knowledge-base?format=json"
            \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Compiles all elementals in a list into an AI-ready format.
                    marks: []
      x-gitbook-description-html: <p>Compiles all elementals in a list into an AI-ready format.</p>
  /v1/visibility/types:
    get:
      summary: Get Visibility Types
      description: |
        Returns all available visibility settings.

        | ID | Name | Description |
        |----|------|-------------|
        | 1 | Public | Visible to everyone |
        | 2 | Unlisted | Accessible via direct link only |
      tags:
        - visibility
      operationId: getVisibilityTypes
      security:
        - ApiKeyAuth: []
      responses:
        '200':
          description: List of visibility types
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      response:
                        type: array
                        items:
                          $ref: '#/components/schemas/VisibilityType'
          x-gitbook-description-html: <p>List of visibility types</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X GET
            "https://api-integrations.snackprompt.com/v1/visibility/types" \
              -H "x-api-key: YOUR_API_KEY"
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Returns all available visibility settings.
                    marks: []
          - object: block
            type: table
            isVoid: true
            data:
              records:
                0G6TbnvjXSsn:
                  orderIndex: '0|hzzz53:'
                  values:
                    PzFLXanlJwDp: LXeOfXUz9BBc
                    RsQ1Jk9HBUNh: KHx5NQyYqB0B
                    8CvBntcOPIWJ: W9Zk2VkfnzEY
                OkthhlTIZTlV:
                  orderIndex: '0|hzzzuv:'
                  values:
                    PzFLXanlJwDp: jLfZlj2vQbC3
                    RsQ1Jk9HBUNh: SeRYOztydPUF
                    8CvBntcOPIWJ: 1HXZpw4bfF1F
              definition:
                PzFLXanlJwDp:
                  id: PzFLXanlJwDp
                  title: ID
                  type: text
                  textAlignment: left
                RsQ1Jk9HBUNh:
                  id: RsQ1Jk9HBUNh
                  title: Name
                  type: text
                  textAlignment: left
                8CvBntcOPIWJ:
                  id: 8CvBntcOPIWJ
                  title: Description
                  type: text
                  textAlignment: left
              view:
                type: grid
                columns:
                  - PzFLXanlJwDp
                  - RsQ1Jk9HBUNh
                  - 8CvBntcOPIWJ
                useNewSizing: true
                hideHeader: false
                columnWidths: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: ''
                    marks: []
            fragments:
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '1'
                            marks: []
                fragment: LXeOfXUz9BBc
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Public
                            marks: []
                fragment: KHx5NQyYqB0B
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Visible to everyone
                            marks: []
                fragment: W9Zk2VkfnzEY
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: '2'
                            marks: []
                fragment: jLfZlj2vQbC3
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Unlisted
                            marks: []
                fragment: SeRYOztydPUF
                type: table-cell
              - object: fragment
                nodes:
                  - object: block
                    type: paragraph
                    isVoid: false
                    data: {}
                    nodes:
                      - object: text
                        leaves:
                          - object: leaf
                            text: Accessible via direct link only
                            marks: []
                fragment: 1HXZpw4bfF1F
                type: table-cell
      x-gitbook-description-html: >-
        <p>Returns all available visibility
        settings.</p><table><thead><tr><th>ID</th><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Public</td><td>Visible
        to everyone</td></tr><tr><td>2</td><td>Unlisted</td><td>Accessible via
        direct link only</td></tr></tbody></table>
  /v1/user/issue:
    post:
      summary: Create Support Issue
      description: >
        Submits a support issue or feedback.


        {% hint style="info" %}

        Authentication is optional for this endpoint, but the `x-client-source`
        header is required.

        {% endhint %}
      tags:
        - support
      operationId: createSupportIssue
      parameters:
        - name: x-client-source
          in: header
          required: true
          description: Source of the request (e.g., "web", "extension", "api")
          schema:
            type: string
          x-gitbook-description-html: <p>Source of the request (e.g., "web", "extension", "api")</p>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - subject
                - description
              properties:
                subject:
                  type: string
                  description: Issue subject/title
                  x-gitbook-description-html: <p>Issue subject/title</p>
                description:
                  type: string
                  description: Detailed description of the issue
                  x-gitbook-description-html: <p>Detailed description of the issue</p>
                link:
                  type: string
                  description: Related URL (optional)
                  x-gitbook-description-html: <p>Related URL (optional)</p>
            example:
              subject: Bug Report
              description: Description of the issue I encountered
              link: https://snackprompt.com/page
      responses:
        '201':
          description: Issue created successfully
          x-gitbook-description-html: <p>Issue created successfully</p>
        '401':
          description: Your client source header is missing
          x-gitbook-description-html: <p>Your client source header is missing</p>
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl -X POST
            "https://api-integrations.snackprompt.com/v1/user/issue" \
              -H "x-api-key: YOUR_API_KEY" \
              -H "x-client-source: api" \
              -H "Content-Type: application/json" \
              -d '{"subject": "Bug Report", "description": "Issue details"}'
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Submits a support issue or feedback.
                    marks: []
          - object: block
            type: hint
            isVoid: false
            data:
              style: info
            nodes:
              - object: block
                type: paragraph
                isVoid: false
                data: {}
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: 'Authentication is optional for this endpoint, but the '
                        marks: []
                      - object: leaf
                        text: x-client-source
                        marks:
                          - object: mark
                            type: code
                            data: {}
                      - object: leaf
                        text: ' header is required.'
                        marks: []
      x-gitbook-description-html: >-
        <p>Submits a support issue or feedback.</p><div data-gb-custom-block
        data-tag="hint" data-style="info" class="hint
        hint-info"><p>Authentication is optional for this endpoint, but the
        <code>x-client-source</code> header is required.</p></div>
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >
        API Key authentication. Get your key at
        [snackprompt.com/api-keys](https://snackprompt.com/api-keys).


        **Example:** `x-api-key: sk-your-api-key-here`
      x-gitbook-description-html: >-
        <p>API Key authentication. Get your key at <a
        href="https://snackprompt.com/api-keys">snackprompt.com/api-keys</a>.</p>

        <p><strong>Example:</strong> <code>x-api-key:
        sk-your-api-key-here</code></p>
  schemas:
    ApiResponse:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code
          example: 200
          x-gitbook-description-html: <p>HTTP status code</p>
        meta:
          $ref: '#/components/schemas/Meta'
        response:
          description: Response data (varies by endpoint)
          x-gitbook-description-html: <p>Response data (varies by endpoint)</p>
    PaginatedResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - type: object
              properties:
                size:
                  type: integer
                  description: Items per page
                  x-gitbook-description-html: <p>Items per page</p>
                page:
                  type: integer
                  description: Current page
                  x-gitbook-description-html: <p>Current page</p>
                total:
                  type: integer
                  description: Total items
                  x-gitbook-description-html: <p>Total items</p>
        response:
          type: array
          items: {}
    Meta:
      type: object
      properties:
        version:
          type: string
          example: v1.0.2
        is_authenticaded:
          type: boolean
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          example: 401
        meta:
          $ref: '#/components/schemas/Meta'
        error_message:
          type: string
          description: Human-readable error message
          example: Your session token is missing. Please log in again
          x-gitbook-description-html: <p>Human-readable error message</p>
    NotFoundResponse:
      type: object
      description: Resource not found error response
      properties:
        code:
          type: integer
          example: 404
        meta:
          $ref: '#/components/schemas/Meta'
        error_message:
          type: string
          description: Human-readable error message
          example: Elemental(s) not found.
          x-gitbook-description-html: <p>Human-readable error message</p>
      x-gitbook-description-html: <p>Resource not found error response</p>
    HealthResponse:
      type: object
      description: Health check response indicating system status
      properties:
        status:
          type: string
          description: Current health status of the system
          example: UP
          enum:
            - UP
            - DOWN
          x-gitbook-description-html: <p>Current health status of the system</p>
      required:
        - status
      x-gitbook-description-html: <p>Health check response indicating system status</p>
    TokenValidationResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
        meta:
          $ref: '#/components/schemas/Meta'
        response:
          type: object
          properties:
            id:
              type: string
              description: User's unique identifier
              example: 1q2w3e4r5t6y7u8i9o0p
              x-gitbook-description-html: <p>User's unique identifier</p>
            name:
              type: string
              description: User's display name
              example: John Doe
              x-gitbook-description-html: <p>User's display name</p>
            username:
              type: string
              description: User's username
              example: john_doe
              x-gitbook-description-html: <p>User's username</p>
            email:
              type: string
              description: User's email address
              example: user@example.com
              x-gitbook-description-html: <p>User's email address</p>
            avatar:
              type: string
              description: URL to user's avatar image
              example: http://files.snackprompt.com/avatar.png
              x-gitbook-description-html: <p>URL to user's avatar image</p>
    UserResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        username:
          type: string
        email:
          type: string
        avatar:
          type: string
    ElementalResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
          x-gitbook-description-html: <p>Unique identifier</p>
        is_list:
          type: boolean
          description: Whether this is a list
          x-gitbook-description-html: <p>Whether this is a list</p>
        type:
          $ref: '#/components/schemas/ElementalType'
        category:
          $ref: '#/components/schemas/ElementalCategory'
        topics:
          type: array
          items:
            $ref: '#/components/schemas/Topic'
        title:
          type: string
        body_content:
          type: string
          description: Template/content text
          x-gitbook-description-html: <p>Template/content text</p>
        body_content_html:
          type: string
        body_content_plaintext:
          type: string
        body_content_json:
          type: object
        body_content_placeholders:
          $ref: '#/components/schemas/PlaceholdersResponse'
        description:
          type: string
        description_plaintext:
          type: string
        visibility:
          $ref: '#/components/schemas/VisibilityType'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ImageResponse'
        cover_images:
          type: array
          items:
            $ref: '#/components/schemas/ImageResponse'
        avatar_image:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/ElementalFileResponse'
        tutorial_steps:
          type: array
          items:
            $ref: '#/components/schemas/TutorialStep'
        url:
          type: string
        is_premium:
          type: boolean
        price:
          type: integer
        average_rate:
          type: number
          format: float
        video_url:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        user:
          $ref: '#/components/schemas/UserResponse'
        comments:
          type: array
          items:
            $ref: '#/components/schemas/CommentResponse'
        total_comments:
          type: integer
        rates:
          type: array
          items:
            $ref: '#/components/schemas/RateResponse'
        total_rates:
          type: integer
        total_sales:
          type: integer
        total_upvotes:
          type: integer
        total_uses:
          type: integer
        total_saves:
          type: integer
        command:
          type: string
        columns:
          type: array
          items:
            $ref: '#/components/schemas/ListResponse'
        rows:
          type: array
          items:
            $ref: '#/components/schemas/ListResponse'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagResponse'
        knowledge_base:
          type: object
        knowledge_base_json:
          type: object
        settings:
          type: object
          description: Elemental settings and flags
          properties:
            is_knowledge_base:
              type: boolean
              description: Whether this elemental is used as a knowledge base
              x-gitbook-description-html: <p>Whether this elemental is used as a knowledge base</p>
            is_template:
              type: boolean
              description: Whether this elemental is a template
              x-gitbook-description-html: <p>Whether this elemental is a template</p>
            is_system:
              type: boolean
              description: Whether this is a system elemental
              x-gitbook-description-html: <p>Whether this is a system elemental</p>
          x-gitbook-description-html: <p>Elemental settings and flags</p>
    ElementalPayload:
      type: object
      required:
        - title
        - type_id
        - template
        - category_id
      properties:
        id:
          type: string
        title:
          type: string
          description: Title (10-100 characters)
          minLength: 10
          maxLength: 100
          x-gitbook-description-html: <p>Title (10-100 characters)</p>
        type_id:
          type: integer
          description: 1=Prompt, 2=Snippet, 3=Document
          enum:
            - 1
            - 2
            - 3
          x-gitbook-description-html: <p>1=Prompt, 2=Snippet, 3=Document</p>
        template:
          type: string
          description: Content/template text with optional
          x-gitbook-description-html: <p>Content/template text with optional</p>
        template_overwrite_content:
          type: boolean
        description:
          type: string
        command:
          type: string
        visibility:
          type: integer
          description: 1=Public, 2=Unlisted
          default: 1
          x-gitbook-description-html: <p>1=Public, 2=Unlisted</p>
        category_id:
          type: integer
        topic_ids:
          type: array
          items:
            type: integer
          description: Required for prompts (type_id=1)
          x-gitbook-description-html: <p>Required for prompts (type_id=1)</p>
        lists_to_save:
          type: array
          items:
            type: object
            properties:
              list_id:
                type: string
        is_premium:
          type: boolean
        is_fixed_price:
          type: boolean
        price:
          type: integer
        price_original:
          type: integer
        avatar:
          $ref: '#/components/schemas/FileRequest'
        cover_images:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
        images:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
        video_url:
          type: string
        tutorial_steps:
          type: array
          items:
            $ref: '#/components/schemas/TutorialStepPayload'
    ElementalType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    ElementalCategory:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    Topic:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    PlaceholdersResponse:
      type: object
      properties:
        list:
          type: array
          items:
            type: string
          description: Array of placeholder tags
          x-gitbook-description-html: <p>Array of placeholder tags</p>
        plaintext:
          type: string
          description: All placeholders as space-separated string
          x-gitbook-description-html: <p>All placeholders as space-separated string</p>
    ElementalFileResponse:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        size:
          type: integer
        created_at:
          type: string
          format: date-time
        url:
          type: string
        data:
          type: array
          items:
            type: integer
          description: File data as byte array
          x-gitbook-description-html: <p>File data as byte array</p>
    FileRequest:
      type: object
      properties:
        file_name:
          type: string
        file_buffer:
          $ref: '#/components/schemas/FileBuffer'
    FileBuffer:
      type: object
      properties:
        type:
          type: string
          example: Buffer
        data:
          type: array
          items:
            type: integer
          description: File data as byte array
          x-gitbook-description-html: <p>File data as byte array</p>
    FileUploadRequest:
      type: object
      properties:
        images:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
          maxItems: 4
        cover_images:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
          maxItems: 4
        avatar:
          $ref: '#/components/schemas/FileRequest'
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
          maxItems: 3
    FileDeleteRequest:
      type: object
      properties:
        images:
          type: array
          items:
            type: integer
        cover_images:
          type: array
          items:
            type: integer
        avatar:
          type: boolean
        files:
          type: array
          items:
            type: integer
    ImageResponse:
      type: object
      properties:
        id:
          type: integer
        url:
          type: string
        width:
          type: integer
        height:
          type: integer
        blur:
          type: string
    TutorialStep:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        description:
          type: string
        video_url:
          type: string
    TutorialStepPayload:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        video_url:
          type: string
    ListResponse:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
        description_plaintext:
          type: string
        visibility:
          $ref: '#/components/schemas/VisibilityType'
        type:
          $ref: '#/components/schemas/ListType'
        topics:
          type: array
          items:
            $ref: '#/components/schemas/Topic'
        items:
          type: array
          items:
            $ref: '#/components/schemas/ElementalResponse'
        total_items:
          type: integer
        cover_images:
          type: array
          items:
            $ref: '#/components/schemas/ImageResponse'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ImageResponse'
        files:
          type: array
          items:
            $ref: '#/components/schemas/ElementalFileResponse'
        avatar_image:
          type: string
        video_url:
          type: string
        tutorial_steps:
          type: array
          items:
            $ref: '#/components/schemas/TutorialStep'
        url:
          type: string
        is_premium:
          type: boolean
        price:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_saved:
          type: boolean
        is_favorite:
          type: boolean
        is_voted:
          type: boolean
        average_rate:
          type: number
          format: float
        rates:
          type: array
          items:
            $ref: '#/components/schemas/RateResponse'
        total_rates:
          type: integer
        total_saves:
          type: integer
        total_upvotes:
          type: integer
        total_uses:
          type: integer
        total_sales:
          type: integer
        user:
          $ref: '#/components/schemas/UserResponse'
        last_saves:
          type: array
          items:
            $ref: '#/components/schemas/UserResponse'
        table_id:
          type: string
        table_orientation:
          type: string
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagResponse'
        knowledge_base:
          type: object
        knowledge_base_json:
          type: object
        settings:
          type: object
          description: List settings and flags
          properties:
            is_knowledge_base:
              type: boolean
            is_template:
              type: boolean
            is_system:
              type: boolean
          x-gitbook-description-html: <p>List settings and flags</p>
    ListRequest:
      type: object
      required:
        - title
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
        template:
          type: string
        template_overwrite:
          type: boolean
        content_type:
          type: integer
        visibility:
          type: integer
          default: 1
        item_ids:
          type: array
          items:
            $ref: '#/components/schemas/ListPromptRequest'
        mode:
          type: string
        is_premium:
          type: boolean
        is_fixed_price:
          type: boolean
        price:
          type: integer
        price_original:
          type: integer
        avatar:
          $ref: '#/components/schemas/FileRequest'
        video_url:
          type: string
        tutorial_steps:
          type: array
          items:
            $ref: '#/components/schemas/TutorialStepPayload'
        table:
          type: object
          additionalProperties: true
        cover_images:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
        images:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileRequest'
    ListPromptRequest:
      type: object
      properties:
        id:
          type: integer
        list_id:
          type: integer
        prompt_id:
          type: string
        orderIndex:
          type: integer
        list_item_id:
          type: string
    ListType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    TagResponse:
      type: object
      properties:
        id:
          type: string
          description: Tag unique identifier
          example: scZahUfID
          x-gitbook-description-html: <p>Tag unique identifier</p>
        title:
          type: string
          description: Tag title/name
          x-gitbook-description-html: <p>Tag title/name</p>
        color:
          type: string
          description: Hex color code for the tag
          x-gitbook-description-html: <p>Hex color code for the tag</p>
        description:
          type: string
          description: Optional tag description
          x-gitbook-description-html: <p>Optional tag description</p>
        user_id:
          type: string
          description: ID of the user who created the tag
          x-gitbook-description-html: <p>ID of the user who created the tag</p>
        created_at:
          type: string
          format: date-time
          description: Tag creation timestamp
          x-gitbook-description-html: <p>Tag creation timestamp</p>
        updated_at:
          type: string
          format: date-time
          description: Tag last update timestamp
          x-gitbook-description-html: <p>Tag last update timestamp</p>
    CreateTagRequest:
      type: object
      required:
        - title
        - color
        - elementalTypeId
      properties:
        title:
          type: string
        color:
          type: string
          description: Hex color code (e.g., "#FF5733")
          x-gitbook-description-html: <p>Hex color code (e.g., "#FF5733")</p>
        description:
          type: string
        elementalTypeId:
          type: integer
          description: Elemental type this tag applies to
          x-gitbook-description-html: <p>Elemental type this tag applies to</p>
        source_user_id:
          type: string
        source_tag_id:
          type: string
    VisibilityType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    CommentResponse:
      type: object
      properties:
        id:
          type: integer
        message:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        total_votes:
          type: integer
        user:
          $ref: '#/components/schemas/UserResponse'
        replies:
          type: array
          items:
            $ref: '#/components/schemas/CommentReplyResponse'
    CommentReplyResponse:
      type: object
      properties:
        id:
          type: integer
        message:
          type: string
        parent_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        total_votes:
          type: integer
        user:
          $ref: '#/components/schemas/UserResponse'
    RateResponse:
      type: object
      properties:
        id:
          type: integer
        message:
          type: string
        rating:
          type: integer
          minimum: 1
          maximum: 5
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        total_votes:
          type: integer
        user:
          $ref: '#/components/schemas/UserResponse'
security:
  - ApiKeyAuth: []
