Update a template

Change a template. Send only the parts you want to change. Changes reach objects that already exist, because every object keeps looking to its template. Adding an action opens it up for objects already out there; removing one takes it away from them. **Raising and lowering supply.** `max_supply` can move up or down, but never below the number already created — that comes back as `400`. The count of what has been created is kept for you and cannot be edited. A `start_time` in the past means "from now". Requires the `templates.update` permission.

PATCH
/templates/{templateId}
AuthorizationBearer <token>

The access token returned after a successful sign-in, sent as Authorization: Bearer <access_token>.

It identifies the person and the organization they are working in, and it lasts about fifteen minutes. When it runs out, use their refresh token at POST /auth/refresh-token instead of asking them to sign in again.

In: header

Path Parameters

templateId*string

Identifier of the template.

Request Body

application/json

The parts of the template to change.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.dual.network/templates/665f1c2d4b1a2c3d4e5f6ad0" \  -H "Content-Type: application/json" \  -d '{    "factory": {      "max_supply": 5000    }  }'
{}
{
  "code": 3,
  "message": "max_supply cannot be less than minted_count"
}

{
  "code": 16,
  "message": "no auth provided"
}

{
  "code": 13,
  "message": "internal error"
}