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.
Sample appsIntegrationsDiscordPlaygroundDevEx repo
GuidesSDK ReferenceAPI Reference
GuidesSDK ReferenceAPI Reference
  • TwelveLabs API
    • Introduction
    • Authentication
  • API Reference
    • Manage indexes
    • Upload content
    • Index content
    • Manage videos
    • Manage entities
      • GETList entity collections
      • POSTCreate an entity collection
      • GETRetrieve an entity collection
      • PATCHUpdate an entity collection
      • DELDelete an entity collection
      • GETList entities in an entity collection
      • POSTCreate an entity
      • POSTCreate multiple entities in bulk
      • GETRetrieve an entity
      • PATCHUpdate an entity
      • DELDelete an entity
      • POSTAdd assets to an entity
      • DELRemove assets from an entity
      • GETList entities for an asset
    • Any-to-video search
    • Create embeddings v2
    • Create embeddings v1
    • Analyze and segment videos
    • Error codes
LogoLogo
Sample appsIntegrationsDiscordPlaygroundDevEx repo
API ReferenceManage entities

Update an entity

PATCH
https://api.twelvelabs.io/v1.3/entity-collections/:entity_collection_id/entities/:entity_id
PATCH
/v1.3/entity-collections/:entity_collection_id/entities/:entity_id
$curl -X PATCH https://api.twelvelabs.io/v1.3/entity-collections/6298d673f1090f1100476d4c/entities/6298d673f1090f1100476d4c \
> -H "x-api-key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "_id": "6298d673f1090f1100476d4c",
3 "entity_collection_id": "7309e784f2191g2211587e5d",
4 "name": "John Doe",
5 "description": "Famous soccer player",
6 "metadata": {
7 "sport": "soccer",
8 "team": "Team A",
9 "role": "forward"
10 },
11 "asset_ids": [
12 "6298d673f1090f1100476d4c",
13 "6298d673f1090f1100476d4d"
14 ],
15 "status": "ready",
16 "created_at": "2022-06-02T10:30:00Z",
17 "updated_at": "2022-06-02T10:30:00Z"
18}
This method updates the specified entity within an entity collection. This operation allows modification of the entity's name, description, or metadata. Note that this endpoint does not affect the assets associated with the entity.
Was this page helpful?
Previous

Delete an entity

Next
Built with

Authentication

x-api-keystring
Your API key. <Note title="Note"> You can find your API key on the <a href="https://playground.twelvelabs.io/dashboard/api-keys" target="_blank">API Keys</a> page. </Note>

Path parameters

entity_collection_idstringRequired
The unique identifier of the entity collection containing the entity to be updated.
entity_idstringRequired
The unique identifier of the entity to update.

Request

This endpoint expects an object.
namestringOptional
The new name for the entity.
descriptionstringOptional
An updated description for the entity.
metadataobjectOptional

Updated metadata for the entity. If provided, this completely replaces the existing metadata. Use this to store custom key-value pairs related to the entity.

Response

The entity has been successfully updated.
_idstring
The unique identifier of the entity.
entity_collection_idstring
The unique identifier of the entity collection this entity belongs to.
namestring
The name of the entity.
descriptionstring
A description of the entity.
metadataobject
Custom metadata for the entity.
asset_idslist of strings
An array of asset IDs associated with the entity.
statusenum

The current status of the entity creation process.

Values:

  • processing: The entity is being processed and is not yet ready for use in searches.
  • ready: The entity is fully processed and can be used in search queries.
Allowed values:
created_atstringformat: "date-time"

The date and time, in RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”), when the entity was created.

updated_atstringformat: "date-time"

The date and time, in RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”), when the entity was last updated.

Errors

400
Bad Request Error

Your API key.

Note

You can find your API key on the API Keys page.