Skip to main content
PUT
/
file
/
{file_id}
/
namespaces
Update file namespace assignments
curl --request PUT \
  --url https://api.vidnavigator.com/v1/file/{file_id}/namespaces \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "namespace_ids": [
    "64a1b2c3d4e5f6789..."
  ]
}
'
{
  "status": "success",
  "message": "<string>",
  "data": {
    "namespace_ids": [
      "<string>"
    ],
    "namespaces": [
      {
        "id": "<string>",
        "name": "<string>"
      }
    ]
  }
}
Set which namespaces a file belongs to. This replaces any existing namespace assignments for the file. The default namespace is always preserved.

Overview

Use this endpoint to move a file between namespaces or assign it to multiple namespaces at once. The response returns the updated namespace_ids and resolved namespaces reflecting the new assignments.

Example Request

curl -X PUT "https://api.vidnavigator.com/v1/file/file_abc123/namespaces" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "namespace_ids": ["64a1b2c3d4e5f6789abc0002", "64a1b2c3d4e5f6789abc0003"]
  }'

Success Response

{
  "status": "success",
  "message": "File namespaces updated successfully",
  "data": {
    "namespace_ids": ["64a1b2c3d4e5f6789abc0001", "64a1b2c3d4e5f6789abc0002", "64a1b2c3d4e5f6789abc0003"],
    "namespaces": [
      { "id": "64a1b2c3d4e5f6789abc0001", "name": "default" },
      { "id": "64a1b2c3d4e5f6789abc0002", "name": "Client Calls" },
      { "id": "64a1b2c3d4e5f6789abc0003", "name": "Product Demos" }
    ]
  }
}
The default namespace is always preserved in the response, even if not explicitly included in namespace_ids.

Authorizations

X-API-Key
string
header
required

API key authentication. Include your VidNavigator API key in the X-API-Key header.

Path Parameters

file_id
string
required

The ID of the file to update

Body

application/json
namespace_ids
string[]
required

List of namespace IDs to assign to this file

Example:
["64a1b2c3d4e5f6789..."]

Response

File namespaces updated successfully

status
enum<string>
Available options:
success
message
string
data
object