List prompts
curl --request GET \
--url https://api.langdock.com/prompts/v1 \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.langdock.com/prompts/v1"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.langdock.com/prompts/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.langdock.com/prompts/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.langdock.com/prompts/v1"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.langdock.com/prompts/v1")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/prompts/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"prompts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"prompt": "<string>",
"sharedWithWorkspace": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptFolderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Prompt Library API
List Prompts
Retrieve prompts in your workspace
GET
/
prompts
/
v1
List prompts
curl --request GET \
--url https://api.langdock.com/prompts/v1 \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.langdock.com/prompts/v1"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.langdock.com/prompts/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.langdock.com/prompts/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.langdock.com/prompts/v1"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.langdock.com/prompts/v1")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/prompts/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"prompts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"prompt": "<string>",
"sharedWithWorkspace": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptFolderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Returns prompts you can access in your workspace. Use query parameters to paginate, search, or filter by folder and workspace sharing.
Base URL
https://api.langdock.com/prompts/v1
Dedicated deploymentsReplace
api.langdock.com with <your-deployment-url>/api/public in all requests.Required Scopes
This endpoint requires thePROMPT_API scope.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Number of prompts to return. Default: 50. Maximum: 250. |
cursor | string | No | Cursor from the previous response for pagination. |
query | string | No | Search query matched against prompt title and content. |
promptFolderId | string | No | Filter by prompt folder UUID. |
sharedWithWorkspace | string | No | Filter by workspace sharing. Allowed values: true, false. |
Example
const axios = require("axios");
async function listPrompts() {
const response = await axios.get("https://api.langdock.com/prompts/v1", {
params: {
limit: 25,
query: "support"
},
headers: {
Authorization: "Bearer YOUR_API_KEY"
}
});
console.log("Prompts:", response.data.prompts);
return response.data.nextCursor;
}
listPrompts();
Response Format
Success Response (200 OK)
{
prompts: Array<{
id: string;
title: string;
prompt: string;
createdBy: string | null;
promptFolderId: string | null;
sharedWithWorkspace: boolean;
createdAt: string | null;
updatedAt: string | null;
}>;
nextCursor?: string;
}
Example Response
{
"prompts": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Support Reply",
"prompt": "Write a concise customer reply. Include the next best action.",
"createdBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"promptFolderId": null,
"sharedWithWorkspace": true,
"createdAt": "2026-07-28T10:30:00.000Z",
"updatedAt": "2026-07-28T10:30:00.000Z"
}
],
"nextCursor": "550e8400-e29b-41d4-a716-446655440000"
}
Error Handling
| Status Code | Description |
|---|---|
| 400 | Invalid query parameter |
| 401 | Invalid or missing API key |
| 403 | Missing PROMPT_API scope or workspace access |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.
Authorizations
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Query Parameters
Number of prompts to return.
Required range:
1 <= x <= 250Cursor from the previous response for pagination.
Search query matched against prompt title and content.
Filter by prompt folder UUID.
Filter by workspace sharing.
Available options:
true, false Was this page helpful?