Skip to main content
POST
/
admin
/
v1
/
networks
/
{network_id}
/
assets
Upload a new asset (image or file)
curl --request POST \
  --url https://api.mn.co/admin/v1/networks/{network_id}/assets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'asset_style=<string>' \
  --form asset_file='@example-file' \
  --form 'source_url=<string>' \
  --form input_type=123 \
  --form 'original_aspect_ratio=<string>' \
  --form 'metadata={}'
{
  "id": "1234",
  "type": "<string>",
  "url": "<string>",
  "name": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

network_id
required

The Network's unique integer ID, or subdomain Unique numeric network ID

Body

multipart/form-data

Submit as multipart/form-data

asset_style
string
required

Style of asset (post, landing_page_description, thumbnail, etc.)

asset_file
file

The file to upload

source_url
string<url>

URL to download asset from (alternative to asset_file)

input_type
integer<uint64>

Input type (upload=0 or url=1)

original_aspect_ratio
string

Original aspect ratio of the asset

metadata
object

Additional metadata for the asset (e.g., is_main_image, is_video_image)

Response

The created asset object

File or media asset attached to content

id
integer<uint64>
required

The record's integer ID

Example:

"1234"

type
string
required

The type of asset (Asset, StaticAsset, etc.)

url
string<url>

URL to access the asset

name
string

Original filename of the asset