Skip to content

Patch a content instance
Stable

Request

Partially updates the metadata of an existing content item in the enterprise's Content Management library. Only tags and description can be updated — the file itself and its core properties (filename, size, MIME type, path) cannot be modified through this endpoint.

Request body fields (all optional)

Replaces the existing tag array with the new set of tag strings provided Updates the human-readable description for the content item

Common Use Cases

Adding or correcting tags to improve discoverability via the search parameter on GET /v0/enterprise/{enterprise_id}/content/ Updating a description to reflect a file's current purpose after it has changed Retroactively tagging content that was uploaded without tags

Best Practices

Tags is a full replacement, not an append — if you want to add a tag while preserving existing ones, retrieve the current tags first via GET /v0/enterprise/{enterprise_id}/content/{content_id}/ and include them all in the patch body This endpoint cannot be used to replace or rename the file itself — upload a new file via POST /v0/enterprise/{enterprise_id}/content/upload/ and delete the old one if the file content needs to change Apply consistent, descriptive tags across your library to make content searchable and auditable

Security
esper_cloud_api_apiKey
Path
content_idstring, (uuid)required

A UUID string identifying a content instance.

enterprise_idstringrequired

A UUID string identifying enterprise.

Body*/*
tagsArray of strings(Tags)

Tags for the content

descriptionstring(Description)

Description of the content

cURL
curl -i -X PATCH \
  'https://api.esper.io/_mock/openapi/v0/enterprise/{enterprise_id}/content/{content_id}/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: */*' \
  -d '{
    "tags": [
      "string"
    ],
    "description": "string"
  }'

Responses

successful operation

Bodyapplication/json
idinteger(Id)read-onlyrequired

Unique content Identifier

download_urlstring, (url)(Content download URL)

URL to download the content

namestring(Name)

Name of the content

keystring, [ 1 .. 255 ] characters(Key)
is_dirboolean(Is Directory)
Default:false
kindstring or null, <= 255 characters(Content kind)

The mime type of the content

hashstring(Content Hash)

Hash string of the content

sizestring, <= 255 characters(Content Size)

Size of the content in bytes

pathstring(Path)

Path to the content

permissionsstring(Permissions)

The permssion string for the content

tagsArray of strings(Content tags)

Tags for the content

descriptionstring or null(Content description)

Description for the content

createdstring, (date-time)(Created on)read-only
modifiedstring, (date-time)(Modified on)read-only
enterprisestring, (url)(Enterprise)

URL of the enterprise resource

ownerobject(Owner)

Owner of the content

Response
{ "id": 0, "download_url": "string", "name": "string", "key": "string", "is_dir": false, "kind": "string", "hash": "string", "size": "string", "path": "string", "permissions": "string", "tags": [ "string" ], "description": "string", "created": "2019-08-24T14:15:22Z", "modified": "2019-08-24T14:15:22Z", "enterprise": "string", "owner": { "id": 0, "username": "string" } }