Back to top

Social Post

Overview

Resource Group

Get Social posts of brand

Get Social posts of brand
GET/brands/:brand/social-posts

brand (uuid) ID of the brand

user (uuid) ID of the user (optional)

status (‘executed’ | ‘scheduled’ | ‘draft’ | ‘any’) string (optional)

start (number) number of rows to skip before starting to return rows

limit (number) limited number of records

video (boolean) if the template was video

mediums (Email’ | ‘Social’ | ‘CrmOpenHouse’ | ‘FacebookCover’ | ‘InstagramStory’ | ‘LinkedInCover’ | ‘Letter’ | ‘Website’ | ‘RealtorCover’ | ‘YouTubeCover’ | ‘TwitterCover’)[] array of medium

order (string) eg: -created_at (optional)

Example URI

GET /brands/:brand/social-posts
URI Parameters
HideShow
brand
string (required) Example: 9a6aa717-8202-4aa3-af18-e6b026abac34
status
string (required) Example: executed
associations
string (required) Example: social_post.template_instance,social_post.asset,social_post.owner
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "e51ebe00-0242-4e91-859d-438c004d5f7a",
      "brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "caption": "test",
      "facebook_page": "03927f78-1138-43e5-90dc-574df7e68d46",
      "template_instance": {
        "id": "a434c68d-37fd-4a49-9b72-d00a86bf3f58",
        "created_at": 1760470116.464495,
        "html": "<div>fakeTemplateInstance</div>",
        "file": {
          "id": "7635cf53-a674-4ac2-96b4-97f807c567be",
          "created_at": 1760470117.419992,
          "updated_at": 1760470117.419992,
          "deleted_at": null,
          "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
          "path": "templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
          "name": "image.png",
          "public": true,
          "type": "file",
          "url": "https://test.cloudfront.net/templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
          "preview_url": "https://test.cloudfront.net/templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
          "mime": "image/png"
        },
        "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "branch": "http://mock-branch-url",
        "updated_at": 1760470116.464495,
        "deleted_at": null,
        "type": "template_instance"
      },
      "asset": null,
      "post_link": "http://test.com",
      "failed_at": null,
      "failure": null,
      "media_container_id": "test",
      "type": "social_post",
      "created_at": 1760470117.509641,
      "updated_at": 1760470117.509642,
      "deleted_at": null,
      "due_at": 1760469517.481,
      "executed_at": 1760470116.464495,
      "owner": {
        "type": "user",
        "username": null,
        "first_name": "Unit",
        "last_name": "Test",
        "email": "[email protected]",
        "phone_number": "+4368120265807",
        "created_at": 1493115498.770362,
        "id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1493115498.770744,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": true,
        "timezone": "America/Chicago",
        "user_type": "Admin",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": false,
        "personal_room": null,
        "brand": null,
        "fake_email": false,
        "features": [
          "Deals"
        ],
        "last_seen_at": null,
        "email_signature": null,
        "daily_enabled": false,
        "email_quota": 30000,
        "website": null,
        "instagram": null,
        "twitter": null,
        "linkedin": null,
        "youtube": null,
        "facebook": null,
        "designation": null,
        "tiktok": null,
        "mfa_enabled": false,
        "xpressdocs_user_id": null,
        "current_time": "2:28 PM - Tuesday Oct 14, 2025",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
        "display_name": "Unit Test",
        "abbreviated_display_name": "Unit",
        "online_state": "Offline",
        "has_password": true
      }
    },
    {
      "id": "a38dfa94-2e80-4945-abd7-75b1aba58e0f",
      "brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "caption": "testAsset",
      "facebook_page": "03927f78-1138-43e5-90dc-574df7e68d46",
      "template_instance": null,
      "asset": {
        "id": "31d5f048-21ab-4ecf-b260-e8bc70db5b43",
        "created_at": 1760470116.93132,
        "updated_at": null,
        "deleted_at": null,
        "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
        "file": {
          "id": "9626841f-41d9-4de7-a842-faa2959ea821",
          "created_at": 1760470116.925786,
          "updated_at": 1760470116.925786,
          "deleted_at": null,
          "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
          "path": "brands/assets/fb12b9a0-a933-11f0-bdea-d5cf17ea076e.png",
          "name": "logo.png",
          "public": true,
          "type": "file",
          "url": "https://test.cloudfront.net/brands/assets/fb12b9a0-a933-11f0-bdea-d5cf17ea076e.png",
          "preview_url": "https://test.cloudfront.net/brands/assets/fb12b9a0-a933-11f0-bdea-d5cf17ea076e.png",
          "mime": "image/png"
        },
        "label": "Asset Label",
        "template_type": "Christmas",
        "medium": "Email",
        "branch": null,
        "type": "brand_asset"
      },
      "post_link": "http://test.com",
      "failed_at": null,
      "failure": null,
      "media_container_id": "test",
      "type": "social_post",
      "created_at": 1760470117.613462,
      "updated_at": 1760470117.613462,
      "deleted_at": null,
      "due_at": 1760469517.574,
      "executed_at": 1760470116.464495,
      "owner": {
        "type": "user",
        "username": null,
        "first_name": "Unit",
        "last_name": "Test",
        "email": "[email protected]",
        "phone_number": "+4368120265807",
        "created_at": 1493115498.770362,
        "id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1493115498.770744,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": true,
        "timezone": "America/Chicago",
        "user_type": "Admin",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": false,
        "personal_room": null,
        "brand": null,
        "fake_email": false,
        "features": [
          "Deals"
        ],
        "last_seen_at": null,
        "email_signature": null,
        "daily_enabled": false,
        "email_quota": 30000,
        "website": null,
        "instagram": null,
        "twitter": null,
        "linkedin": null,
        "youtube": null,
        "facebook": null,
        "designation": null,
        "tiktok": null,
        "mfa_enabled": false,
        "xpressdocs_user_id": null,
        "current_time": "2:28 PM - Tuesday Oct 14, 2025",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
        "display_name": "Unit Test",
        "abbreviated_display_name": "Unit",
        "online_state": "Offline",
        "has_password": true
      }
    },
    {
      "id": "055c57f2-db27-46b3-922a-36e33f861139",
      "brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "caption": "this post should be failed in job",
      "facebook_page": "aae93360-65d2-4ea9-8cb8-8391cc4f43b3",
      "template_instance": {
        "id": "a434c68d-37fd-4a49-9b72-d00a86bf3f58",
        "created_at": 1760470116.464495,
        "html": "<div>fakeTemplateInstance</div>",
        "file": {
          "id": "7635cf53-a674-4ac2-96b4-97f807c567be",
          "created_at": 1760470117.419992,
          "updated_at": 1760470117.419992,
          "deleted_at": null,
          "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
          "path": "templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
          "name": "image.png",
          "public": true,
          "type": "file",
          "url": "https://test.cloudfront.net/templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
          "preview_url": "https://test.cloudfront.net/templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
          "mime": "image/png"
        },
        "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "branch": "http://mock-branch-url",
        "updated_at": 1760470116.464495,
        "deleted_at": null,
        "type": "template_instance"
      },
      "asset": null,
      "post_link": null,
      "failed_at": "2025-10-14T19:28:36.464Z",
      "failure": "Internal Server Error",
      "media_container_id": "test",
      "type": "social_post",
      "created_at": 1760470117.665703,
      "updated_at": 1760470117.665704,
      "deleted_at": null,
      "due_at": 1760469517.629,
      "executed_at": 1760470116.464495,
      "owner": {
        "type": "user",
        "username": null,
        "first_name": "Unit",
        "last_name": "Test",
        "email": "[email protected]",
        "phone_number": "+4368120265807",
        "created_at": 1493115498.770362,
        "id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1493115498.770744,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": true,
        "timezone": "America/Chicago",
        "user_type": "Admin",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": false,
        "personal_room": null,
        "brand": null,
        "fake_email": false,
        "features": [
          "Deals"
        ],
        "last_seen_at": null,
        "email_signature": null,
        "daily_enabled": false,
        "email_quota": 30000,
        "website": null,
        "instagram": null,
        "twitter": null,
        "linkedin": null,
        "youtube": null,
        "facebook": null,
        "designation": null,
        "tiktok": null,
        "mfa_enabled": false,
        "xpressdocs_user_id": null,
        "current_time": "2:28 PM - Tuesday Oct 14, 2025",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
        "display_name": "Unit Test",
        "abbreviated_display_name": "Unit",
        "online_state": "Offline",
        "has_password": true
      }
    }
  ],
  "info": {
    "count": 3,
    "total": 3
  }
}

