POST
/
api
/
v4
/
images
/
from-url
Upload image from URL.
curl --request POST \
  --url https://apix.us.amity.co/api/v4/images/from-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "fileUrl": "<string>",
  "preferredFilename": "<string>",
  "accessType": "public",
  "altText": "<string>"
}'
[
  {
    "fileId": "<string>",
    "fileUrl": "<string>",
    "type": "image",
    "accessType": "public",
    "altText": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "attributes": {
      "name": "test.jpeg",
      "extension": "jpeg",
      "size": 2107842,
      "mimeType": "image/jpeg",
      "metadata": {
        "height": 123,
        "width": 123,
        "isFull": true
      }
    }
  }
]

Authorizations

Authorization
string
header
required

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

Headers

Content-Type
string
required

Body

application/json
fileUrl
string
required

A file URL to upload

preferredFilename
string
Maximum length: 1024
accessType
enum<string>
default:public

File access type. network type requires authentication to download.

Available options:
public,
network
altText
string

Alternative text for the file.

Maximum length: 180

Response

Image Upload Result

fileId
string

Root file key on cloud storage.

fileUrl
string

url to download the file

type
enum<string>

File type.

Available options:
image,
file,
video
Example:

"image"

accessType
enum<string>
default:public

File access type. network type requires authentication to download.

Available options:
public,
network
altText
string

Alternative text for the file.

createdAt
string<date-time>

The date/time when a file is uploaded.

updatedAt
string<date-time>

The date/time when a file is updated.

attributes
object