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
      • GETList conversations for client token
      • POSTRegenerate client token
      • GETGet client token value
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: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "allowedOrigins": [
> "https://example.com",
> "https://app.example.com"
> ],
> "config": {
> "theme": {
> "mode": "dark",
> "primaryColor": "#28a745"
> },
> "welcomeMessage": "Welcome! How can I assist you?"
> },
> "isActive": true,
> "name": "Updated Widget Name",
> "rateLimitPerMinute": 20
>}'
1{
2 "clientToken": {
3 "agentIds": [
4 "string"
5 ],
6 "allowedOrigins": [
7 "string"
8 ],
9 "config": {},
10 "createdAt": "string",
11 "defaultFlowId": "string",
12 "environment": "test",
13 "flowIds": [
14 "string"
15 ],
16 "id": "string",
17 "isActive": true,
18 "lastUsedAt": "string",
19 "maxMessagesPerSession": 1,
20 "name": "string",
21 "pinToVersion": "string",
22 "rateLimitPerHour": 1,
23 "rateLimitPerMinute": 1,
24 "sessionIdleTimeoutMinutes": 1,
25 "tokenHint": "string",
26 "tokenPrefix": "string",
27 "tokenValue": "string",
28 "updatedAt": "string",
29 "conversationCount": 1
30 },
31 "warnings": [
32 {
33 "message": "string",
34 "type": "string"
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.
agentIdslist of stringsOptional
allowedOriginslist of stringsOptional
configmap from strings to anyOptional
defaultFlowIdstringOptional
flowIdslist of stringsOptional
isActivebooleanOptional
maxMessagesPerSessiondoubleOptional1-1000
namestringOptional1-255 characters
pinToVersionstringOptional
rateLimitPerHourdoubleOptional1-10000
rateLimitPerMinutedoubleOptional1-1000
sessionIdleTimeoutMinutesdoubleOptional1-1440

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