Skip to content

Create an asset

POST/assets

Costs 2 rate-limit points · Rate limits

Create a new asset. Supports three types:

  • internal: a file stored in Filemonk storage. The asset row is created together with a single presigned PUT URL in one call. Upload the file body to that URL to finish.
  • external: a file hosted at an external URL.
  • licence: a licence key asset.

Plan storage / asset-count quotas are enforced before the upload URL is issued. The per-file ceiling is 2 GB.

Headers

  • X-Auth-TokenstringRequired

    API key for authentication

Request body

  • assetobjectRequired
    Show 8 child attributesHide child attributes
    • typestringRequired
      Example: internal
      One of internalexternallicence
    • namestring

      A display name for the asset. Required for licence type.

    • external_urlstring

      The URL of the external file. Required when type is external.

    • filenamestring

      Required when type is internal. Suggested attachment name on download.

    • byte_sizeinteger

      Required when type is internal. Size of the file in bytes. Must be positive and at most 2 GB.

    • content_typestring

      Optional MIME type for internal assets. Defaults to application/octet-stream.

    • watermark_assetboolean

      Whether to apply watermarking to this asset (PDFs only).

      Default false
    • autogenerate_licence_keyboolean

      Whether to auto-generate a licence key when this asset is purchased. Only applicable to licence type.

      Default false

Returns

  • assetobject
    Show 11 child attributesHide child attributes
    • idstring

      Unique asset identifier

    • typestring

      The asset type. internal for uploaded files, external for URL-based assets, licence for licence key assets.

      One of internalexternallicence
    • namestring, nullable

      Display name of the asset.

    • filenamestring, nullable

      Filename of the asset (derived from the file or URL).

    • external_urlstring, nullable

      The external URL for external type assets. null for other types.

    • content_typestring, nullable

      MIME type of the asset.

    • byte_sizeinteger

      File size in bytes. 0 for external and licence assets.

    • watermark_assetboolean

      Whether watermarking is enabled for this asset (PDFs only).

    • autogenerate_licence_keyboolean

      Whether a licence key is auto-generated when this asset is purchased.

    • created_atstring

      When the asset was created.

    • updated_atstring

      When the asset was last updated.

  • uploadobject

    Only present when type is internal. Single-PUT upload handle.

    Show 4 child attributesHide child attributes
    • methodstring
      Example: PUT
      One of PUT
    • urlstring
      Example: https://example.com
    • headersobject
    • expires_atstring
      Example: 2026-01-15T09:30:00Z

Errors

422

Validation failed

POST/assets
curl -X POST "https://app.filemonk.io/api/v1/external/assets" \
  -H "X-Auth-Token: $FILEMONK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "asset": {
      "type": "internal",
      "name": "string",
      "external_url": "https://example.com",
      "filename": "string",
      "byte_size": 1,
      "content_type": "string",
      "watermark_asset": false,
      "autogenerate_licence_key": false
    }
  }'
Response
{
  "asset": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "external",
    "name": "Photoshop Brushes Pack",
    "filename": "brushes-pack-v2.zip",
    "external_url": "https://cdn.example.com/files/brushes-pack-v2.zip",
    "content_type": "application/zip",
    "byte_size": 0,
    "watermark_asset": false,
    "autogenerate_licence_key": false,
    "created_at": "2026-01-15T09:30:00Z",
    "updated_at": "2026-01-15T09:30:00Z"
  },
  "upload": {
    "method": "PUT",
    "url": "https://example.com",
    "headers": {},
    "expires_at": "2026-01-15T09:30:00Z"
  }
}