Renaming a Transcription

πŸ“ Change the File Name of Your Order

Using the following code, you can change the file name of your transcription.

import requests
import json

# Replace these with your actual API key and endpoint
api_key = "your_api_key_here"
url = "https://api.tor.app/files/rename-file"

# Data to send in the request body
data = {
    "orderid": "123456789",
    "Tname": "new name of the transcription",
}

# Headers for the request
headers = {"Content-Type": "application/json", "Authorization": f"Bearer {api_key}"}

# Send POST request
response = requests.post(url, headers=headers, data=json.dumps(data))

# Print the response from the API
print("Status Code:", response.status_code)
print("Response Body:", response.json())

Response


200 OK

{
  "message": "File name updated successfully"
}

400 Bad Request

{
  "error": "Missing parameters"
}

404 Not Found

{
  "error": "OrderID not found"
}

500 Internal Server Error

{
  "message": "Internal Server Error"
}