POST
/
files
/
create
curl --request POST \
  --url https://api.duohub.ai/files/create \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "meeting_recording.mp3",
  "key": "raw/meeting_recording.mp3",
  "external_uri": "https://example.com/meeting_recording.mp3",
  "fileType": "audio"
}'
{
  "status": "success",
  "data": {
    "id": "<string>",
    "name": "<string>",
    "extension": "<string>",
    "fileType": "<string>",
    "category": "<string>",
    "bronzeKey": "<string>",
    "organisationID": "<string>",
    "externalURI": "<string>",
    "numSpeakers": 123,
    "originRegion": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

If you are not adding a web address, you must pass the key returned from the /files/upload endpoint to the key param in the /files/create endpoint or file processing will fail.

Authorizations

X-API-Key
string
header
required

Your duohub API key. Type: str

Body

application/json
name
string
required

Name of the file

id
string

Optional unique identifier for the file. If not provided, a UUID will be generated.

key
string

Storage key for the file

externalURI
string

External URI for the file

fileType
enum<string>

Type of the file

Available options:
website,
sitemap,
website_bulk,
document,
text,
image,
audio,
video,
other

Response

201 - application/json
File created successfully
status
enum<string>
required
Available options:
success
data
object
required