Skip to content

Import with Youtube

Endpoint used to import with Youtube.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v2/extractor/youtube-separated \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '
{
"unityId": "<string>",
"datasetId": "<string>",
"urls": [
"<string>"
],
"folderId": "<string>"
}
'
{
"message": "Youtube content uploaded successfully",
"content": "",
"folder": {
"isRoot": false,
"id": "uuid",
"institutionId": "uuid",
"name": "<string>",
"knowLedgeBaseId": "uuid",
"knowLedgeBaseFile": [
{
"status": "ERROR | SUCCESS | PENDING",
"id": "uuid",
"institutionId": "uuid",
"fileName": "youtube-content-<uuid>.txt",
"internalStorageUrl": "<url>",
"url": "<url>",
"maskName": "Youtube Import <url>.txt",
"knowLedgeBaseId": "uuid",
"kbFolderId": "uuid",
"createdAt": "ISO8601_DATETIME",
"updatedAt": "ISO8601_DATETIME",
"extension": "txt",
"size": 123,
"customData": [
{
"id": "<youtube_url>"
}
],
"statusDescription": "<string> | null",
"tags": []
}
]
},
"urls": [
"<youtube_url>"
],
"files": [
{
"status": "PENDING | SUCCESS | ERROR",
"id": "uuid",
"maskName": "Youtube Import <url>.txt",
"url": "<url>",
"extension": "txt",
"size": 123,
"customData": [
{
"id": "<youtube_url>"
}
],
"kbFolder": {
"id": "uuid",
"name": "<string>",
"isRoot": false
}
}
]
}
ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
unityIdUUIDUnit identifier.Yes
datasetIdUUIDDataset identifier.Yes
urlsArrayList of Youtube URLs.Yes
folderIdUUIDFolder identifier.Yes
KeyTypeDescription
messageStringConfirmation message of the upload/import operation.
folder.idUUIDUnique identifier of the folder where the content is being organized.
folder.nameStringName of the folder linked in the Knowledge Base.
folder.knowLedgeBaseFile[]ArrayHistory or list of already existing files in this folder.
files[].idUUIDUnique identifier of the new record generated for the YouTube video.
files[].statusStringCurrent processing state (e.g., PENDING, SUCCESS, ERROR).
files[].maskNameStringFile display name (usually includes the original URL).
files[].urlURLLink to the text file that will contain the video transcript/data.
files[].statusDescriptionStringDetails about failures (e.g., “Invalid YouTube URL”) or progress information.
files[].customData[].idURLThe original YouTube video URL that was sent for import.
files[].sizeNumberGenerated file size in bytes.
files[].createdAtStringDate and time the import was requested (ISO 8601).
files[].kbFolderObjectSimplified data of the target folder associated with the file.
urls[]ArrayList with the origin URL(s) sent in the request.

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.

To access your access token, follow these steps:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page