Create Page Photo
POST/{version}/{page_id}/photosVia 360: POST https://partner.quantri360.com/v1/facebook/{version}/{page_id}/photos
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Write endpoint — changes data on Facebook. The key must be created with "Allow write API calls" ticked, otherwise you get 403 write_not_allowed. Every call is logged.
Description
Đăng một ảnh lên Trang bằng URL ảnh công khai (Facebook tự tải về), kèm chú thích; hoặc tải ảnh lên ở trạng thái chưa đăng để ghép vào bài nhiều ảnh. ENDPOINT GHI.
- Là API GHI — thay đổi dữ liệu thật trên Facebook (ảnh hiện công khai trên Trang khi
published= true); key cần quyền ghi, mỗi lần gọi được 360 ghi nhật ký. - Chưa hỗ trợ tải tệp ảnh trực tiếp (multipart) qua 360 — chỉ nhận
url. - URL ảnh phải truy cập công khai (Facebook tự tải về); tải không được thì Meta trả lỗi và không tạo ảnh.
Request
Endpoint
POST https://partner.quantri360.com/v1/facebook/{version}/{page_id}/photos
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | act_123456789 hoặc 1234567890 | Tài sản Facebook brand đã nối với 360: tài khoản quảng cáo (act_<id> hoặc <id>), Page id hoặc Pixel id — lấy ở GET /v1/platforms. Có thể bỏ khi đường dẫn đã chứa act_<id> / page id của brand. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| version | path | string | Yes | v25.0 | |
| page_id | path | string | Yes | 109900000000001 | Id Trang đã nối. |
| url | body | string | Yes | example.com/images/bst-thu-dong.jpg | URL ảnh công khai đầy đủ (có http/https; JPG / PNG …) — Facebook phải tải được. |
| caption | body | string | No | BST Thu Đông 2026 | Chú thích ảnh (thành nội dung bài). |
| published | body | bool | No | true | false = chỉ tải lên, chưa đăng — lấy id ghép vào attached_media của POST /{page_id}/feed. |
| scheduled_publish_time | body | int | No | Hẹn giờ (unix giây) — đi kèm published=false. |
Request examples
curl -s -X POST "https://partner.quantri360.com/v1/facebook/v25.0/109900000000001/photos" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/images/bst-thu-dong.jpg","caption":"BST Thu Đông 2026"}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/facebook/v25.0/109900000000001/photos",
params={},
json={
"url": "https://example.com/images/bst-thu-dong.jpg",
"caption": "BST Thu Đông 2026"
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/facebook/v25.0/109900000000001/photos');
for (const [k, v] of Object.entries({})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'POST',
headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"url":"https://example.com/images/bst-thu-dong.jpg","caption":"BST Thu Đông 2026"}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/facebook/v25.0/109900000000001/photos' . '?' . http_build_query([]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"url":"https://example.com/images/bst-thu-dong.jpg","caption":"BST Thu Đông 2026"}');
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;Response
Response fields (as returned by Facebook)
| Name | Type | Sample | Description |
|---|---|---|---|
| id | string | 1131000000000001 | Id ảnh. |
| post_id | string | 109900000000001_1131000000000002 | Id bài chứa ảnh — chỉ có khi đăng ngay. |
Response sample
{
"id": "1131000000000001",
"post_id": "109900000000001_1131000000000002"
}
Get started
- Sign up for Partner
- Enable a data type of the Trang & Messenger group on the platform page
- Create an API key (tick the Facebook channel)
- Call it as in the examples above