Likes

Like a post

Like a post to show appreciation

post/posts/{postId}/likes

Path parameters

postIdstring uuid required
Example:123e4567-e89b-12d3-a456-426614174000

Unique identifier of the post

Request body

usernamestring required

Username of the user liking the post

Example request

{
  "username": "mike_wilson"
}

Response

Post liked successfully

postIdstring uuid required

ID of the liked post

usernamestring required

Username who liked the post

likedAtstring date-time required

Timestamp when the post was liked

Example response

{
  "postId": "123e4567-e89b-12d3-a456-426614174000",
  "username": "mike_wilson",
  "likedAt": "2025-06-01T12:00:00Z"
}

Changes

Changed in 3 of the 3 revisions of this API.1058

    • added the new path request parameter postId

      new-request-path-parameter

    • the response's property type changed from object to array for status

      response-property-type-changed

    • the response's property type changed from object to array for status

      response-property-type-changed

    • the response's property type changed from object to array for status

      response-property-type-changed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 2775bd09f55e127See the full diff
    • the request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • deleted the path request parameter postId

      request-parameter-removed

    • the request property's maxLength was set to 50

      request-property-max-length-set

    • added the media type application/json for the response with the status

      response-media-type-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

  • dbaf42ae4311531See the full diff
    • for the path request parameter postId, the type changed from string to integer, and format from uuid to no format

      request-parameter-type-changed

    • removed the media type application/json for the response with the status

      response-media-type-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • the request property's minLength was decreased from 1 to 0

      request-property-min-length-decreased

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog