Nachrichten

Notizen
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Holen Sie sich Ihren API-Schlüssel.
Aufführen

API endpoint:

GET
https://chatgptbot.ch/api/v1/messages

Request example:

curl --location --request GET 'https://chatgptbot.ch/api/v1/messages' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Typ
Beschreibung
search
optional string
Die Suchanfrage.
search_by
optional string
Suchen nach. Possible values are: message for Nachricht. Defaults to: message.
chat_id
optional string
Filter by chat ID.
role
optional string
Filter by role. Possible values are: user for Benutzer, assistant for Assistent.
sort_by
optional string
Sortieren nach. Possible values are: id for Erstellungsdatum. Defaults to: id.
sort
optional string
Sortieren. Possible values are: desc for Absteigend, asc for Aufsteigend. Defaults to: desc.
per_page
optional integer
Ergebnisse pro Seite. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Store

API endpoint:

POST
https://chatgptbot.ch/api/v1/messages

Request example:

curl --location --request POST 'https://chatgptbot.ch/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
Typ
Beschreibung
name
erforderlich string
The chat name.
chat_id
erforderlich string
The chat ID the message to be saved under.
role
erforderlich string
The role of the message. Possible values are: user for Benutzer, assistant for Assistent.