User-related API environment
Production user-related API docs
These pages describe the Production user-related API stack.
Use production OAuth credentials, production API base URLs, and production app URLs when following this documentation.
Need to test before going live? Switch to the Pre-live docs using the environment switcher above.
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
Numeric post identifier.
Header Parameters
OAuth user access token for the documented /v1 route. The unversioned /posts alias uses the native session cookie instead.
Request Body 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.
- 200
- 400
- 401
- 404
- 422
- 500
- 503
Reaction applied, changed, or removed.
Schema
The resulting reaction, or null when the selected reaction was removed.
The preceding reaction, or null when there was none. Legacy likes are reaction1.
Possible values: [applied, changed, removed]
The post’s aggregate reaction count after the mutation.
{
"reactionType": "reaction2",
"previousReactionType": "reaction1",
"action": "changed",
"reactionsCount": 18
}
First reaction applied
{
"reactionType": "reaction2",
"previousReactionType": null,
"action": "applied",
"reactionsCount": 3
}
Existing reaction changed
{
"reactionType": "reaction2",
"previousReactionType": "reaction1",
"action": "changed",
"reactionsCount": 3
}
Same reaction removed
{
"reactionType": null,
"previousReactionType": "reaction2",
"action": "removed",
"reactionsCount": 2
}
The post identifier is not numeric.
Schema
{
"statusCode": 0,
"message": "string",
"error": "string"
}
Invalid post identifier
{
"statusCode": 400,
"message": "Validation failed (numeric string is expected)",
"error": "Bad Request"
}
OAuth user authentication is missing or invalid. Expired tokens, banned users and client-credentials tokens are not accepted.
Schema
Possible values: [false]
error object required
details object required
{}
Missing user access token
{
"statusCode": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}
Expired token or banned user
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"details": {}
}
}
The post does not exist or is not visible to this user.
Schema
Possible values: [false]
error object required
details object required
{
"success": false,
"name": "string",
"error": {
"code": "string",
"message": "string",
"details": {}
}
}
Post missing or inaccessible
{
"success": false,
"error": {
"code": "PostNotFound",
"message": "Post not found",
"details": {
"post": "NOT_FOUND"
}
},
"name": "PostNotFound"
}
reactionType is missing or does not match the identifier format.
Schema
Possible values: [false]
error object required
details object required
{
"success": false,
"name": "string",
"error": {
"code": "string",
"message": "string",
"details": {}
}
}
Missing or invalid reaction identifier
{
"success": false,
"error": {
"code": "ValidationError",
"message": "Validation Error",
"details": {
"reactionType": "INVALID"
}
}
}
Unexpected service or notification queue error. A failed response does not guarantee the reaction was not applied; read state before retrying.
Schema
Possible values: [false]
error object required
details object required
{
"success": false,
"name": "string",
"error": {
"code": "string",
"message": "string",
"details": {}
}
}
Unexpected service failure
{
"success": false,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong",
"details": {}
}
}
TigerGraph or authenticated-user reconciliation is temporarily unavailable. Retry-After is only present for graph outages. Read state before retrying an uncertain mutation.
Response Headers
Retry-After integer
Suggested delay in seconds for graph outages; absent for user reconciliation failures.
Schema
Possible values: [false]
error object required
details object required
{}
Graph temporarily unavailable
{
"success": false,
"error": {
"code": "TIGERGRAPH_TEMPORARILY_UNAVAILABLE",
"message": "TigerGraph is temporarily unavailable",
"details": {}
}
}
Authenticated user reconciliation unavailable
{
"statusCode": 503,
"message": "User reconciliation is temporarily unavailable",
"error": "Service Unavailable"
}