Vi har noen tekniske problemer med plattformen.🔨 Dette vil snart være fikset.

Chats

Notater
Ekspertnivå
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://ai.planr.no/api/v1/chats

Request example:

curl --location --request GET 'https://ai.planr.no/api/v1/chats' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Beskrivelse
search
optional string
Søket.
search_by
optional string
Søk etter. Mulige verdier er: name for Navn. Vanlig: name.
favorite
optional boolean
Filtrer etter favoritt.
sort_by
optional string
Sort by. Mulige verdier er: id for Date created, name for Navn. Vanlig: id.
sort
optional string
Sorter. Mulige verdier er: desc for Descending, asc for Ascending. Vanlig: desc.
per_page
optional integer
Resultater per side. Mulige verdier er: 10, 25, 50, 100. Vanlig: 10.
Show

API endpoint:

GET
https://ai.planr.no/api/v1/chats/{id}

Request example:

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

API endpoint:

POST
https://ai.planr.no/api/v1/chats

Request example:

curl --location --request POST 'https://ai.planr.no/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
Type
Beskrivelse
name
required string
The chat name.
behavior
optional string
The behavior of the assistant.
Update

API endpoint:

PUT PATCH
https://ai.planr.no/api/v1/chats/{id}

Request example:

curl --location --request PUT 'https://ai.planr.no/api/v1/chats/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Beskrivelse
name
optional string
The chat name.
behavior
optional string
The behavior of the assistant.
favorite
optional boolean
Whether the chat is favorite or not.
Slett

API endpoint:

DELETE
https://ai.planr.no/api/v1/chats/{id}

Request example:

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