Groundeddocs
ReferenceAgents

Validate the draft strictly and publish it as a new immutable version (editors)

POST/v1/teams/{team}/agents/{agentId}/publish

The draft's audience becomes the agent's grant. 403 audience_forbidden when an editor publishes beyond the team; 422 agent_invalid when the classification's max audience is exceeded (field audience); 409 public_disabled while public access is off and 409 moderation_not_ready without a working public moderation policy. Publishing to a wider audience than before notifies the team's owners.

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

curl -X POST "https://example.com/v1/teams/string/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/publish" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "version": 0,    "publishedAt": "2019-08-24T14:15:22Z",    "publishedBy": "cbfccdb4-87bb-4311-ae53-25484c11300e",    "publishedByName": "string",    "note": "string",    "chatModelId": "be51c0fa-7268-4cb1-a7cb-78cca4ed0c33",    "chatModelName": "string",    "effectiveRank": 0,    "classification": "string",    "knowledgeBases": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "topK": 0,        "inherited": true      }    ],    "config": {      "instructions": "string",      "chatModelId": "be51c0fa-7268-4cb1-a7cb-78cca4ed0c33",      "temperature": 0,      "maxOutputTokens": 1,      "reasoningEffort": "low",      "kbs": [        {          "kbId": "a6a9e4cd-2268-4a05-9203-ebd30485b88f",          "topK": 1        }      ],      "retrievalMode": "always",      "maxTurns": 1,      "contextTokenBudget": 500,      "filters": {        "sourceIds": [          "1142aa4e-ac22-46dd-ac6a-fc70d264bc91"        ],        "kinds": [          "pdf"        ],        "tags": [          "string"        ],        "urlPrefixes": [          "string"        ],        "updatedAfter": "2019-08-24T14:15:22Z",        "updatedBefore": "2019-08-24T14:15:22Z"      },      "minSimilarity": 0,      "strictlyGrounded": true,      "refusalMessage": "string",      "citationMode": "none",      "queryRewrite": true,      "moderation": {        "categories": {          "property1": {            "input": {              "action": "off",              "threshold": 0            },            "output": {              "action": "off",              "threshold": 0            }          },          "property2": {            "input": {              "action": "off",              "threshold": 0            },            "output": {              "action": "off",              "threshold": 0            }          }        },        "outputMode": "",        "severityBlock": 0      },      "audience": "team",      "systemOne": {        "judging": "",        "candidates": 1,        "citations": "",        "citationMode": "",        "scope": ""      }    }  }}