Skip to main content

Get user fields

GET 

/api/v1/user-fields

Retrieves lead generation field data submitted by a given user for a puzzle within a given series. Fields are returned as key-value pairs in a fields object using keys field_1, field_2, and field_3.

What are user fields? User fields correspond to the lead generation fields configured in the series settings. When lead generation is enabled for a series, up to 3 custom fields of information can be collected from players — such as name, email address, or phone number. These fields are configured with labels and input types (text, numbers, or email) in the series settings, and are represented in the API as field_1, field_2, and field_3.

Fields: Fields use keys field_1, field_2, and field_3. The label and validation type for each field are defined in the series settings under Lead Generation. For example, a series might configure field_1 as "Participant Name" (text), field_2 as "Email Address" (email format), and field_3 as "Phone Number" (numbers only).

Response: Only fields that have been set are returned. Fields that have not been set for the user are omitted from the response. The response always returns HTTP 200 with status: 0 — an empty fields object indicates no data has been collected for this user.

Examples:

Get user fields for a given puzzle:

curl -L 'https://sandbox.amuselabs.com/pmm/api/v1/user-fields?series=demo-crossword&userId=9f7439e7-ecf1-4c03-ba90-91273f149231&puzzleId=daily-2024-01-15' \
-H 'Authorization: Bearer YOUR_JWT_TOKEN' \
-H 'Accept: application/json'

Request

Responses

User fields retrieved successfully. Only fields that have been set are returned; fields without values are omitted from the response. An empty fields object means no data has been collected for this user.