For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETList client tokens
      • POSTCreate client token
      • GETGet client token
      • PUTUpdate client token
      • DELDelete client token
      • GETGet client token value
      • POSTRegenerate client token
      • GETList conversations for client token
Dashboard
LogoLogo
Runtype APIClient Tokens

Update client token

PUT
/v1/client-tokens/:id
PUT
/v1/client-tokens/:id
$curl -X PUT https://api.runtype.com/v1/client-tokens/id \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "clientToken": {
3 "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
4 "name": "Mobile App Client Token",
5 "flowIds": [
6 "flow-1234abcd"
7 ],
8 "defaultFlowId": "flow-1234abcd",
9 "agentIds": [
10 "agent-5678efgh"
11 ],
12 "allowedOrigins": [
13 "https://app.example.com"
14 ],
15 "environment": "test",
16 "pinToVersion": "v2.3.1",
17 "rateLimitPerMinute": 500,
18 "rateLimitPerHour": 8000,
19 "maxMessagesPerSession": 100,
20 "sessionIdleTimeoutMinutes": 30,
21 "config": {},
22 "isActive": true,
23 "tokenPrefix": "MTK",
24 "tokenHint": "mobile-app",
25 "tokenValue": "abc123xyz789tokenvalue",
26 "lastUsedAt": "2024-06-10T15:45:00Z",
27 "createdAt": "2023-11-01T09:00:00Z",
28 "updatedAt": "2024-06-10T15:50:00Z",
29 "conversationCount": 245
30 },
31 "warnings": [
32 {
33 "type": "info",
34 "message": "Rate limits updated successfully."
35 }
36 ]
37}
Update fields on an existing client token.
Was this page helpful?
Previous

Delete client token

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Request

This endpoint expects an object.
namestringOptional1-255 characters
flowIdslist of stringsOptional
defaultFlowIdstringOptional
agentIdslist of stringsOptional
allowedOriginslist of stringsOptional
pinToVersionstringOptional
rateLimitPerMinutedoubleOptional1-1000
rateLimitPerHourdoubleOptional1-10000
maxMessagesPerSessiondoubleOptional1-1000
sessionIdleTimeoutMinutesdoubleOptional1-1440
configmap from strings to anyOptional
isActivebooleanOptional

Response

Updated client token
clientTokenobject
warningslist of objects

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error