Start a sync of a connected account's posts
curl --request POST \
--url https://api.social-api.ai/v1/accounts/{account_id}/sync \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.social-api.ai/v1/accounts/{account_id}/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/accounts/{account_id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"error": "",
"finished_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"state": "syncing"
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Accounts
Start a sync of a connected account's posts
Refreshes one connected account’s posts: new posts appear, engagement counts update, and Instagram and Facebook media links in platform_media are renewed. Instagram covers up to the 500 most recent posts, Facebook up to the 500 most recent per Page; other platforms cover up to the 25 most recent. Returns immediately: poll GET /accounts//sync until state leaves “syncing”, then read the posts. A sync already running for the account is returned as-is. Each account can start a sync once every 15 minutes, and each day your plan allows 10 syncs per brand it includes (Enterprise is unlimited); the count resets at midnight UTC.
POST
/
accounts
/
{account_id}
/
sync
Start a sync of a connected account's posts
curl --request POST \
--url https://api.social-api.ai/v1/accounts/{account_id}/sync \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.social-api.ai/v1/accounts/{account_id}/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/accounts/{account_id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"error": "",
"finished_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"state": "syncing"
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}