posts

Edit Creative Data Endpoint

Updates creative data for a specified post ID.

This endpoint updates the creative data associated with a specific post ID using the provided data in the CreativeData model. It requires the user to be authenticated via a JWT token. The user's information is extracted and can be utilized for authorization or logging.

Args: data (CreativeData): A Pydantic model containing the new creative data to update. post_id (str): The ID of the post whose creative data is being updated. user (Users): The authenticated user object, obtained through JWT authentication. db (Session): The database session, provided by the dependency injection system.

Returns: dict: A JSON response containing the updated creative data if the update is successful.

Raises: HTTPException: - Raises a 400 error if there is an issue with the update process. - Raises a 404 error if the creative data for the specified post ID cannot be found.

post/api/v1/share/edit_creative_data

Query parameters

post_idstring required

The ID of the post to fetch creative data for.

The ID of the post to fetch creative data for.

Request body

page_idstring nullable
rule_namestring nullable
scheduled_timestring date-time nullable
contentstring nullable
descriptionstring nullable
image_urlstring uri nullable
video_urlstring uri nullable
video_thumbnail_urlstring uri nullable
platformstring nullable
user_idstring uuid nullable
typestring nullable
post_idstring nullable
statusstring nullable
media_typestring nullable

Response

Successful Response

{"stackTrail":"paths:/api/v1/share/edit_creative_data:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

No recorded changes to this endpoint across all 1 revision of this API.