Rename an assetMenu

Rename an asset

PATCH/v1/assets/{id}

Requires an API key with the templates:write scope. About keys and scopes

Works with integration, agent and partner keys.

Safe to retry: a repeat sets the same values again. About idempotency

Changes the name the library shows. The file, its filename and its url stay as they are, so emails using it are unaffected.

Path parameters

idstringrequired

The asset's id.

uuid

Header parameters

Kirora-Workspacestringoptional

Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

pattern ^[A-Za-z0-9._:-]{1,128}$

Request body

namestringrequired

The name the library shows.

1–200 characters

Returns

Returns 200 OK with an Asset in data. It can also return 409 Conflict, 413 Payload Too Large or 415 Unsupported Media Type; see the statuses below. Otherwise returns an error; Errors lists every code and which to retry.

  • 200 OKThe renamed asset.
  • 409 ConflictThe request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.
  • 413 Payload Too LargeThe body is larger than this operation accepts (PAYLOAD_TOO_LARGE).
  • 415 Unsupported Media TypeThe body is not JSON, or not the upload the operation takes (UNSUPPORTED_MEDIA_TYPE).
idstringrequired

uuid

typestringrequired

The kind of file: image. More kinds, such as video, may be added: branch on type and keep the ones you do not know.

one of image

namestringrequired

The name the library shows.

filenamestringrequired

The file's name as uploaded or copied.

urlstringrequired

The file's public address, such as an image src.

uri

mimeTypestringrequired

The file's format.

one of image/png, image/jpeg, image/gif

sizeBytesintegerrequired

File size in bytes.

min > 0

widthintegerrequired

The file's width in px.

min > 0

heightintegerrequired

The file's height in px.

min > 0

createdAtstringrequired

date-time