POST
/
v4
/
applications
/
upload-files
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const applicationFiles = await client.applications.uploadFiles({
    files: [fs.createReadStream('path/to/file')],
  });

  console.log(applicationFiles);
}

main();
[
  {
    "id": "<string>",
    "file_name": "<string>",
    "file_size_bytes": 123,
    "file_artifact_blob_path": "<string>",
    "account_id": "<string>",
    "created_by_user_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  }
]

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Query Parameters

account_id
string | null

Account which the file will be tied to. Use this account id query param if you are using the API or the SDK.

Body

multipart/form-data
files
file[]
required

Upload files to be used in an application.

Response

200
application/json
Successful Response
id
string
required
file_name
string
required
file_size_bytes
integer
required
account_id
string
required

The ID of the account that owns the given entity.

created_by_user_id
string
required

The user who originally created the entity.

created_at
string
required

The date and time when the entity was created in ISO format.

file_artifact_blob_path
string