Groundeddocs
ReferenceAgents

Create a publishable key (team admins and owners; audited). The full key is returned once.

POST/v1/teams/{team}/agents/{agentId}/publishable-keys

Path Parameters

team*string

Team slug or ID

agentId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/teams/string/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/publishable-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "Main website",    "allowedOrigins": [      "https://www.example.edu",      "https://*.example.edu"    ]  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2",    "name": "string",    "keyPreview": "pk_7Kq2Xw9pLm3a_…",    "allowedOrigins": [      "https://*.example.edu"    ],    "rateLimits": {      "perIpPerMinute": 0,      "perSessionPerMinute": 0    },    "enabled": true,    "revision": 0,    "lastUsedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "key": "string"  }}