Reddit endpoints

Reddit endpoints in the Siar social media API: 6 operations that exist on Reddit only, with parameters, body fields, responses and curl examples.

Updated

These operations exist for Reddit only. The shared operations (posts, comments, analytics) are in the API reference; all network-specific areas are listed under network-specific operations.

Operations

OperationMethod and path
Get subreddit post requirements (flair required/enabled)GET /api/v1/misc/reddit/post-requirements
Get subreddit flairs listGET /api/v1/misc/reddit/subreddit-flairs
Edit an existing Reddit postPATCH /api/v1/misc/reddit/post
Delete a Reddit postDELETE /api/v1/misc/reddit/post
Edit an existing Reddit commentPATCH /api/v1/misc/reddit/comment
Delete a Reddit commentDELETE /api/v1/misc/reddit/comment
GET /api/v1/misc/reddit/post-requirements

Get subreddit post requirements (flair required/enabled)

misc.reddit.getPostRequirements · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string
subreddit required query string

Example

curl -X GET "https://api.siaran.my/api/v1/misc/reddit/post-requirements?teamId=TEAM_ID&subreddit=string" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

2 top-level fields
  • isFlairRequired boolean required
  • isFlairEnabled boolean required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/misc/reddit/subreddit-flairs

Get subreddit flairs list

misc.reddit.getSubredditFlairs · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string
subreddit required query string

Example

curl -X GET "https://api.siaran.my/api/v1/misc/reddit/subreddit-flairs?teamId=TEAM_ID&subreddit=string" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

8 top-level fields
  • id string
  • text string
  • cssClass string
  • textColor string
  • backgroundColor string
  • modOnly boolean
  • allowableContent string
  • maxEmojis number

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

PATCH /api/v1/misc/reddit/post

Edit an existing Reddit post

misc.reddit.editPost · requires x-api-key

Request body application/json

  • teamId string required
  • postId string required
  • description string required

Example

curl -X PATCH "https://api.siaran.my/api/v1/misc/reddit/post" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "postId": "POST_ID",
    "description": "Hello from Siar"
  }'

Response 200

2 top-level fields
  • success boolean required
  • permalink string required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/misc/reddit/post

Delete a Reddit post

misc.reddit.deletePost · requires x-api-key

Request body application/json

  • teamId string required
  • postId string required

Example

curl -X DELETE "https://api.siaran.my/api/v1/misc/reddit/post" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "postId": "POST_ID"
  }'

Response 200

1 top-level fields
  • success boolean required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

PATCH /api/v1/misc/reddit/comment

Edit an existing Reddit comment

misc.reddit.editComment · requires x-api-key

Request body application/json

  • teamId string required
  • commentId string required
  • text string required min length 1max length 10,000

Example

curl -X PATCH "https://api.siaran.my/api/v1/misc/reddit/comment" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "commentId": "COMMENT_ID",
    "text": "Hello from Siar"
  }'

Response 200

2 top-level fields
  • success boolean required
  • permalink string nullable

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/misc/reddit/comment

Delete a Reddit comment

misc.reddit.deleteComment · requires x-api-key

Request body application/json

  • teamId string required
  • commentId string required

Example

curl -X DELETE "https://api.siaran.my/api/v1/misc/reddit/comment" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "commentId": "COMMENT_ID"
  }'

Response 200

Same fields as the response of Delete a Reddit post.

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error