v50

latestOpenAPI 3.1.0Creative Force Client Subscription Termsraw.githubusercontent.com2026-07-137852387.4 KB
Attachments

Create an attachment

Creates an attachment on the specified entry under the specified tab.

post/entry/{entry_slug}/attachment/{tab_slug}

Headers

Accept'application/vnd.Creative Force.v2.3+json' | 'application/vnd.Creative Force.v2.3+xml' required

Defines the response type.

x-api-languagestring[]

Defines the languages included in the response. If non are provided, the account default language is returned.

Value all overrides any other values present.

You can request multiple languages using a comma-separated string of languages.

The selected language must be supported by your account or a 400 error is returned.

Request body

filenamestring required

Original filename of the uploaded file, including the extension.

datastring 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.

orderinteger required

Position of the attachment within its tab. Lower values sort earlier.

attachment_fieldsobject

Values for the form fields captured against this attachment, keyed by field slug.

Each value must conform to the type of the corresponding field on the parent attachments tab:

  • text, textarea, email, url, phone, ai — string.
  • numeric — number.
  • currency — string holding a decimal value, for example "1234.56".
  • checkbox — boolean (true/false; 1 and 0 are also accepted).
  • radio, drop-down-list — string matching one of the defined option keys for the field (case-insensitive).
  • checkboxlist — array of option keys, or a comma-separated string such as "opt1,opt2".
  • country — ISO 3166 alpha-2 country code; lower-case codes are accepted and stored upper-cased.
  • dateYYYY-MM-DD string or an object such as {date: "2026-06-16"}; the bare string form is wrapped server-side into the object form.
  • datetimeYYYY-MM-DD HH:MM string or an object such as {date: "2026-06-16 14:30"}; same wrapping behaviour as date.
  • timeHH:MM string.

Field slugs that do not exist on the parent tab are rejected. Fields marked as required on the parent tab must be supplied; omitting them returns a 422.

formula fields are computed server-side and cannot be set through this property. file fields are not settable here; upload files through POST /entry/{entry_slug}/upload/{field_slug} instead. table and lookup field types are not handled by this property; consult their dedicated endpoints if your tab uses them.

Example request

{
  "filename": "hello.xls",
  "data": "aGVsbG8gd29ybGQ=",
  "order": 1,
  "attachment_fields": {
    "text-slug": "Some short text",
    "numeric-slug": 42,
    "checkbox-slug": true,
    "radio-slug": "option-key-1",
    "checkboxlist-slug": [
      "option-key-1",
      "option-key-2"
    ],
    "country-slug": "AU",
    "date-slug": "2026-06-16"
  }
}

Response

Attachment created.

tokenstring

Opaque identifier for the new attachment. Used as the {token} path parameter on /attachment/{token}.

linkstring uri

Canonical URL for the new attachment resource.

Example response

{
  "token": "AbCdEfGhIjKlMnOp",
  "link": "https://api.au.cr4ce.com/attachment/AbCdEfGhIjKlMnOp",
  "file": {
    "filename": "example.pdf",
    "token": "QrStUvWxYzAbCdEf",
    "link": "https://api.au.cr4ce.com/file/QrStUvWxYzAbCdEf"
  }
}