Agents

Get a published agent version (Preview)

Preview · Available to selected organizations. Returns the immutable definition of one published version. Use this endpoint to get a published agent version through the Samva email API.

GET
/v1/agents/{id}/versions/{version}

Returns the immutable definition of one published version.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^agt_[0-9a-hjkmnp-tv-z]{16,24}$
version*string

Response Body

AgentVersion

application/json
  1. response
agentId*AgentId
Match^agt_[0-9a-hjkmnp-tv-z]{16,24}$
version*integer
Range-9007199254740991 <= value <= 9007199254740991
definition*
publishedAt*string
modelFallback*|null
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.agents.getVersion({  "id": "example",  "version": "example"});
Example Response
{  "agentId": "string",  "version": -9007199254740991,  "definition": {    "instructions": "string",    "knowledge": "string",    "knowledgeSourceIds": [      "string"    ],    "endpointIds": [      "string"    ],    "integrations": [      {        "integrationId": "string",        "tools": {          "kind": "all"        },        "requireApproval": [          "string"        ]      }    ],    "mode": "live",    "model": "standard",    "reasoning": "auto",    "workingHours": {      "timeZone": "string",      "ranges": [        {          "day": "monday",          "opens": "string",          "closes": "string"        }      ]    },    "takeoverTimeoutMinutes": 1  },  "publishedAt": "string",  "modelFallback": {    "from": "string",    "to": "standard",    "reason": "candidate",    "since": "string"  }}

Related documentation