praburaj06 the Flarum API follows the jsonapi REST convention https://jsonapi.org/ The single page app uses the same API, so you can usually see the endpoints, HTTP verbs and examples payloads by looking at the browser console while using the Flarum app.
To edit the discussion title or other discussion attributes, you would use the PATCH /api/discussions/<id> endpoint.
To edit the first post, you would have to first find the post ID, which can be done by reading the firstPost
relation on the GET /api/discussions/<id> response. The relation might need to be included with ?include=firstPost
. Then you can use PATCH /api/posts/<id> to edit the post content.
If you need further help, please specify which attributes you are trying to edit and what you tried so far.