Get a post
curl --request GET \
--url https://api.solaraai.com/api/v1/posts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solaraai.com/api/v1/posts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solaraai.com/api/v1/posts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"caption": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"deliveries": [
{
"attempts": 123,
"platform": "<string>",
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"account_disconnected": true,
"account_name": "<string>",
"comments": [
{
"position": 123,
"state": "<string>",
"error": "<string>",
"failure": "account_needs_reconnect",
"post_url": "<string>"
}
],
"error": "<string>",
"failure": "account_needs_reconnect",
"made_by_another_login": true,
"post_url": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_manual_upload": true,
"platform_formats": {},
"platforms": [
"<string>"
],
"post_status": "<string>",
"publish_at": "2023-11-07T05:31:56Z",
"publish_options": {
"google_business": {
"action_type": "<string>",
"action_url": "<string>",
"coupon_code": "<string>",
"end_date": "<string>",
"end_time": "<string>",
"redeem_url": "<string>",
"start_date": "<string>",
"start_time": "<string>",
"terms": "<string>",
"title": "<string>",
"topic_type": "<string>"
},
"instagram": {
"trial_strategy": "MANUAL"
},
"pinterest": {
"board_id": "<string>",
"alt_text": "<string>",
"link": "<string>",
"title": "<string>"
},
"threads": {
"topic_tag": "<string>"
},
"tiktok": {
"mode": "direct",
"allow_comment": true,
"allow_duet": true,
"allow_stitch": true,
"brand_organic": true,
"branded_content": true,
"privacy_level": "PUBLIC_TO_EVERYONE"
},
"youtube": {
"made_for_kids": true,
"privacy": "public",
"title": "<string>"
}
},
"retryable": true,
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"state": "<string>",
"title": "<string>",
"uses_latest_version": true,
"video_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_change": {
"agent_name": "<string>",
"at": "2023-11-07T05:31:56Z",
"change": "moved",
"from": "2023-11-07T05:31:56Z"
},
"auto_approved": true,
"comments": [
{
"text": "<string>",
"link": "<string>"
}
],
"failure_reason": "plan_ended",
"link": {
"url": "<string>",
"description": "<string>",
"image_url": "<string>",
"title": "<string>"
},
"may_be_live": [
"<string>"
],
"media_items": [
{
"kind": "video",
"url": "<string>"
}
],
"media_kind": "<string>",
"media_url": "<string>",
"needs_plan_to_post": true,
"needs_reconnect": [
"<string>"
],
"platform_overrides": {},
"post_kind": "text",
"poster_url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"revision": 123,
"warnings": [
{
"code": "<string>",
"platform": "<string>",
"account_name": "<string>"
}
]
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Calendar
Get a post
Solara AI API: One post: its time, platforms, caption (a platform with its own is in platform_overrides) and how each platform went (deliveries).
Permission: Read (read).
GET
/
api
/
v1
/
posts
/
{id}
Get a post
curl --request GET \
--url https://api.solaraai.com/api/v1/posts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solaraai.com/api/v1/posts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solaraai.com/api/v1/posts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"caption": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"deliveries": [
{
"attempts": 123,
"platform": "<string>",
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"account_disconnected": true,
"account_name": "<string>",
"comments": [
{
"position": 123,
"state": "<string>",
"error": "<string>",
"failure": "account_needs_reconnect",
"post_url": "<string>"
}
],
"error": "<string>",
"failure": "account_needs_reconnect",
"made_by_another_login": true,
"post_url": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_manual_upload": true,
"platform_formats": {},
"platforms": [
"<string>"
],
"post_status": "<string>",
"publish_at": "2023-11-07T05:31:56Z",
"publish_options": {
"google_business": {
"action_type": "<string>",
"action_url": "<string>",
"coupon_code": "<string>",
"end_date": "<string>",
"end_time": "<string>",
"redeem_url": "<string>",
"start_date": "<string>",
"start_time": "<string>",
"terms": "<string>",
"title": "<string>",
"topic_type": "<string>"
},
"instagram": {
"trial_strategy": "MANUAL"
},
"pinterest": {
"board_id": "<string>",
"alt_text": "<string>",
"link": "<string>",
"title": "<string>"
},
"threads": {
"topic_tag": "<string>"
},
"tiktok": {
"mode": "direct",
"allow_comment": true,
"allow_duet": true,
"allow_stitch": true,
"brand_organic": true,
"branded_content": true,
"privacy_level": "PUBLIC_TO_EVERYONE"
},
"youtube": {
"made_for_kids": true,
"privacy": "public",
"title": "<string>"
}
},
"retryable": true,
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"state": "<string>",
"title": "<string>",
"uses_latest_version": true,
"video_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_change": {
"agent_name": "<string>",
"at": "2023-11-07T05:31:56Z",
"change": "moved",
"from": "2023-11-07T05:31:56Z"
},
"auto_approved": true,
"comments": [
{
"text": "<string>",
"link": "<string>"
}
],
"failure_reason": "plan_ended",
"link": {
"url": "<string>",
"description": "<string>",
"image_url": "<string>",
"title": "<string>"
},
"may_be_live": [
"<string>"
],
"media_items": [
{
"kind": "video",
"url": "<string>"
}
],
"media_kind": "<string>",
"media_url": "<string>",
"needs_plan_to_post": true,
"needs_reconnect": [
"<string>"
],
"platform_overrides": {},
"post_kind": "text",
"poster_url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"revision": 123,
"warnings": [
{
"code": "<string>",
"platform": "<string>",
"account_name": "<string>"
}
]
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
Response
OK
Why it failed, as a code the app words itself — plan_ended: the workspace's plan ended before its time; export_failed: the version it waited for did not finish; account_paused: the account was paused at its time. Absent otherwise, and for a platform's failure (deliveries says it). Codes are added over time: read an unknown one as absent
Available options:
plan_ended, export_failed, account_paused