Skip to main content
POST
Add a file

Authorizations

Authorization
string
header
required

A Parley API key.

Body

application/json
uploadId
string
required

The id of an upload, once its bytes have been PUT to its url, holding the file to add. It keeps its file name. Adding the same upload again returns the same file.

Minimum string length: 1
projectId
string

Add it to this project's files. Pass exactly one of projectId, accountId, contactId, intakeId, or library.

Minimum string length: 1
accountId
string

Add it to this account's files. Pass exactly one of projectId, accountId, contactId, intakeId, or library.

Minimum string length: 1
contactId
string

Add it to this contact's files. Pass exactly one of projectId, accountId, contactId, intakeId, or library.

Minimum string length: 1
intakeId
string

Add it to this intake's files. Pass exactly one of projectId, accountId, contactId, intakeId, or library.

Minimum string length: 1
library
any

true for the organization's Library. Pass exactly one of projectId, accountId, contactId, intakeId, or library.

folderId
string

Put it inside this folder. Omit for the top level.

Minimum string length: 1

Response

Created.

A file or a folder, told apart by type.

type
any
required
id
string
required

The file or folder ID.

Minimum string length: 1
name
string
required

The name, including any file extension.

location
object
required

Whose files these are: a project's, an account's, a contact's, or an intake's, or the organization's Library.

folder
object | null
required

The folder it is in, or null at the top level.

createdAt
string<date-time>
required

When it was added.

updatedAt
string<date-time>
required

When it was last updated, including processing, renames, and moves.

mediaType
string | null
required

The file's media type, such as application/pdf, from its extension, or null when the extension isn't recognized.

status
enum<string>
required

Whether Parley has extracted the file's text: pending (queued), processing, ready (its text can be read), or failed (download it instead).

Available options:
pending,
processing,
ready,
failed