### Identify API Request Body Example (JSON) Source: https://docs.dittofeed.com/api-reference/endpoints/apps/identify/index This JSON object represents the structure of a request body for the Identify API call. It includes a mandatory `userId`, an optional `traits` object for user attributes like email, and a `messageId` for unique message identification. ```json { "userId": "532", "traits": { "email": "john@email.com" }, "messageId": "6f5f436d-8534-4070-8023-d18f8b78ed39" } ``` -------------------------------- ### POST /api/public/apps/identify Source: https://docs.dittofeed.com/api-reference/endpoints/apps/identify/index The Identify call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about the user, like their email, name, and more. ```APIDOC ## POST /api/public/apps/identify ### Description The Identify call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about the user, like their email, name, and more. ### Method POST ### Endpoint /api/public/apps/identify ### Parameters #### Header Parameters - **authorization** (string) - Required - Authorization header for the request, in the format `Bearer `. Find your token at https://app.dittofeed.com/dashboard/settings#write-key. #### Request Body - **messageId** (string) - Required - Unique identifier for the message, used as an idempotency key for safe retries. Can provide a UUID. - **timestamp** (string) - Optional - ISO 8601 formatted timestamp of when the event occurred. If not provided, the current server time will be used. - **context** (object) - Optional - Provides metadata about the user submitting the event and the context in which the event occurred. - **traits** (object) - Optional - Free-form dictionary of traits of the user, like email or name. Can contain arbitrary JSON values. - **userId** (string) - Required - Unique identifier for the user. Should be the id of the user in your system. Only applicable to logged in users. ### Request Example ```json { "messageId": "23d04926-78e5-4ebc-853f-f26c84ff629e", "timestamp": "2024-04-22T07:00:00.000Z", "context": { "ip": "192.0.2.1" }, "traits": { "name": "Michael Scott", "items": [ { "id": 1, "name": "Paper" }, { "id": 2, "name": "Stapler" } ] }, "userId": "user-123" } ``` ### Response #### Success Response (200) (No specific success response fields are detailed in the provided OpenAPI schema, but typically would indicate successful processing of the identify call.) #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### POST /api/public/apps/identify Source: https://docs.dittofeed.com/api-reference/endpoints/apps/identify/index The Identify call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about the user, like their email, name, and more. ```APIDOC ## POST /api/public/apps/identify ### Description The Identify call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about the user, like their email, name, and more. ### Method POST ### Endpoint /api/public/apps/identify ### Parameters #### Request Body - **userId** (string) - Required - The unique identifier for the user. - **traits** (object) - Optional - An object containing traits about the user, such as email, name, etc. - **email** (string) - Optional - The user's email address. - **name** (string) - Optional - The user's name. - **messageId** (string) - Required - A unique identifier for the message. ### Request Example ```json { "userId": "532", "traits": { "email": "john@email.com" }, "messageId": "6f5f436d-8534-4070-8023-d18f8b78ed39" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success status of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### POST /apps/{appId}/identify Source: https://docs.dittofeed.com/api-reference/endpoints/apps/identify/index Identify an anonymous user and associate traits with them. This endpoint is used to track user events and properties. ```APIDOC ## POST /apps/{appId}/identify ### Description Identify an anonymous user and associate traits with them. This endpoint is used to track user events and properties. ### Method POST ### Endpoint /apps/{appId}/identify ### Parameters #### Path Parameters - **appId** (string) - Required - The ID of the application. #### Query Parameters None #### Request Body - **messageId** (string) - Required - A unique identifier for the message. - **anonymousId** (string) - Required - Identifier for a logged out user. It can be any pseudo-unique identifier, for example a session Id or a UUID. - Examples: `0a58e5e4-c753-477e-a6c4-f9b0e3396b9b`, `session-123` ### Request Example ```json { "messageId": "msg-123e4567-e89b-12d3-a456-426614174000", "anonymousId": "0a58e5e4-c753-477e-a6c4-f9b0e3396b9b" } ``` ### Response #### Success Response (204) - Description: An empty String #### Response Example ```json "" ``` #### Error Response (401) - **message** (string) - Description of the error. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.