---
title: "Create Snippet Endpoint"
method: POST
path: "/public/snippets"
tags: ["PUBLIC_SNIPPETS"]
deprecated: true
---

# Create Snippet Endpoint

`POST /public/snippets`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/public/snippets`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

> **Deprecated.**

Create a new snippet in Weaviate.

This endpoint creates a new snippet in either the DataDefinition
or SqlExamples collection based on the type field.

## Request body

- CreateSnippetRequest: Request to create a new snippet
  - `title` string, required: Title or name of the snippet
  - `description` string, required: Description of what the snippet does
  - `database_type` string, required: Database type (e.g., clickhouse, postgres)
  - `tags` string[]: Capability tags
  - `type` string, required: Snippet type: data_definition or sql_example
  - `full_content` object, required: Full snippet content

## Response `200`

Successful Response

- SnippetItem: Individual code snippet from Weaviate
  - `id` string, required: Unique identifier for the snippet
  - `title` string, required: Title or name of the snippet
  - `description` string, required: Description of what the snippet does
  - `database_type` string, required: Database type (e.g., clickhouse, postgres)
  - `tags` string[]: Capability tags
  - `type` string, required: Snippet type: data_definition or sql_example
  - `full_content` object: Full snippet content

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
