Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: LogRocket REST Users API
description: The LogRocket REST API provides programmatic access to LogRocket session replay and monitoring data. It enables developers to manage user identification by sending demographic and engagement data via PUT requests to contextualize user behavior. The API also supports retrieving session highlights and exported session data. All endpoints require an API access key available from the LogRocket dashboard under Settings.
version: '1.0'
contact:
name: LogRocket Support
url: https://logrocket.com/support
termsOfService: https://logrocket.com/terms
servers:
- url: https://api.logrocket.com/v1
description: LogRocket Production API
security:
- tokenAuth: []
tags:
- name: Users
description: Manage user identification and traits for session context.
paths:
/orgs/{orgId}/apps/{appId}/users/{userId}:
put:
operationId: updateUser
summary: Create or update user traits
description: Creates or updates a user record with the specified traits. If the user already exists, any traits present in the request will be updated to the new value. Traits not included in the request will maintain their previous values. To remove a trait, set it to a blank value. Any user trait values submitted as integers or booleans will be converted to strings in the response.
tags:
- Users
parameters:
- $ref: '#/components/parameters/orgId'
- $ref: '#/components/parameters/appId'
- name: userId
in: path
required: true
description: The unique identifier for the user within your application.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserIdentificationRequest'
responses:
'200':
description: User traits successfully updated.
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
description: Invalid request body or parameters.
'401':
description: Missing or invalid API key.
'404':
description: Organization or application not found.
components:
parameters:
appId:
name: appId
in: path
required: true
description: The application or project identifier found in the LogRocket dashboard URL.
schema:
type: string
orgId:
name: orgId
in: path
required: true
description: The organization identifier found in the LogRocket dashboard URL.
schema:
type: string
schemas:
UserIdentificationRequest:
type: object
description: Request body for creating or updating user identification traits.
properties:
name:
type: string
description: The display name of the user.
email:
type: string
format: email
description: The email address of the user.
traits:
type: object
description: Custom key-value pairs representing user traits such as subscription type, revenue data, or product interest. Values will be converted to strings in the response.
additionalProperties:
oneOf:
- type: string
- type: integer
- type: boolean
User:
type: object
description: A LogRocket user record with identification traits.
properties:
userId:
type: string
description: The unique identifier for the user.
name:
type: string
description: The display name of the user.
email:
type: string
format: email
description: The email address of the user.
traits:
type: object
description: Custom key-value pairs representing user traits. All values are returned as strings regardless of the input type.
additionalProperties:
type: string
securitySchemes:
tokenAuth:
type: apiKey
in: header
name: Authorization
description: API token authentication. Use the format "token <your-api-key>". API keys are available from the LogRocket dashboard under Settings > General Settings.
externalDocs:
description: LogRocket API Reference
url: https://docs.logrocket.com/reference