Edit & delete posts
Learn how to edit and delete LinkedIn posts using Unipile API.
About Post IDsBasically, Unipile uses base64 preformatted post IDs to simplify any interactions that require a post ID. These are the IDs to be used throughout, unless otherwise specified.
Edit a post
To edit the content of a post you published, use the Modify a Post endpoint, specifying the post ID and the content of the updated post in the text field of the body.
About mentionsMentions are allowed in the post content following the pattern @User, where User can be either a system ID (
ACo...) or a public identifier (e.g. johndoe inwww.linkedin.com/in/johndoe/).
const { data } = await postsApi.updatePost({
path: {
account_id: "acc_123456789",
post_id: "post_id",
},
body: {
text: 'Hello There !\n\nThis post has been edited !',
},
});post = posts_api.update_post(
"post_id",
"acc_123456789",
{"text": "Hello There !\n\nThis post has been edited !"},
)curl --request PATCH \
--url https://api.unipile.com/v2/account_id/posts/post_id \
--header 'accept: application/json'
--header 'content-type: application/json' \
--data '
{
"text": "Hello There !\n\nThis post has been edited !",
}
'Delete a post
To delete a post you published, use the Delete a Post endpoint, specifying the ID of the post to be deleted.
await postsApi.deletePost({
path: {
account_id: "acc_123456789",
post_id: "post_id",
},
});posts_api.delete_post("post_id", "acc_123456789")curl --request DELETE \
--url https://api.unipile.com/v2/account_id/posts/post_id \
--header 'accept: application/json'
--header 'content-type: application/json' \Updated about 7 hours ago