Documents

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint:

GET
https://smartyai.net/api/v1/documents

Request example:

curl --location --request GET 'https://smartyai.net/api/v1/documents' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Description
search
optional string
The search query.
search_by
optional string
Search by. Possible values are: name for Name, result for Result. Defaults to: name.
template_id
optional integer
Filter by template ID. Possible values are: 1 for Freestyle, 2 for About us, 3 for Advertisement, 4 for Article, 5 for Blog intro, 6 for Blog outline, 7 for Blog outro, 8 for Blog paragraph, 9 for Blog post, 10 for Blog section, 11 for Blog talking points, 12 for Blog title, 13 for Call to action, 14 for Content rewrite, 15 for Content summary, 16 for FAQ, 17 for Hashtags, 18 for Headline, 19 for How it works, 20 for Meta description, 21 for Meta keywords, 22 for Mission statement, 23 for Newsletter, 24 for Pain-Agitate-Solution, 25 for Paragraph, 26 for Press release, 27 for Social post, 28 for Social post caption, 29 for Startup ideas, 30 for Startup names, 31 for Subheadline, 32 for Testimonial, 33 for Social media quote, 34 for Social media bio, 35 for Value proposition, 36 for Video description, 37 for Video script, 38 for Video tags, 39 for Video title, 40 for Vision statement, 41 for Product sheet, 42 for Welcome email, 43 for Push notification, 44 for Blog listicle, 45 for Content grammar, 46 for Blog tags, 47 for Pros and cons, 48 for Google advertisement, 49 for Facebook advertisement, 50 for Job description, 51 for Review, 52 for Feature section. Defaults to: freestyle.
favorite
optional boolean
Filter by favorite.
sort_by
optional string
Sort by. Possible values are: id for Date created, name for Name. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional integer
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Show

API endpoint:

GET
https://smartyai.net/api/v1/documents/{id}

Request example:

curl --location --request GET 'https://smartyai.net/api/v1/documents/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
https://smartyai.net/api/v1/documents

Request example:

curl --location --request POST 'https://smartyai.net/api/v1/documents' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'prompt={prompt}'
Parameter
Type
Description
name
required string
The document name.
prompt
required string
The instructions for the AI.
creativity
required float
The creative level of the result. Possible values are: 0 for Repetitive, 0.25 for Deterministic, 0.5 for Original, 0.75 for Creative, 1 for Imaginative. Defaults to: 0.5.
Update

API endpoint:

PUT PATCH
https://smartyai.net/api/v1/documents/{id}

Request example:

curl --location --request PUT 'https://smartyai.net/api/v1/documents/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Description
name
optional string
The document name.
result
optional string
The document result.
favorite
optional boolean
Whether the document is favorite or not.
Delete

API endpoint:

DELETE
https://smartyai.net/api/v1/documents/{id}

Request example:

curl --location --request DELETE 'https://smartyai.net/api/v1/documents/{id}' \
--header 'Authorization: Bearer {api_key}'