Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
How do I add tags to a PieFed post via the API?
I'm automating posts to PieFed and I can't get tags/labels to actually show up on the created post.
What I'm doing
I'm POSTing to create a post with a body that includes hash-style tags, something like:
Some post body here
#tag1 #tag2 #tag3
Or sometimes I try passing a separate tags field in the JSON body.
Current code / request
// Replace this block with your exact current request
POST /api/v3/post
{
"community_id": 123,
"name": "Example post",
"body": "Body text\n\n#testing #automation",
"url": null,
"auth": "<jwt>"
}
What happens
The post is created, but the tags never appear as clickable tags on the post. I don't see them in the API response either. The paragraphs/body text works fine.
What I've tried
- Adding
#tagtokens in the body text - Sending a top-level
"tags": [...]field - Using both the Lemmy-compatible API and PieFed's
/api/alpha/postendpoint
Specific question
What is the current supported way to add tags to a PieFed post via API?
- Should tags be embedded in
bodyas#tagtext? - Is there an actual
tagsfield/list in the post create payload? - If tags are supported, what exact keys/values are accepted?

1 comment thread