files

Upload file

Uploads a single file and creates a File resource, returning its stable id.

The request is multipart/form-data, not JSON. The file part must come last: the upload is streamed, so send purpose (and any other field) before it. A part that arrives after file, or a second file part, is rejected with 400.

Moveworks determines content_type by inspecting the bytes. A declared media type or a filename extension is not trusted, and the detected type is what the response reports.

A 201 is returned only after the bytes are stored and the file has passed its security checks, so a successful response always describes a file that is ready to reference.

Uploaded files are retained for 24 hours. After expire_time, both the file and its metadata are removed, and the id no longer resolves. Reference the id from a downstream API before then.

There is no GET, LIST, download, or DELETE operation in v1alpha1. A file is reached only by passing its id to an API that accepts one.

post/files

Request

  • Base URL: https://api.moveworks.ai/rest/v1alpha1
  • URL: https://api.moveworks.ai/rest/v1alpha1/files
  • Auth: HTTP bearer

Response

File uploaded and File resource created

idstring required

Opaque, stable identifier for the File resource. Pass it to other Moveworks APIs; do not parse it.

purpose'CONVERSATIONS_ATTACHMENT' required

What an uploaded file is for. A value names the API that owns the file, then what the file is, so the same noun can be used by two APIs without colliding.

  • CONVERSATIONS_ATTACHMENT - a file attached to a conversation.

CONVERSATIONS_ATTACHMENT is the only value accepted in v1alpha1. Additional purposes may be added in a later version.

namestring required

The filename from the uploaded file part, after Unicode normalization.

content_typestring required

IANA media type detected by Moveworks from the file's bytes. This is authoritative over anything the request declared.

size_bytesinteger required

Exact number of bytes stored.

create_timestring date-time required

RFC 3339 UTC timestamp of when the File resource was created.

expire_timestring date-time nullable required

RFC 3339 UTC timestamp of when the file and its metadata are removed, 24 hours after create_time. Once it passes, the id no longer resolves. The field is nullable for forward compatibility with a non-expiring purpose, but CONVERSATIONS_ATTACHMENT always expires, so it is never null today.

Changes

No recorded changes to this operation across all 1 revision of this API.