Messages

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://templify.ai/api/v1/messages

Request example:

curl --location --request GET 'https://templify.ai/api/v1/messages' \
--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: message for Message. Defaults to: message.
chat_id
optional string
Filter by chat ID.
role
optional string
Filter by role. Possible values are: user for User, assistant for Assistant.
sort_by
optional string
Sort by. Possible values are: id for Date created. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional int
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Store

API endpoint:

POST
https://templify.ai/api/v1/messages

Request example:

curl --location --request POST 'https://templify.ai/api/v1/messages' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'description={description}'
Parameter
Type
Description
name
required string
The chat name.
chat_id
required string
The chat ID the message to be saved under.
role
required string
The role of the message. Possible values are: user for User, assistant for Assistant.