Mastodon endpoints

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

Updated

These operations exist for Mastodon 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
Edit an existing Mastodon statusPATCH /api/v1/misc/mastodon/status
Delete a Mastodon statusDELETE /api/v1/misc/mastodon/status
Edit a Mastodon commentPATCH /api/v1/misc/mastodon/comment
Delete a Mastodon commentDELETE /api/v1/misc/mastodon/comment
PATCH /api/v1/misc/mastodon/status

Edit an existing Mastodon status

misc.mastodon.editStatus · requires x-api-key

Request body application/json

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

Example

curl -X PATCH "https://api.siaran.my/api/v1/misc/mastodon/status" \
  -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/mastodon/status

Delete a Mastodon status

misc.mastodon.deleteStatus · 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/mastodon/status" \
  -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/mastodon/comment

Edit a Mastodon comment

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

Request body application/json

  • teamId string required
  • commentId string required
  • text string required min length 1max length 500
  • spoilerText string max length 500

Example

curl -X PATCH "https://api.siaran.my/api/v1/misc/mastodon/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/mastodon/comment

Delete a Mastodon comment

misc.mastodon.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/mastodon/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 Mastodon status.

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