Get Social posts stats of brand

Get Social posts stats of brand
GET/brands/:brand/social-posts/stats{?status}

brand (uuid) ID of the brand

user (uuid) ID of the user (optional)

status (‘executed’ | ‘scheduled’ | ‘draft’ | ‘any’) string (optional)

Example URI

GET /brands/:brand/social-posts/stats?status=executed
URI Parameters
HideShow
brand
string (required) Example: 9a6aa717-8202-4aa3-af18-e6b026abac34
status
string (required) Example: executed
Response  200
HideShow
Body
{
  "type": "social_post_stats",
  "Email": "1",
  "Social": "2"
}

Create a social post with templateInstance

Create a social post with templateInstance
POST/brands/:brand/social-posts

Example URI

POST /brands/:brand/social-posts
URI Parameters
HideShow
brand
string (required) Example: 9a6aa717-8202-4aa3-af18-e6b026abac34
associations
string (required) Example: social_post.template_instance,social_post.owner
Request
HideShow
Body
{
  "facebook_page": "03927f78-1138-43e5-90dc-574df7e68d46",
  "template_instance": "a434c68d-37fd-4a49-9b72-d00a86bf3f58",
  "due_at": 1760469517.481,
  "caption": "test"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "e51ebe00-0242-4e91-859d-438c004d5f7a",
    "brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "caption": "test",
    "facebook_page": "03927f78-1138-43e5-90dc-574df7e68d46",
    "template_instance": {
      "id": "a434c68d-37fd-4a49-9b72-d00a86bf3f58",
      "created_at": 1760470116.464495,
      "html": "<div>fakeTemplateInstance</div>",
      "file": {
        "id": "7635cf53-a674-4ac2-96b4-97f807c567be",
        "created_at": 1760470117.419992,
        "updated_at": 1760470117.419992,
        "deleted_at": null,
        "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "path": "templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
        "name": "image.png",
        "public": true,
        "type": "file",
        "url": "https://test.cloudfront.net/templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
        "preview_url": "https://test.cloudfront.net/templates/instances/fb5e4190-a933-11f0-bdea-d5cf17ea076e.png",
        "mime": "image/png"
      },
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "branch": "http://mock-branch-url",
      "updated_at": 1760470116.464495,
      "deleted_at": null,
      "type": "template_instance"
    },
    "post_link": null,
    "failed_at": null,
    "failure": null,
    "media_container_id": null,
    "type": "social_post",
    "created_at": 1760470117.509641,
    "updated_at": 1760470117.509642,
    "deleted_at": null,
    "due_at": 1760469517.481,
    "executed_at": null,
    "owner": {
      "type": "user",
      "username": null,
      "first_name": "Unit",
      "last_name": "Test",
      "email": "[email protected]",
      "phone_number": "+4368120265807",
      "created_at": 1493115498.770362,
      "id": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "address_id": null,
      "cover_image_url": null,
      "profile_image_url": null,
      "updated_at": 1493115498.770744,
      "user_status": "Active",
      "profile_image_thumbnail_url": null,
      "cover_image_thumbnail_url": null,
      "email_confirmed": true,
      "timezone": "America/Chicago",
      "user_type": "Admin",
      "deleted_at": null,
      "phone_confirmed": false,
      "is_shadow": false,
      "personal_room": null,
      "brand": null,
      "fake_email": false,
      "features": [
        "Deals"
      ],
      "last_seen_at": null,
      "email_signature": null,
      "daily_enabled": false,
      "email_quota": 30000,
      "website": null,
      "instagram": null,
      "twitter": null,
      "linkedin": null,
      "youtube": null,
      "facebook": null,
      "designation": null,
      "tiktok": null,
      "mfa_enabled": false,
      "xpressdocs_user_id": null,
      "current_time": "2:28 PM - Tuesday Oct 14, 2025",
      "push_allowed": true,
      "agents": null,
      "last_seen_type": null,
      "active_brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
      "display_name": "Unit Test",
      "abbreviated_display_name": "Unit",
      "online_state": "Offline",
      "has_password": true
    }
  }
}

