Skip to main content
POST
Upload user file
Use this operation to upload a file to a file field on the user.
The uploaded file is validated and stored before the response is returned; the file itself is processed shortly after. A GET on the returned Location immediately after the 201 may briefly return a response with a null body until processing is complete.

Authorizations

x-api-key
string
header
required

API key used to authenticate and authorise every request. Include it in the x-api-key header.

Headers

Accept
enum<string>
required

Defines the response type.

Available options:
application/vnd.Creative Force.v2.3+json,
application/vnd.Creative Force.v2.3+xml

Path Parameters

user_slug
string
required

User slug

Pattern: ^[A-Za-z]{8}$
field_slug
string
required

Slug of the field.

Pattern: ^[A-Za-z]{8}$

Body

application/json

File payload for an upload operation.

filename and data are required.

filename
string
required

Original filename of the uploaded file, including the extension.

data
string<byte>
required

Base64-encoded contents of the file.

The encoded payload must round-trip cleanly through standard base64 decoding; payloads with stray characters, incorrect padding, or other malformed encoding are rejected.

Response

User file uploaded.

Receipt returned when a file is uploaded to a category, chapter, entry, or user field.

filename
string

Original filename of the uploaded file, including the extension.

token
string

Opaque identifier for the stored file, used as the {token} path parameter on /file/{token}.

Canonical URL for retrieving the uploaded file.