Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt

Use this file to discover all available pages before exploring further.

Promotes a draft version to production.
POST https://services.leadconnectorhq.com/agent-studio/agent/versions/{versionId}/publish

Autorizacion

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticacion.
Version
string
default:"2021-07-28"
required
Version de la API.

Path parameters

versionId
string
default:"v1a2b3c4d5e6f7g8h9i0"
required

Query parameters

source
string
default:"api"

Body

locationId
string
default:"C2QujeCh8ZnC7al2InWR"
required
Account ID for authorization
userId
string
default:"usr_abc123def456"
User ID performing the promotion action
userName
string
default:"John Doe"
User name performing the promotion action
userEmail
string
default:"john.doe@example.com"
User email performing the promotion action

Respuestas

success
boolean
default:"True"
required
Success status
message
string
required
Response message
data
object
required
Result data with production and new draft version details
{
  "success": true,
  "message": "Draft published to production successfully. New draft version created for future edits.",
  "data": {
    "productionVersion": {
      "versionId": "v1a2b3c4d5e6f7g8h9i0",
      "agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
      "versionName": "Customer Support Agent v2",
      "state": "prod",
      "isPublished": true,
      "version": 2,
      "publishedAt": "2024-02-27T12:00:00.000Z",
      "publishedBy": "usr_abc123def456",
      "publishedByName": "John Doe",
      "publishedByEmail": "john.doe@example.com"
    },
    "newDraftVersion": {
      "versionId": "v2b3c4d5e6f7g8h9i0j1",
      "agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
      "versionName": "Customer Support Agent v3",
      "state": "draft",
      "isPublished": false,
      "version": 3,
      "createdAt": "2024-02-27T12:00:00.000Z"
    }
  }
}
{}
{}
statusCode
number
default:"500"
message
string
default:"Internal Server Error"
{
  "statusCode": 500,
  "message": "Internal Server Error"
}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId/publish' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "C2QujeCh8ZnC7al2InWR",
  "userId": "usr_abc123def456",
  "userName": "John Doe",
  "userEmail": "john.doe@example.com"
}'