POST
/
v1
/
sessions
/
{sessionId}
/
uploads
JavaScript
import Anchorbrowser from 'anchorbrowser';

const client = new Anchorbrowser({
  apiKey: 'Your API Key',
});

const response = await client.sessions.uploadFile('550e8400-e29b-41d4-a716-446655440000', {
  file: fs.createReadStream('path/to/file'),
});

console.log(response.data);
{
  "data": {
    "status": "success",
    "message": "File saved at /uploads/example.txt"
  }
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Path Parameters

sessionId
string<uuid>
required

The browser session ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

multipart/form-data

Response

200
application/json

File uploaded successfully

The response is of type object.