Create a social post with asset

Create a social post with asset
POST/brands/:brand/social-posts

Example URI

POST /brands/:brand/social-posts
URI Parameters
HideShow
brand
string (required) Example: 9a6aa717-8202-4aa3-af18-e6b026abac34
Request
HideShow
Body
{
  "facebook_page": "03927f78-1138-43e5-90dc-574df7e68d46",
  "asset": "31d5f048-21ab-4ecf-b260-e8bc70db5b43",
  "due_at": 1760469517.574,
  "caption": "testAsset"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "a38dfa94-2e80-4945-abd7-75b1aba58e0f",
    "brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "caption": "testAsset",
    "facebook_page": "03927f78-1138-43e5-90dc-574df7e68d46",
    "post_link": null,
    "failed_at": null,
    "failure": null,
    "media_container_id": null,
    "type": "social_post",
    "created_at": 1760470117.613462,
    "updated_at": 1760470117.613462,
    "deleted_at": null,
    "due_at": 1760469517.574,
    "executed_at": null
  }
}

Update social post

Update social post
PUT/brands/:brand/social-posts/:socialPostId

Example URI

PUT /brands/:brand/social-posts/:socialPostId
URI Parameters
HideShow
brand
string (required) Example: 9a6aa717-8202-4aa3-af18-e6b026abac34
socialPostId
string (required) Example: 3585dd85-0853-420d-953c-82b83f0e61f8
Request
HideShow
Body
{
  "due_at": 1760470717.671,
  "template_instance": "a434c68d-37fd-4a49-9b72-d00a86bf3f58",
  "facebook_page": "aae93360-65d2-4ea9-8cb8-8391cc4f43b3",
  "asset": null,
  "caption": "test"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "3585dd85-0853-420d-953c-82b83f0e61f8",
    "brand": "9a6aa717-8202-4aa3-af18-e6b026abac34",
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "caption": "test",
    "facebook_page": "aae93360-65d2-4ea9-8cb8-8391cc4f43b3",
    "post_link": null,
    "failed_at": null,
    "failure": null,
    "media_container_id": null,
    "type": "social_post",
    "created_at": 1760470117.561534,
    "updated_at": 1760470117.561534,
    "deleted_at": null,
    "due_at": 1760470717.671,
    "executed_at": null
  }
}

Delete a social post

Delete a social post
DELETE/brands/:brand/social-posts/:socialPostId

Example URI

DELETE /brands/:brand/social-posts/:socialPostId
URI Parameters
HideShow
brand
string (required) Example: 9a6aa717-8202-4aa3-af18-e6b026abac34
socialPostId
string (required) Example: 0e35144c-d8a7-4866-9690-24536fa7a779
Response  204

Generated by aglio on 14 Oct 2025