curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/connections/records/link \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/connections/records/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/connections/records/link"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"url": "https://app.thinnest.ai/r/Vb9TzPq4Lwk7Qm2x",
"passcode": "730518",
"message": "New link created. The old one stopped working."
}Replace Records Link
Make a new link to read the records the agent collects, with a new passcode — shown in this response and never again. The old link stops working at once, which is also how a link shared too widely is revoked. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/connections/records/link \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/connections/records/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/connections/records/link"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"url": "https://app.thinnest.ai/r/Vb9TzPq4Lwk7Qm2x",
"passcode": "730518",
"message": "New link created. The old one stopped working."
}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"