Pin or unpin an agent chat
Pins or unpins an in-app agent chat for the authenticated user. Pin state is per-user and only affects the caller’s chat history.
PATCH
/agent-chats/{chatId}/pinAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
chatIdstringrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsonpinnedbooleanrequiredWhether the chat should be pinned
Responses
200
pinnedAtobject | nullsuccessbooleanrequired401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Chat not found
Request
curl -X PATCH "https://leadtime.app/api/public/agent-chats/string/pin" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pinned": true
}'const response = await fetch("https://leadtime.app/api/public/agent-chats/string/pin", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"pinned": true
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/agent-chats/string/pin",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"pinned": True
},
)Response
{
"pinnedAt": {},
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Chat not found