Skip to main content

CreatePostDTO

Struct CreatePostDTO 

Source
pub struct CreatePostDTO {
Show 23 fields pub account_ids: Vec<String>, pub summary: Option<String>, pub media: Vec<PostMediaSchema>, pub status: Option<String>, pub schedule_date: Option<String>, pub selected_best_time: Option<String>, pub created_by: Option<String>, pub follow_up_comment: Option<String>, pub og_tags_details: Option<OgTagsSchema>, pub type_: String, pub post_approval_details: Option<PostApprovalSchema>, pub schedule_time_updated: Option<bool>, pub tags: Vec<String>, pub category_id: Option<String>, pub apply_watermark: Option<bool>, pub tiktok_post_details: Option<TiktokPostSchema>, pub gmb_post_details: Option<GMBPostSchema>, pub user_id: String, pub linkedin_post_details: Option<LinkedinPostSchema>, pub pinterest_post_details: Option<PinterestPostSchema>, pub facebook_post_details: Option<FacebookPostSchema>, pub instagram_post_details: Option<InstagramPostSchema>, pub youtube_post_details: Option<YoutubePostSchema>,
}
Available on crate feature social-planner only.
Expand description

CreatePostDTO from the GoHighLevel OpenAPI spec.

Fields§

§account_ids: Vec<String>

Account IDs for the post. Each account ID identifies a connected social media account. Get IDs from: Get Accounts API — use the id field from each account. Validations: - Required for non-draft posts - Must be a non-empty array - All account IDs must be valid connected accounts for the location Required by the API.

§summary: Option<String>

Post content/caption text. Character limits vary by platform. Custom Values & Hashtags: - You can include custom values/variables in the content (e.g., {{contact.name}}) - Hashtags: Use #hashtag format. Instagram allows max 30 hashtags.

  • Mentions: Use platform-specific mention format (see mentions field for structured mentions) Validations: - Instagram/Facebook Story: Caption NOT supported for direct publishing - Facebook, LinkedIn, GMB: Content OR media is required (at least one) - Content is automatically trimmed to platform limits Reference: Platform Limitations Guide
§media: Vec<PostMediaSchema>

Post Media Data The limitations of media as per the platforms is provided through the reference link in API description

§status: Option<String>

Post status indicating the current state of the post. Available Status Values: - draft - Post saved as draft, not yet ready for publishing - scheduled - Post scheduled for future publishing (requires scheduleDate) - in_review - Post pending approval (requires scheduleDate and postApprovalDetails) - published - Post has been published - in_progress - Post is currently being processed - pending - Post is awaiting platform processing for Instagram media container creation - failed - Post publishing failed - notification_sent - Story notification sent (for manual story posting) - deleted - Post has been deleted Validations: - scheduled or in_review status requires scheduleDate to be set - Draft posts skip most validations (accountIds, media requirements) Allowed values: draft, scheduled, in_review, published, in_progress, pending, failed, notification_sent, deleted.

§schedule_date: Option<String>

Schedule Date

§selected_best_time: Option<String>

Selected Best Time slot for scheduling

§created_by: Option<String>

User ID of the creator who is creating/managing the post. Must be a valid MongoDB ObjectId. Get User IDs from: Get User API — use the id field from the user object. Validation: Must be a valid MongoDB ObjectId.

§follow_up_comment: Option<String>

Follow-up comment to be posted immediately after the main post is published. Supported Platforms: Facebook, Instagram, LinkedIn, YouTube NOT Supported: TikTok, Google My Business (GMB), Pinterest Use Case: Great for adding hashtags, additional context, or engagement prompts without cluttering the main post. - Follow-up comment is automatically trimmed to platform limits Reference: Platform Limitations Guide

§og_tags_details: Option<OgTagsSchema>

Og Tags Meta Data

§type_: String

