Update Elemental
- Param
- Body
- Response
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | ✅ | ID of the elemental |
Example
/v1/user/elemental/your-elemental-id
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| title | string | ❌ | Title of the elemental |
| template | string | ❌ | Template of the elemental |
| template_overwrite_content | boolean | ❌ | An option to overwrite the content |
| description | string | ❌ | Description of the elemental |
| command | string | ❌ | Command of the elemental |
| visibility | number | ❌ | Visibility of the elemental |
| category_id | number | ❌ | Category of the elemental |
| topic_ids | number[] | ❌ | Topics related to the elemental |
| lists_to_save | Object[] | ❌ | Lists to save |
| lists_to_save.list_id | number | ✅ | ID of the list |
| is_premium | boolean | ❌ | Indicates if the elemental is premium |
| is_fixed_price | boolean | ❌ | Indicates if the elemental has a fixed price |
| price | number | ❌ | Price of the elemental |
| price_original | number | ❌ | Original price of the elemental |
| avatar | Object | ❌ | Avatar of the elemental |
| avatar.file_name | string | ❌ | Name of the avatar |
| avatar.file_buffer | number[] | ✅ | Buffer of the avatar |
| cover_images | Object[] | ❌ | Cover images of the elemental |
| cover_images.file_name | string | ❌ | Name of the cover image |
| cover_images.file_buffer | number[] | ✅ | Buffer of the cover image |
| images | Object[] | ❌ | Images of the elemental |
| images.file_name | string | ❌ | Name of the image |
| images.file_buffer | number[] | ✅ | Buffer of the image |
| files | Object[] | ❌ | Files of the elemental |
| files.file_name | string | ❌ | Name of the file |
| files.file_buffer | number[] | ✅ | Buffer of the file |
| video_url | string | ❌ | Video URL of the elemental |
| tagIds | number[] | ❌ | Tag IDs of the elemental |
| tutorial_steps | Object[] | ❌ | Tutorial steps of the elemental |
| tutorial_steps.title | string | ✅ | Title of the tutorial step |
| tutorial_steps.description | string | ❌ | Description of the tutorial step |
| tutorial_steps.video_url | string | ❌ | Video URL of the tutorial step |
| settings | Object | ❌ | Settings of the elemental |
| settings.is_knowledge_base | boolean | ❌ | Indicates if the elemental is a knowledge base |
| settings.is_template | boolean | ❌ | Indicates if the elemental is a template |
Example
{
"title": "My First Prompt",
"description": "<p>Snack Prompt is awesome!</p>"
}
Properties
| Name | Type | Description |
|---|---|---|
| id | string | ID of the elemental |
| is_list | boolean | Indicates if the elemental is a list |
| type | Object | Type of the elemental |
| category | Object | Category of the elemental |
| category.id | number | ID of the category |
| category.name | string | Name of the category |
| topics | array | Topics related to the elemental |
| topics.id | number | ID of the topic |
| topics.name | string | Name of the topic |
| title | string | Title of the elemental |
| body_content | string | Body content of the elemental |
| body_content_plaintext | string | Body content of the elemental in plain text |
| body_content_json | string | Body content of the elemental in JSON format |
| body_content_placeholders | Object | Placeholders for the body content |
| body_content_placeholders.list | string[] | Placeholders for the body content in list |
| body_content_placeholders.plaintext | string | Placeholders for the body content in plain text |
| description | string | Description of the elemental |
| description_plaintext | string | Description of the elemental in plain text |
| visibility | Object | Visibility of the elemental |
| visibility.id | number | ID of the visibility |
| visibility.name | string | Name of the visibility |
| images | array | Images related to the elemental |
| images.id | number | ID of the image |
| images.url | string | URL of the image |
| cover_images | array | Cover images related to the elemental |
| cover_images.id | number | ID of the cover image |
| cover_images.url | string | URL of the cover image |
| avatar_image | string | Avatar image of the elemental |
| files | array | Files related to the elemental. (Up to 3 files) |
| files.id | number | ID of the file |
| files.name | string | Name of the file |
| files.size | number | Size of the file |
| files.created_at | string | Timestamp of when the file was created |
| files.url | string | URL of the file |
| tags | array | Tags related to the elemental |
| tutorial_steps | array | Tutorial steps related to the elemental |
| tutorial_steps.id | number | ID of the tutorial step |
| tutorial_steps.title | string | Title of the tutorial step |
| tutorial_steps.description | string | Description of the tutorial step |
| tutorial_steps.video_url | string | Video URL of the tutorial step |
| url | string | URL of the elemental |
| is_premium | boolean | Indicates if the elemental is premium |
| price | number | Price of the elemental |
| average_rate | number | Average rate of the elemental |
| video_url | string | Video URL of the elemental |
| created_at | string | Timestamp of when the elemental was created |
| updated_at | string | Timestamp of when the elemental was updated |
| user | Object | User owner of the elemental |
| user.id | string | ID of the user |
| user.name | string | Name of the user |
| user.username | string | Username of the user |
| user.avatar | string | Avatar of the user |
| total_upvotes | number | Total number of upvotes |
| total_uses | number | Total number of uses |
| total_saves | number | Total number of saves |
| command | string | Command of the elemental |
| knowledge_base | string | Knowledge base of the elemental |
| settings | Object | Settings of the elemental |
| settings.is_knowledge_base | boolean | Indicates if the elemental is a knowledge base |
| settings.is_template | boolean | Indicates if the elemental is a template |
Example
{
"response": {
"id": "82f9dc27-5e0c-4bbc-a9bb-3c2f1be8a2ac",
"is_list": false,
"type": {
"id": 1,
"name": "Prompt"
},
"category": {
"id": 1,
"name": "Text"
},
"topics": [
{
"id": 27,
"name": "AI"
}
],
"title": "My First Prompt",
"body_content": "I Love Snack Prompt ❤️ #[aweasome]",
"body_content_plaintext": "I Love Snack Prompt ❤️ #[aweasome]",
"body_content_json": null,
"body_content_placeholders": {
"list": [
"#[aweasome]"
],
"plaintext": "#[aweasome]"
},
"description": "<p>Snack Prompt is awesome!</p>",
"description_plaintext": "Snack Prompt is awesome!",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": [
{
"id": 4156,
"url": "http://..."
}
],
"cover_images": [
{
"id": 4155,
"url": "http://..."
}
],
"avatar_image": "http://...",
"files": [
{
"id": 1014,
"name": "cat-code-lhY.png",
"size": 1131291,
"created_at": "2025-01-14T16:47:07.091668Z",
"url": "https://..."
}
],
"tags": [
{
"id": 1,
"title": "Tag 1",
"color": "#000000",
"description": "Tag 1 description",
"userId": "Ak2o2WP6xrU8EqSLpmtwO4fEwlC3"
}
],
"tutorial_steps": [
{
"id": 11645,
"title": "First",
"description": "<p>Follow us</p>",
"video_url": ""
},
{
"id": 11646,
"title": "End",
"description": "",
"video_url": ""
}
],
"url": "https://snackprompt.com/prompt/my-first-prompt",
"is_premium": false,
"price": null,
"average_rate": 0,
"video_url": "https://www.youtube.com/watch?v=9yhGMj8Ygvc&t=1s",
"created_at": "2025-01-14T16:47:01.565479Z",
"updated_at": "2025-01-14T16:47:03.203537Z",
"user": {
"id": "Ak2o2WP6xrU8EqSLpmtwO4fEwlC3",
"name": "Leonardo Sola",
"username": "sola",
"avatar": "http://..."
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 1,
"command": "",
"template_overwrite_content": false,
"knowledge_base": "Title: My First Prompt\nDescription: Snack Prompt is awesome!\n\nBody: I Love Snack Prompt ❤️ #[aweasome]\n\n",
"settings": {
"is_knowledge_base": false,
"is_template": false
}
}
}
CURL Example
curl -X PUT "https://api-integrations.snackprompt.com/v1/user/elemental/{id}" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"title":"My First Prompt","description":"<p>Snack Prompt is awesome!</p>"}'