Skip to main content

User-related API environment

Pre-live user-related API docs

These pages describe the Pre-live user-related API stack.

Use pre-live OAuth credentials, pre-live API base URLs, and pre-live app URLs when following this documentation. Keep your OAuth flow, API requests, callback URLs, and manual testing within the pre-live environment.

Set or toggle a post reaction​

The /v1/posts/{id}/reactions route requires an OAuth user access token in x-auth-token; client-credentials tokens are not accepted. The unversioned /posts/{id}/reactions alias instead requires the existing native session cookie. Both require a post visible to the authenticated user. Adds a reaction when none exists, changes a different reaction without changing the total, or removes the same reaction when selected again. This is a toggle, not an idempotent setter: do not automatically retry a mutation with an unknown outcome. Legacy likes are reaction1. Newly applied reactions use the existing like notification flow; changes and removals do not create another notification. Returns the service-native payload directly, with null values included for absent reactions. Gateway exposure and scope enforcement are managed separately.

Path Parameters
    id number required

    Numeric post identifier.

Header Parameters
    x-auth-token string required

    OAuth user access token for the documented /v1 route. The unversioned /posts alias uses the native session cookie instead.

Request Body required
    reactionType string required

    Possible values: non-empty and <= 32 characters, Value must match regular expression ^[a-z][a-z0-9_]{0,31}$

    Stable, case-sensitive reaction identifier: 1–32 lowercase letters, digits or underscores, starting with a letter. Identifiers are generic so the available reactions can evolve without an API change.

Responses

Reaction applied, changed, or removed.


Schema
    reactionType string nullable required

    The resulting reaction, or null when the selected reaction was removed.

    previousReactionType string nullable required

    The preceding reaction, or null when there was none. Legacy likes are reaction1.

    action string required

    Possible values: [applied, changed, removed]

    reactionsCount number required

    The post’s aggregate reaction count after the mutation.

Loading...