Welcome to the API documentation for our Community Forum! Here you will find detailed information about the available endpoints, request formats, and response structures.

Available Endpoints

  • GET /threads: Retrieve a list of threads.
  • POST /threads: Create a new thread.
  • GET /threads/{id}: Retrieve information about a specific thread.
  • PUT /threads/{id}: Update a specific thread.
  • DELETE /threads/{id}: Delete a specific thread.

Request and Response Formats

All requests to the API should be made in JSON format. Here is an example of a request to retrieve a list of threads:

{
  "page": 1,
  "limit": 10
}

The response will be in JSON format as well, containing the requested data:

{
  "threads": [
    {
      "id": 1,
      "title": "Welcome to the Community Forum!",
      "content": "This is the first thread in our community forum. Feel free to post your questions and discussions here!",
      "author": "Admin",
      "created_at": "2023-01-01T12:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 10
}

Usage Examples

Here are some examples of how to use the API:

  • Retrieve a list of threads:

    curl -X GET "https://community-forum.com/api/threads?page=1&limit=10"
    
  • Create a new thread:

    curl -X POST "https://community-forum.com/api/threads" -H "Content-Type: application/json" -d '{"title": "New Thread", "content": "This is a new thread."}'
    
  • Retrieve information about a specific thread:

    curl -X GET "https://community-forum.com/api/threads/1"
    

Additional Resources

For more information about the Community Forum, please visit our official website.


If you have any questions or need further assistance, feel free to reach out to our support team at support@community-forum.com.


Community Forum