Create Many
- If status code is 201 (Created), the elementals were created successfully.
- If status code is 206 (Partial Content), some elementals were not created and the error will be in the response.
- Body
- Response
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| title | string | ✅ | Title of the elemental |
| type_id | number | ✅ | Type of the elemental |
| template | string | ❌ | Template of the elemental |
| 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, if its a prompt its need to send at least one topic |
| 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. Up to 3 images |
| 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. Up to 3 images |
| 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 | string[] | ❌ | Tags 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 Snippet",
"type_id": 2,
"description": "<p>Snack Prompt is awesome!</p>"
},
{
"title": "My First Document",
"type_id": 3,
"description": "<p>Snack Prompt is awesome!</p>"
}
]
Properties
| Name | Type | Description |
|---|---|---|
| id | string | ID of the elemental |
| created | boolean | Indicates if the elemental was created |
Example
{
"code": 201,
"meta": {
"version": "v1.0.2",
"is_authenticaded": true
},
"response": [
{
"id": "oQ4dqRomi",
"created": true
},
{
"id": "6UJSs27NG",
"created": true
},
{
"id": "PfHxDM2RN",
"created": true
}
]
}
CURL Example
curl -X POST "https://api-integrations.snackprompt.com/v1/user/elementals" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '[{"title":"My First Snippet","type_id":2,"description":"<p>Snack Prompt is awesome!</p>"},{"title":"My First Document","type_id":3,"description":"<p>Snack Prompt is awesome!</p>"}]'