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: 36049076-9eec-496c-b92d-b0586d94d207
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": "c4888d5d-3faf-4909-8da7-23241ada8279",
      "brand": "36049076-9eec-496c-b92d-b0586d94d207",
      "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
      "caption": "test",
      "facebook_page": "f77a5a4f-afc4-4e99-b4b8-d4fcc15cd816",
      "template_instance": {
        "id": "6b2c2bb0-e99c-4084-9632-ee85345311a7",
        "created_at": 1795716950.130319,
        "html": "<div>fakeTemplateInstance</div>",
        "file": {
          "id": "99df87c2-bc66-4e3c-a6a7-10b0ea36a656",
          "created_at": 1795716950.689137,
          "updated_at": 1795716950.689137,
          "deleted_at": null,
          "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
          "path": "templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
          "name": "image.png",
          "public": true,
          "type": "file",
          "url": "https://test.cloudfront.net/templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
          "preview_url": "https://test.cloudfront.net/templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
          "mime": "image/png"
        },
        "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
        "branch": "http://mock-branch-url",
        "updated_at": 1795716950.130319,
        "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": 1795716950.733267,
      "updated_at": 1795716950.733267,
      "deleted_at": null,
      "due_at": 1795716350.72,
      "executed_at": 1795716950.130319,
      "owner": {
        "type": "user",
        "username": null,
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "phone_number": "+16382229796",
        "created_at": 1795716950.138259,
        "id": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1795716950.13828,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": false,
        "timezone": "America/Chicago",
        "user_type": "Agent",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": null,
        "personal_room": "38eb2c00-1908-43e9-a2b4-81c801ee4ec6",
        "brand": null,
        "fake_email": null,
        "features": null,
        "last_seen_at": null,
        "email_signature": "This is my signature.",
        "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,
        "bio": "This is my bio.",
        "current_time": "12:15 PM - Thursday Nov 26, 2026",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "36049076-9eec-496c-b92d-b0586d94d207",
        "display_name": "John Doe",
        "abbreviated_display_name": "John",
        "online_state": "Offline",
        "has_password": true
      }
    },
    {
      "id": "4f935902-0071-44aa-a7b1-e4a92dfc9bfe",
      "brand": "36049076-9eec-496c-b92d-b0586d94d207",
      "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
      "caption": "testAsset",
      "facebook_page": "f77a5a4f-afc4-4e99-b4b8-d4fcc15cd816",
      "template_instance": null,
      "asset": {
        "id": "8b141e0e-34a0-40c4-841c-fc8dac75e74b",
        "created_at": 1795716950.284928,
        "updated_at": null,
        "deleted_at": null,
        "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
        "brand": "36049076-9eec-496c-b92d-b0586d94d207",
        "file": {
          "id": "e7609cc3-0208-4b21-a551-4a02146dc962",
          "created_at": 1795716950.283355,
          "updated_at": 1795716950.283355,
          "deleted_at": null,
          "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
          "path": "brands/assets/68e456a0-e9c5-11f1-8b13-dff257259151.png",
          "name": "logo.png",
          "public": true,
          "type": "file",
          "url": "https://test.cloudfront.net/brands/assets/68e456a0-e9c5-11f1-8b13-dff257259151.png",
          "preview_url": "https://test.cloudfront.net/brands/assets/68e456a0-e9c5-11f1-8b13-dff257259151.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": 1795716950.773863,
      "updated_at": 1795716950.773863,
      "deleted_at": null,
      "due_at": 1795716350.763,
      "executed_at": 1795716950.130319,
      "owner": {
        "type": "user",
        "username": null,
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "phone_number": "+16382229796",
        "created_at": 1795716950.138259,
        "id": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1795716950.13828,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": false,
        "timezone": "America/Chicago",
        "user_type": "Agent",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": null,
        "personal_room": "38eb2c00-1908-43e9-a2b4-81c801ee4ec6",
        "brand": null,
        "fake_email": null,
        "features": null,
        "last_seen_at": null,
        "email_signature": "This is my signature.",
        "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,
        "bio": "This is my bio.",
        "current_time": "12:15 PM - Thursday Nov 26, 2026",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "36049076-9eec-496c-b92d-b0586d94d207",
        "display_name": "John Doe",
        "abbreviated_display_name": "John",
        "online_state": "Offline",
        "has_password": true
      }
    },
    {
      "id": "18d2def6-b694-49f8-82fe-f0d1fb76852f",
      "brand": "36049076-9eec-496c-b92d-b0586d94d207",
      "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
      "caption": "this post should be failed in job",
      "facebook_page": "0057d3bf-b8a1-4b0e-a046-be62dc34926a",
      "template_instance": {
        "id": "6b2c2bb0-e99c-4084-9632-ee85345311a7",
        "created_at": 1795716950.130319,
        "html": "<div>fakeTemplateInstance</div>",
        "file": {
          "id": "99df87c2-bc66-4e3c-a6a7-10b0ea36a656",
          "created_at": 1795716950.689137,
          "updated_at": 1795716950.689137,
          "deleted_at": null,
          "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
          "path": "templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
          "name": "image.png",
          "public": true,
          "type": "file",
          "url": "https://test.cloudfront.net/templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
          "preview_url": "https://test.cloudfront.net/templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
          "mime": "image/png"
        },
        "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
        "branch": "http://mock-branch-url",
        "updated_at": 1795716950.130319,
        "deleted_at": null,
        "type": "template_instance"
      },
      "asset": null,
      "post_link": null,
      "failed_at": "2026-11-26T18:15:50.130Z",
      "failure": "Internal Server Error",
      "media_container_id": "test",
      "type": "social_post",
      "created_at": 1795716950.794171,
      "updated_at": 1795716950.794171,
      "deleted_at": null,
      "due_at": 1795716350.783,
      "executed_at": 1795716950.130319,
      "owner": {
        "type": "user",
        "username": null,
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "phone_number": "+16382229796",
        "created_at": 1795716950.138259,
        "id": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
        "address_id": null,
        "cover_image_url": null,
        "profile_image_url": null,
        "updated_at": 1795716950.13828,
        "user_status": "Active",
        "profile_image_thumbnail_url": null,
        "cover_image_thumbnail_url": null,
        "email_confirmed": false,
        "timezone": "America/Chicago",
        "user_type": "Agent",
        "deleted_at": null,
        "phone_confirmed": false,
        "is_shadow": null,
        "personal_room": "38eb2c00-1908-43e9-a2b4-81c801ee4ec6",
        "brand": null,
        "fake_email": null,
        "features": null,
        "last_seen_at": null,
        "email_signature": "This is my signature.",
        "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,
        "bio": "This is my bio.",
        "current_time": "12:15 PM - Thursday Nov 26, 2026",
        "push_allowed": true,
        "agents": null,
        "last_seen_type": null,
        "active_brand": "36049076-9eec-496c-b92d-b0586d94d207",
        "display_name": "John Doe",
        "abbreviated_display_name": "John",
        "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: 36049076-9eec-496c-b92d-b0586d94d207
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: 36049076-9eec-496c-b92d-b0586d94d207
associations
string (required) Example: social_post.template_instance,social_post.owner
Request
HideShow
Body
{
  "facebook_page": "f77a5a4f-afc4-4e99-b4b8-d4fcc15cd816",
  "template_instance": "6b2c2bb0-e99c-4084-9632-ee85345311a7",
  "due_at": 1795716350.72,
  "caption": "test"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "c4888d5d-3faf-4909-8da7-23241ada8279",
    "brand": "36049076-9eec-496c-b92d-b0586d94d207",
    "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
    "caption": "test",
    "facebook_page": "f77a5a4f-afc4-4e99-b4b8-d4fcc15cd816",
    "template_instance": {
      "id": "6b2c2bb0-e99c-4084-9632-ee85345311a7",
      "created_at": 1795716950.130319,
      "html": "<div>fakeTemplateInstance</div>",
      "file": {
        "id": "99df87c2-bc66-4e3c-a6a7-10b0ea36a656",
        "created_at": 1795716950.689137,
        "updated_at": 1795716950.689137,
        "deleted_at": null,
        "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
        "path": "templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
        "name": "image.png",
        "public": true,
        "type": "file",
        "url": "https://test.cloudfront.net/templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
        "preview_url": "https://test.cloudfront.net/templates/instances/69224a00-e9c5-11f1-8b13-dff257259151.png",
        "mime": "image/png"
      },
      "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
      "branch": "http://mock-branch-url",
      "updated_at": 1795716950.130319,
      "deleted_at": null,
      "type": "template_instance"
    },
    "post_link": null,
    "failed_at": null,
    "failure": null,
    "media_container_id": null,
    "type": "social_post",
    "created_at": 1795716950.733267,
    "updated_at": 1795716950.733267,
    "deleted_at": null,
    "due_at": 1795716350.72,
    "executed_at": null,
    "owner": {
      "type": "user",
      "username": null,
      "first_name": "John",
      "last_name": "Doe",
      "email": "[email protected]",
      "phone_number": "+16382229796",
      "created_at": 1795716950.138259,
      "id": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
      "address_id": null,
      "cover_image_url": null,
      "profile_image_url": null,
      "updated_at": 1795716950.13828,
      "user_status": "Active",
      "profile_image_thumbnail_url": null,
      "cover_image_thumbnail_url": null,
      "email_confirmed": false,
      "timezone": "America/Chicago",
      "user_type": "Agent",
      "deleted_at": null,
      "phone_confirmed": false,
      "is_shadow": null,
      "personal_room": "38eb2c00-1908-43e9-a2b4-81c801ee4ec6",
      "brand": null,
      "fake_email": null,
      "features": null,
      "last_seen_at": null,
      "email_signature": "This is my signature.",
      "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,
      "bio": "This is my bio.",
      "current_time": "12:15 PM - Thursday Nov 26, 2026",
      "push_allowed": true,
      "agents": null,
      "last_seen_type": null,
      "active_brand": "36049076-9eec-496c-b92d-b0586d94d207",
      "display_name": "John Doe",
      "abbreviated_display_name": "John",
      "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: 36049076-9eec-496c-b92d-b0586d94d207
Request
HideShow
Body
{
  "facebook_page": "f77a5a4f-afc4-4e99-b4b8-d4fcc15cd816",
  "asset": "8b141e0e-34a0-40c4-841c-fc8dac75e74b",
  "due_at": 1795716350.763,
  "caption": "testAsset"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "4f935902-0071-44aa-a7b1-e4a92dfc9bfe",
    "brand": "36049076-9eec-496c-b92d-b0586d94d207",
    "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
    "caption": "testAsset",
    "facebook_page": "f77a5a4f-afc4-4e99-b4b8-d4fcc15cd816",
    "post_link": null,
    "failed_at": null,
    "failure": null,
    "media_container_id": null,
    "type": "social_post",
    "created_at": 1795716950.773863,
    "updated_at": 1795716950.773863,
    "deleted_at": null,
    "due_at": 1795716350.763,
    "executed_at": null
  }
}

Generate an AI caption recommendation

Generate an AI caption recommendation
POST/brands/:brand/social-posts/:id/caption

Generates an AI recommendation for an Instagram caption for the social post. This only returns a recommendation; it does not modify the post.

When the post is tied to a listing (resolved from its template instance, or via the optional listing body param) the listing details and a sample of its photos are sent to the model so it can write a caption grounded in the actual property. For posts that are not tied to a listing (e.g. holiday/celebration templates or static assets) the post’s rendered creative image and template metadata are sent instead, so a caption is still generated.

brand (uuid) ID of the brand

id (uuid) ID of the social post

listing (uuid, optional) listing id to use as an override/fallback when the post is not linked to a listing

Example URI

POST /brands/:brand/social-posts/:id/caption

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: 36049076-9eec-496c-b92d-b0586d94d207
socialPostId
string (required) Example: 2e84c270-de45-4650-97fc-a25674bdef03
Request
HideShow
Body
{
  "due_at": 1795717550.804,
  "template_instance": "6b2c2bb0-e99c-4084-9632-ee85345311a7",
  "facebook_page": "0057d3bf-b8a1-4b0e-a046-be62dc34926a",
  "asset": null,
  "caption": "test"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "2e84c270-de45-4650-97fc-a25674bdef03",
    "brand": "36049076-9eec-496c-b92d-b0586d94d207",
    "created_by": "6f2bce90-0868-4810-95f3-7c3cc39a37ec",
    "caption": "test",
    "facebook_page": "0057d3bf-b8a1-4b0e-a046-be62dc34926a",
    "post_link": null,
    "failed_at": null,
    "failure": null,
    "media_container_id": null,
    "type": "social_post",
    "created_at": 1795716950.752215,
    "updated_at": 1795716950.130319,
    "deleted_at": null,
    "due_at": 1795717550.804,
    "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: 36049076-9eec-496c-b92d-b0586d94d207
socialPostId
string (required) Example: 5891e07d-c996-41d3-a06c-05d3bacb04e1
Response  204

Generated by aglio on 26 Nov 2026