Image API

Image API

Table of Contents:

Methods Summary

POST api/image

Description 

Add images to the Image library in Ongage. Those residing under the Content >> Image Library in the UI of your account.

Request

image_url

Required string (URL of the image that you want to add to your image library).

folder_id

Optional number (ID of the folder you want to upload your images)

NOTE: By default, the image will be added to the root folder if no folder ID is mentioned in the request.

Request

POST URL: https://api.ongage.net/api/image

{ "image_url": "https://stagingstepinsolutions.stepinsolutions.in/images/pm-page/24-7-Customer-Support.png", // Image URL "folder_id" "11111" }

Response

{ "metadata": { "error": false }, "payload": { "account_id": 387, "file_name": "978691dedcea76d9.png", "mime_type": "image/png", "file_size": 247361, "name": "24-7-Customer-Support.png", "created": 1763569103, "modified": 1763569103, "created_by": 28720, "id": 1185737 } }

 

GET api/image_folder

Description

Get details of all folders in the Image library.

Request

GET URL: https://api.ongage.net/<list_id>/api/image_folder

Response

In response, you will get details of all the folders available in your image library, sample response as below:

{ "metadata": { "error": false, "total": 2 }, "payload": [ { "id": 587481, "name": "abcdefg", "favorite": false, "created_by": 28721, "account_id": 387, "created": 1763439391, "modified": 1763439391, "deleted": null, "allowed_list_ids": null, "allowed_user_ids": null, "disallowed_user_ids": null }, { "id": 530771, "name": "ccc", "favorite": false, "created_by": 11370, "account_id": 387, "created": 1605194471, "modified": 1605194471, "deleted": null, "allowed_list_ids": null, "allowed_user_ids": null, "disallowed_user_ids": null } ] }