StoredFile

Update stored file details

Updates writable fields on the given stored file.

post/v1/projects/{project_id}/files/{id}

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/projects/{project_id}/files/{id}
  • Auth: one of:
    • HTTP basic
    • OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)

Path parameters

project_idstring required

ID of the Project

idstring required

ID of the StoredFile

Request body

filenamestring

Filename of the stored file

descriptionstring

Description of the file

varsobject

Custom variables stored for this stored file. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.

Example request

{
  "filename": "image.jpg"
}

Response

Successful response

idstring

ID of the stored file

filenamestring

Filename of the stored file

typestring

MIME type of the file

sizeinteger

Size of the file in bytes

descriptionstring nullable

Description of the file

varsobject

Custom variables stored for this stored file. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.

category'outgoing_media' | 'incoming_media' | 'call_audio' | 'test_recording' | 'script_module' | 'icon'

Category of the stored file

source'upload' | 'recording' | 'message' | 'api'

How the stored file was created

message_idstring nullable

ID of the message associated with this file, if any. Files associated with a message are deleted automatically when the message is deleted.

sha256string nullable

SHA-256 hash of the file content (lowercase hex), if available

time_createdinteger

Time the file was created in Telerivet

user_idstring nullable

ID of the Telerivet user who created the file (if applicable)

urlstring

URL where the file content can be downloaded. Note: this URL is temporary and may not be valid for more than 1 day; retrieve the stored file again to get a fresh URL.

thumbnail_urlstring nullable

URL of a thumbnail image for video files, if available. Note: this URL is temporary and may not be valid for more than 1 day.

project_idstring

ID of the project this file belongs to

Example response

{
  "id": "SF2c72e0be64f38ea9",
  "filename": "image.jpg",
  "type": "image/jpeg",
  "size": 482133,
  "category": "outgoing_media",
  "source": "api",
  "message_id": "SM66bba24d8b6a3a25",
  "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "time_created": 1751980000,
  "user_id": "URba3e403e98f49735",
  "project_id": "PJ2ad0100821a98bea"
}

Changes

No recorded changes to this operation across all 1 revision of this API.