curl --request POST \
--url https://app.thinnest.ai/api/v1/codes/templates/{id}/submit \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/codes/templates/{id}/submit', 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/{id}/submit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "5e1d8c3b-7a2f-4d96-b4e0-9c6a2f1d8e73",
"name": "login_code",
"language": "en",
"status": "pending",
"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-10-06T10:02:17.904Z"
}{
"error": "Thinnest-Workspace needs a developer workspace. Create a customer first with POST /v1/customers.",
"code": "workspace_not_developer"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "One-time codes need a plan with WhatsApp. Pay as you go has no monthly fee."
}{
"error": "That template was not found."
}{
"error": "Connect a WhatsApp number first — this is submitted to your own WhatsApp Business Account, and until one is connected there is no account to submit it to."
}{
"error": "This workspace was deleted on 2026-10-06 and is erased on 2026-11-05. POST /v1/customers/{id}/restore brings it back until then.",
"code": "workspace_deleted"
}{
"error": "(#2388024) Content in this language already exists"
}{
"error": "Over 240 requests a minute. Slow down and retry.",
"code": "rate_limit_resources",
"limit": {
"name": "resources",
"perMinute": 240
}
}{
"error": "WhatsApp is not configured on this deployment yet."
}Submit Code Template
Sends a draft to WhatsApp for review, on your workspace’s own WhatsApp Business Account — so a connected number is needed first. The status moves to pending only when WhatsApp took it. Review usually takes minutes; a template.* webhook and Get Code Template tell you how it went. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/codes/templates/{id}/submit \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/codes/templates/{id}/submit', 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/{id}/submit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "5e1d8c3b-7a2f-4d96-b4e0-9c6a2f1d8e73",
"name": "login_code",
"language": "en",
"status": "pending",
"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-10-06T10:02:17.904Z"
}{
"error": "Thinnest-Workspace needs a developer workspace. Create a customer first with POST /v1/customers.",
"code": "workspace_not_developer"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "One-time codes need a plan with WhatsApp. Pay as you go has no monthly fee."
}{
"error": "That template was not found."
}{
"error": "Connect a WhatsApp number first — this is submitted to your own WhatsApp Business Account, and until one is connected there is no account to submit it to."
}{
"error": "This workspace was deleted on 2026-10-06 and is erased on 2026-11-05. POST /v1/customers/{id}/restore brings it back until then.",
"code": "workspace_deleted"
}{
"error": "(#2388024) Content in this language already exists"
}{
"error": "Over 240 requests a minute. Slow down and retry.",
"code": "rate_limit_resources",
"limit": {
"name": "resources",
"perMinute": 240
}
}{
"error": "WhatsApp is not configured on this deployment yet."
}Authorizations
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. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Response
Submitted; the template is now pending.