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.
Log inGet Paid
DocumentationAPI Reference
DocumentationAPI Reference
  • Introduction
    • Overview
  • API Reference
      • GETList agents
      • POSTCreate Agent
      • GETGet agent by ID
      • PUTUpdate Agent
      • DELDelete agent
      • GETGet agent by external ID
      • PUTUpdate agent by external ID
      • DELDelete agent by external ID
LogoLogo
Log inGet Paid
API Referenceagents

Update Agent

Deprecated
PUT
https://api.agentpaid.io/api/v1/agents/:agentId
PUT
/api/v1/agents/:agentId
1import { PaidClient } from "@paid-ai/paid-node";
2
3async function main() {
4 const client = new PaidClient({
5 token: "YOUR_TOKEN_HERE",
6 });
7 await client.agents.update("agentId", {
8 body: {
9 name: "Acme Agent (Updated)",
10 agentAttributes: [
11 {
12 name: "Emails sent signal",
13 active: true,
14 pricing: {
15 taxable: true,
16 chargeType: "usage",
17 pricingModel: "PerUnit",
18 billingFrequency: "monthly",
19 pricePoints: {
20 "USD": {
21 tiers: [
22 {
23 unitPrice: 100,
24 minQuantity: 0,
25 maxQuantity: 10,
26 },
27 {
28 unitPrice: 90,
29 minQuantity: 11,
30 maxQuantity: 100,
31 },
32 {
33 unitPrice: 80,
34 minQuantity: 101,
35 },
36 ],
37 },
38 },
39 eventName: "emails_sent",
40 },
41 },
42 ],
43 },
44 });
45}
46main();
200agents_update_example
1{
2 "id": "63fd642c-569d-44f9-8d67-5cf4944a16cc",
3 "organizationId": "string",
4 "name": "Acme Agent (Updated)",
5 "active": true,
6 "externalId": "acme-agent",
7 "description": "Acme Agent is an AI agent that does things.",
8 "agentAttributes": [
9 {
10 "name": "Emails sent signal",
11 "active": true,
12 "pricing": {
13 "taxable": true,
14 "chargeType": "usage",
15 "pricingModel": "PerUnit",
16 "billingFrequency": "monthly",
17 "pricePoints": {
18 "USD": {
19 "tiers": [
20 {
21 "unitPrice": 100,
22 "minQuantity": 0,
23 "maxQuantity": 10
24 },
25 {
26 "unitPrice": 90,
27 "minQuantity": 11,
28 "maxQuantity": 100
29 },
30 {
31 "unitPrice": 80,
32 "minQuantity": 101
33 }
34 ]
35 }
36 },
37 "eventName": "emails_sent"
38 }
39 }
40 ]
41}

DEPRECATED: Use PUT /products/{productId} instead.

Was this page helpful?
Previous

Delete agent

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

agentIdstringRequired

Request

This endpoint expects an object.
namestringOptional
descriptionstringOptional
externalIdstringOptional
activebooleanOptional
agentCodestringOptional
agentAttributeslist of objectsOptional

Response

Success response
idstring
organizationIdstring
namestring
activeboolean
externalIdstring
descriptionstring
agentCodestring
agentAttributeslist of objects