Chats

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/chats

Request example:

curl --location --request GET 'https://chatgptbot.ch/api/v1/chats' \
--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: name for Name. Defaults to: name.
favorite
optional boolean
Nach Favorit filtern.
sort_by
optional string
Sortieren nach. Possible values are: id for Erstellungsdatum, name for Name. 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.
Zeigen

API endpoint:

GET
https://chatgptbot.ch/api/v1/chats/{id}

Request example:

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

API endpoint:

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

Request example:

curl --location --request POST 'https://chatgptbot.ch/api/v1/chats' \
--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.
behavior
optional string
Das Verhalten des Assistenten.
Aktualisieren

API endpoint:

PUT PATCH
https://chatgptbot.ch/api/v1/chats/{id}

Request example:

curl --location --request PUT 'https://chatgptbot.ch/api/v1/chats/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
Parameter
Typ
Beschreibung
name
optional string
The chat name.
behavior
optional string
Das Verhalten des Assistenten.
favorite
optional boolean
Whether the chat is favorite or not.
Löschen

API endpoint:

DELETE
https://chatgptbot.ch/api/v1/chats/{id}

Request example:

curl --location --request DELETE 'https://chatgptbot.ch/api/v1/chats/{id}' \
--header 'Authorization: Bearer {api_key}'