Type of post to create. Determines the format and platform requirements. Available Types: - post - Standard feed post (all platforms) - story - Temporary 24-hour story (Instagram, Facebook) - reel - Short-form video content (Instagram, Facebook, TikTok, YouTube) Customize Per Platform: You can specify different content/types per platform using facebookPostDetails.type, instagramPostDetails.type, etc. Validations: - Reels require exactly 1 video - Stories: Caption not supported for Instagram/Facebook - Facebook Groups do not support Reels Allowed values: post, story, reel. Required by the API.

§post_approval_details: Option<PostApprovalSchema>

Post Approval Details

§schedule_time_updated: Option<bool>

Flag indicating if the schedule datetime was manually updated. Used for tracking rescheduled posts.

§tags: Vec<String>

Array of Tag IDs to associate with the post for organization and filtering. Get Tag IDs from: Get Tags API — use the _id field from each tag. Validation: All IDs must be valid MongoDB ObjectIds.

§category_id: Option<String>

Category ID to organize the post. Categories help group related posts. Get Category IDs from: Get Categories API — use the _id field. Validation: Must be a valid MongoDB ObjectId.

§apply_watermark: Option<bool>

Apply watermark to media in this post. Note: Watermarks are applied to images only. Videos are not watermarked.

§tiktok_post_details: Option<TiktokPostSchema>

Tiktok Post Details

§gmb_post_details: Option<GMBPostSchema>

GMB Post Details

§user_id: String

User ID of the user creating/managing the post. Required for OAuth channel posts (non-draft). Required by the API.

§linkedin_post_details: Option<LinkedinPostSchema>

LinkedIn-specific post configuration. Key Fields: - postAsPdf: Set to true to post images as a PDF carousel document - pdfTitle: Title for the PDF document (max 100 characters) Limits: - Max 9 images/videos for regular posts - Max 300 pages for PDF carousel - Max PDF size: 100 MB Reference: Platform Limitations Guide

§pinterest_post_details: Option<PinterestPostSchema>

Pinterest-specific post configuration. Required when posting to Pinterest accounts. Required Fields: - boardIds: Object mapping account OAuth IDs to Pinterest board IDs Optional Fields: - title: Pin title (max 100 characters) - link: Destination URL for the pin (max 2048 characters) Get Board IDs: Use the Pinterest boards API or retrieve from connected account details. Limits: - Max 1 image/video per pin - Caption max 800 characters Reference: Platform Limitations Guide

§facebook_post_details: Option<FacebookPostSchema>

Facebook-specific post configuration. Key Fields: - type: Post type (post, story, reel) Restrictions: - Facebook Groups do NOT support Reels - Reels require exactly 1 video - Stories do not support captions Reference: Platform Limitations Guide

§instagram_post_details: Option<InstagramPostSchema>

Instagram-specific post configuration. Key Fields: - type: Post type (post, story, reel) - collaborators: Map of account IDs to Instagram usernames for collaboration invites (max 3 per account) - showOnFeed: Show reel on profile feed (for reels) Collaborators Structure: json { "accountId": ["username1", "username2"] } Where accountId is from Get Accounts API and usernames are Instagram handles without @. Restrictions: - Media is REQUIRED for all Instagram posts - Max 30 hashtags allowed in caption - Stories do not support captions - Collaborators: Posts/Reels only (NOT Stories) - Reels require exactly 1 video Reference: Platform Limitations Guide

§youtube_post_details: Option<YoutubePostSchema>

YouTube-specific post configuration. Key Fields: - title: Video title (max 100 characters) - type: Video type (video for regular videos, short for YouTube Shorts) - privacyLevel: Video visibility (private, public, unlisted) Limits:

  • Max 1 video per post - Caption (description) max 5,000 characters Requirements: - Video is REQUIRED for YouTube posts - type field is required

Trait Implementations§

Source§

impl Clone for CreatePostDTO

Source§

fn clone(&self) -> CreatePostDTO

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CreatePostDTO

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CreatePostDTO

Source§

fn default() -> CreatePostDTO

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CreatePostDTO

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CreatePostDTO

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.