SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester
smart chat

Check a file sent to this service: ready, waiting for upload, or refused and why.

Check a file sent to this service: ready, waiting for upload, or refused and why.

GEThttps://app.softsolz.uk/api/v1/services/smart-chat/files/{file_id}

Recent Requests

Log in to see full request history
TimeStatusUser Agent
Make a request to see history.

Path Params

file_idstringrequired

Headers

Authorizationstringrequired

Bearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.

Response

Response Body

file_idstringPass this id to the service to use the file.
statusstringready means the file passed every check and can be used.
file_namestringCleaned file name.
kindstring | nullWhat the file turned out to be, read from its bytes.
mimestring | nullMedia type read from the bytes.
size_bytesintegerSize in bytes.
sha256string | nullHex SHA-256 of the file.
reject_codestring | nullWhy the file was refused, when status is rejected.
expires_atstring | nullWhen the file (or, before upload, the link) stops working.
created_atstringWhen it was created.

Request

import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.smartChat.getFile('<file_id>');
console.log(result);

Credentials

Sent as a Bearer token. Stored only in your browser.

Response · 200

{
"data": {
"file_id": "string",
"status": "string",
"file_name": "string",
"kind": "string",
"mime": "string",
"size_bytes": 0,
"sha256": "string",
"reject_code": "string",
"expires_at": "string",
"created_at": "string"
}
}