List Code Templates
curl --request GET \
--url https://app.thinnest.ai/api/v1/codes/templates \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/codes/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/codes/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "5e1d8c3b-7a2f-4d96-b4e0-9c6a2f1d8e73",
"name": "login_code",
"language": "en",
"status": "approved",
"reviewNote": null,
"settings": {
"expiryMinutes": 10,
"securityRecommendation": true,
"button": "copy_code",
"apps": []
},
"preview": {
"body": "*123456* is your verification code. For your security, do not share this code.",
"footer": "Expires in 10 minutes."
},
"agent": "ag_2c7e9a14-5b3d-4f8e-a1c6-7d9b0e3f5a21",
"createdAt": "2026-09-28T11:20:43.551Z"
}
],
"nextCursor": null
}{
"error": "`name` must be 1 to 80 characters."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}One-time codes
List Code Templates
Your workspace’s authentication templates — drafts, those in review and approved ones — newest first.
GET
/
codes
/
templates
List Code Templates
curl --request GET \
--url https://app.thinnest.ai/api/v1/codes/templates \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/codes/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/codes/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "5e1d8c3b-7a2f-4d96-b4e0-9c6a2f1d8e73",
"name": "login_code",
"language": "en",
"status": "approved",
"reviewNote": null,
"settings": {
"expiryMinutes": 10,
"securityRecommendation": true,
"button": "copy_code",
"apps": []
},
"preview": {
"body": "*123456* is your verification code. For your security, do not share this code.",
"footer": "Expires in 10 minutes."
},
"agent": "ag_2c7e9a14-5b3d-4f8e-a1c6-7d9b0e3f5a21",
"createdAt": "2026-09-28T11:20:43.551Z"
}
],
"nextCursor": null
}{
"error": "`name` must be 1 to 80 characters."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace.
Example:
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Query Parameters
How many items to return, 1 to 100.
Required range:
1 <= x <= 100The nextCursor from the previous page. Leave it out for the first page.