Assets

Create a file asset

Changed on

Creates a new file asset.

Accepted file types: image/bmp, image/jpeg, image/jpg, image/png, image/gif, application/pdf. Maximum file size: 2 MB. Maximum image dimensions: 4096px.

post/v1/assets/files

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/assets/files
  • Auth
    none declared

Request body multipart/form-data

filestring binary required

The file to upload. Must be an accepted image or PDF type. Accepted file types: image/bmp, image/jpeg, image/jpg, image/png, image/gif, application/pdf. Maximum file size: 2 MB. Maximum image dimensions: 4096px.

namestring

Custom display name for the asset. If omitted, the uploaded file's original filename is used.

parent_folder_idinteger nullable

The ID of the parent folder. Omit or set to "0" to place the asset at the root level.

Response

The newly created file asset.

Example response

{
  "asset": {
    "created": 1773856017,
    "updated": 1773856017
  }
}

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • breaking

      the // response's property type changed from integer to string for status

    • breaking

      the // response's property type changed from integer to string for status

    • breaking

      the // response's property type changed from integer to string for status

    • breaking

      the // response's property type changed from integer to string for status