> For the complete documentation index, see [llms.txt](https://docs.snackprompt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snackprompt.com/api-reference/api-reference/elementals/types-and-categories.md).

# Types & Categories

Get elemental types, categories, and topics

Retrieve available elemental types, categories, and topics for organizing and creating content.

## Get Elemental Types

> 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 |<br>

```json
{"openapi":"3.0.3","info":{"title":"Snack Prompt Integration API","version":"v1.0.2"},"tags":[{"name":"elemental-metadata","description":"Retrieve available elemental types, categories, and topics for organizing and creating content."}],"servers":[{"url":"https://api-integrations.snackprompt.com","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"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).\n\n**Example:** `x-api-key: sk-your-api-key-here`\n"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"meta":{"$ref":"#/components/schemas/Meta"},"error_message":{"type":"string","description":"Human-readable error message"}}},"Meta":{"type":"object","properties":{"version":{"type":"string"},"is_authenticaded":{"type":"boolean"},"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}}}},"paths":{"/v1/elemental/types":{"get":{"summary":"Get Elemental Types","description":"Fetch a list of elemental types available in the system.\n\n| Type ID | Name | Description |\n|---------|------|-------------|\n| 1 | Prompt | AI prompt templates with variable tags |\n| 2 | Snippet | Reusable text blocks |\n| 3 | Document | Long-form content |\n","tags":["elemental-metadata"],"operationId":"getElementalTypes","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"}}}}}}}}}
```

## Get Type Categories

> 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 |<br>

```json
{"openapi":"3.0.3","info":{"title":"Snack Prompt Integration API","version":"v1.0.2"},"tags":[{"name":"elemental-metadata","description":"Retrieve available elemental types, categories, and topics for organizing and creating content."}],"servers":[{"url":"https://api-integrations.snackprompt.com","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"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).\n\n**Example:** `x-api-key: sk-your-api-key-here`\n"}},"schemas":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code"},"meta":{"$ref":"#/components/schemas/Meta"},"response":{"description":"Response data (varies by endpoint)"}}},"Meta":{"type":"object","properties":{"version":{"type":"string"},"is_authenticaded":{"type":"boolean"},"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}},"NotFoundResponse":{"type":"object","description":"Resource not found error response","properties":{"code":{"type":"integer"},"meta":{"$ref":"#/components/schemas/Meta"},"error_message":{"type":"string","description":"Human-readable error message"}}}}},"paths":{"/v1/elemental/type/{type_id}/categories":{"get":{"summary":"Get Type Categories","description":"Returns available categories for a specific elemental type.\n\n### How to Use\n\nPass the elemental type ID as a path parameter to get categories for that type.\n\n| Type ID | Name |\n|---------|------|\n| 1 | Prompt |\n| 2 | Snippet |\n| 3 | Document |\n","tags":["elemental-metadata"],"operationId":"getTypeCategories","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]}}],"responses":{"200":{"description":"List of categories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Type not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}}}}}}}
```

## Get Category Topics

> 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 %}<br>

```json
{"openapi":"3.0.3","info":{"title":"Snack Prompt Integration API","version":"v1.0.2"},"tags":[{"name":"elemental-metadata","description":"Retrieve available elemental types, categories, and topics for organizing and creating content."}],"servers":[{"url":"https://api-integrations.snackprompt.com","description":"Production server"}],"security":[{"ApiKeyAuth":[]}],"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).\n\n**Example:** `x-api-key: sk-your-api-key-here`\n"}},"schemas":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code"},"meta":{"$ref":"#/components/schemas/Meta"},"response":{"description":"Response data (varies by endpoint)"}}},"Meta":{"type":"object","properties":{"version":{"type":"string"},"is_authenticaded":{"type":"boolean"},"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}},"NotFoundResponse":{"type":"object","description":"Resource not found error response","properties":{"code":{"type":"integer"},"meta":{"$ref":"#/components/schemas/Meta"},"error_message":{"type":"string","description":"Human-readable error message"}}}}},"paths":{"/v1/elemental/type/category/{category_id}/topics":{"get":{"summary":"Get Category Topics","description":"Returns available topics for a specific category.\n\n{% hint style=\"info\" %}\nTopics are required when creating prompts (type_id=1). Use this endpoint to get valid topic IDs.\n{% endhint %}\n","tags":["elemental-metadata"],"operationId":"getCategoryTopics","parameters":[{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"integer"}}],"responses":{"200":{"description":"List of topics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}}}}}}}
```
