# Create assets in a Brandfolder

Creates assets in the matching Brandfolder.

Any files you wish to use as an Attachment in Brandfolder must be hosted at
a publicly available URL (until they have been successfully imported). If
you need to upload file contents directly to a server, you can use do a
binary file upload to our temporary storage bucket and then use that URL
when creating Assets/Attachments.

> NOTE: To create an asset from a binary upload, copy the object_url
value from the [Get an upload
URL](/api/brandfolder/openapi/binary_upload/opidstorageserviceuploadrequestsget)
response into your request body's attachments.url property.

Endpoint: POST /brandfolders/{brandfolder_id}/assets
Version: v4
Security: APIToken

## Path parameters:

  - `brandfolder_id` (string, required)
    Unique identifier for the resource instance.
    Example: "oqgiju-21olts-ce9egi"

## Header parameters:

  - `Content-Type` (string, required)
    Enum: "application/json"

  - `Accept` (string, required)
    Enum: "application/json"

  - `Authorization` (string, required)
    Bearer token for authentication

## Request fields (application/json):

  - `data` (object, required)

  - `data.attributes` (array, required)

  - `data.attributes.name` (string, required)
    The name of the asset.
    Example: "Brandfolder Logo"

  - `data.attributes.description` (string)
    The description of the asset.
    Example: "Brandfolder's logo in print ready format"

  - `data.attributes.thumbnail_url` (string)
    The online location of the asset.
    Example: "https://example.com/example.jpg?Expires=1624742369"

  - `data.attributes.approved` (boolean)
    If true, this asset is approved; otherwise, it's not.
    Example: true

  - `data.attributes.availability_start` (string)
    This represents the publish/availability date in Brandfolder, the label draft will show.
    Example: "2024-02-23T18:22:49.771Z"

  - `data.attributes.availability_end` (string)
    This represents the expiration date in brandfolder, the label expired will show.
    Example: "2025-02-23T18:22:49.771Z"

  - `data.attributes.attachments` (array)
    An array of Attachment objects to add to the Asset (these do not overwrite exisiting Attachments).

  - `data.attributes.attachments.url` (string, required)
    A fully-formed URL of the file to upload (required for each new Attachment).
    Example: "https://example.com/new-attachment.jpg"

  - `data.attributes.attachments.filename` (string)
    A complete file name, with extension.
    Example: "new-attachment.jpg"

  - `section_key` (string, required)
    ID of the Section in which you want the newly created Asset(s)
to live.
    Example: "oqgol8-dslwxs-58b2z3"

## Response 200 fields (application/json):

  - `data` (array, required)

  - `data.id` (string, required)
    Unique identifier for the resource instance.
    Example: "oqgkkd-fr5iv4-443db"

  - `data.type` (string, required)
    The type of the resource.
    Enum: "generic_files"

  - `data.attributes` (object, required)

  - `data.attributes.name` (string)
    The name of the asset.
    Example: "Brandfolder Logo"

  - `data.attributes.description` (string)
    The description of the asset.
    Example: "Brandfolder's logo in print ready format"

  - `data.attributes.thumbnail_url` (string)
    The online location of the asset.
    Example: "https://example.com/example.jpg?Expires=1624742369"

  - `data.attributes.approved` (boolean)
    If true, this asset is approved; otherwise, it's not.
    Example: true

  - `meta` (object, required)
    Page context information.

  - `meta.current_page` (integer, required)
    Example: 1

  - `meta.next_page` (object,null, required)

  - `meta.prev_page` (object,null, required)

  - `meta.total_pages` (number, required)
    Example: 1

  - `meta.total_count` (number, required)
    Example: 1


