# Profile logged out

- Operation ID: `ClientLoggedOut`
- HTTP method: `POST`
- Path: `/v4/events/logged-out`
- [Human-readable API reference](https://hub.synerise.com/api-reference/data-management#tag/Events/operation/ClientLoggedOut)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /v4/events/logged-out:
    post:
      summary: Profile logged out
      description: |
        Send a 'profile logged out' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.logout` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_LOGGED_OUT_EVENTS_CREATE`
      operationId: ClientLoggedOut
      parameters:
        - name: Api-Version
          in: header
          required: true
          style: simple
          explode: false
          schema:
            type: string
            enum:
              - "4.4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - label
                    - client
                  properties:
                    label:
                      type: string
                      example: Human-readable label
                      minLength: 1
                      description: This parameter is required, but not saved in the database. It can't be used in Analytics, Automations, and so on.
                    client:
                      type: object
                      description: |
                        You must provide at least one of those profile identifiers.

                        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                      properties:
                        customId:
                          type: string
                          description: |
                            A custom ID for the Profile. It is a unique identifier.

                            The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

                            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                        id:
                          description: |
                            Unique ID. This ID is generated by the system during profile creation.

                            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                          type: integer
                          format: int64
                          example: 433230297
                        uuid:
                          type: string
                          description: |
                            UUID of the Profile. It is a unique identifier.

                            The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

                            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                          example: 07243772-008a-42e1-ba37-c3807cebde8f
                        email:
                          type: string
                          description: |
                            The profile's e-mail address. 

                            - Must match the pattern (ECMA flavor): `/^(([^<>()[\]\\.,;:\s@\\"]+(\.[^<>()[\]\\.,;:\s@\\"]+)*)|(\\".+\\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/`  
                            - The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

                            By default, email is a unique identifier.

                            If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, this field should not be used. It is no longer an identifier. The configuration of non-unique emails includes creating an email parameter for communication.

                            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                    time:
                      type: string
                      description: |
                        Time when the event occurred, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601). 

                        This time isn't affected and doesn't affect the timezone of your workspace - you can send events with a timezone different than that of the workspace. Synerise calculates the times into UTC standard when saving events in the database.

                        If not defined, the backend inserts the time of receiving the event.

                        A time with a "Z" at the end (for example, `2022-10-14T12:02:06Z`) denotes a time in the UTC standard.

                        If you want to send time in a different timezone, you can do this by appending `{+|-}hh:mm` at the end of the string.  

                        Note that if the timezone is ahead (+) of UTC, the UTC time is calculated by subtraction. When the timezone is behind (-) UTC, the UTC time is calculated by addition.  
                        For example:
                          - if your timezone is UTC+1, append `+01:00`. When you send `2022-10-14T15:00:000+01:00`, it is saved in the database as `2022-10-14T14:00:000Z`
                          - if your timezone is UTC-8, append `-08:00`. When you send `2022-10-14T22:00:000-08:00`, it is saved in the database as `2022-10-15T06:00:000Z` (note that the date also changes between timezones in this example)

                        **IMPORTANT**: If you send an event with a future time, the parameter is rejected and the time of receiving the event is saved as the occurrence time. For example, if your timezone is UTC+1 and you send the event at 15:00 local time, future times are:  
                        - later than 15:00 local time
                        - later than 14:00 UTC

                        When you retrieve an event, its time is always shown as UTC. The original time string that you sent (even if it was a future time and was rejected) can be retrieved with the [activities](https://developers.synerise.com/DataManagement/DataManagement.html#tag/Activities) endpoints, as `snr-original-time`.
                      example: 2019-02-07T09:53:56.999+00:00
                    eventSalt:
                      type: string
                      example: 972346context.action2019-02-07T09:53:56.999+00:00
                      description: |
                        When an event has an `eventSalt`, it can be overwritten by sending another event. The event's UUID stays the same.

                        `eventSalt` must be unique in a workspace. An example of creating a salt is by generating a UUID or concatenating the profile ID, event's name, and timestamp, including milliseconds. This creates a value whose possibility of being duplicated is practically zero.

                        To overwrite an event with another one, the new event MUST:
                        - have the same `eventSalt` as the original event
                        - have the same date and time as the original event (If the date and time don't match the original event, event salt doesn't have any effect.)
                        - belong to the same `clientId` as the original event
                        - have the same action (event name) as the original event

                        ------
                        **IMPORTANT**:  
                        - DO NOT send the same `eventSalt` to different profiles!
                        - DO NOT send the same `eventSalt` with a different action!
                        - Pay attention to timezones - more details in the description of the `time` property (in v4/transactions events, it's called `recordedAt`).
                        - If you send a future time in an event, it is rejected and the current time is assigned automatically. This means it's impossible to use event salt with future times.
                        - An event without an `eventSalt` can't be overwritten. The parameter cannot be added to an event at a later time.
                        - The parameter can't be retrieved later. You must keep track of the values that you send.  
                        - In Automations that use the overwritten event as a trigger, the **automation is triggered if the new event is sent more than 72 hours after the original**. This is because the event UUID stays the same, and Automation treats events with the same UUID within 72 hours as duplicates that were sent due to an error.
                - type: object
                  properties:
                    params:
                      type: object
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        If you want to send a date/time param for use in analytics, take the following into account:
                        - The date/time should be formatted according to ISO 8601.
                        - The time zone of the workspace affects dates/times in the params that DON'T have a defined timezone. Example:
                            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
                            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
                            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                        <span style="color:red"><strong>WARNING:</strong></span>
                        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                        <code>modifiedBy</code><br>
                        <code>apiKey</code><br>
                        <code>eventUUID</code><br>
                        <code>ip</code><br>
                        <code>time</code><br>
                        <code>businessProfileId</code>
                      additionalProperties: true
      responses:
        "202":
          description: Accepted
        "400":
          description: "Bad request: input data missing or malformed"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Summary of the error
                  status:
                    type: integer
                    format: int32
                    description: Status code
                  timestamp:
                    type: string
                    description: Time when the message was sent
                  path:
                    type: string
                    description: URL of the requested resource
                  message:
                    type: string
                    description: Description of the problem
                  errors:
                    type: array
                    description: Additional details of the errors, if applicable
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                          format: int32
                          example: 12082
                          description: A numeric identifier of the error type
                        field:
                          type: string
                          example: countryCode
                          description: Field in the request body that caused the error
                        message:
                          type: string
                          example: Country Code must have 0 or 3 characters as per ISO format.
                          description: A detailed description of the problem
                        rejectedValue:
                          type: string
                          example: Poland
                          description: The value that caused the error
              example:
                timestamp: 2018-06-07T07:28:26.078+00:00
                status: 400
                error: Bad Request
                message: Version header content is invalid
                path: /path_of_the_endpoint
        "401":
          description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Summary of the error
                  status:
                    type: integer
                    format: int32
                    description: Status code
                  timestamp:
                    type: string
                    description: Time when the message was sent
                  path:
                    type: string
                    description: URL of the requested resource
                  message:
                    type: string
                    description: Description of the problem
                  errors:
                    type: array
                    description: Additional details of the errors, if applicable
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                          format: int32
                          example: 12082
                          description: A numeric identifier of the error type
                        field:
                          type: string
                          example: countryCode
                          description: Field in the request body that caused the error
                        message:
                          type: string
                          example: Country Code must have 0 or 3 characters as per ISO format.
                          description: A detailed description of the problem
                        rejectedValue:
                          type: string
                          example: Poland
                          description: The value that caused the error
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T13:08:16.235Z
                path: /exampleEndpoint
                message: Some fields did not pass validation
                errors:
                  - code: 120
                    field: exampleField
                    message: "120"
                    rejectedValue: exampleValue
        "403":
          description: Forbidden; insufficient permissions (when PII protection is enabled, PII permissions are required in addition to the permissions listed in the method description)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Summary of the error
                  status:
                    type: integer
                    format: int32
                    description: Status code
                  timestamp:
                    type: string
                    description: Time when the message was sent
                  path:
                    type: string
                    description: URL of the requested resource
                  message:
                    type: string
                    description: Description of the problem
                  errors:
                    type: array
                    description: Additional details of the errors, if applicable
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                          format: int32
                          example: 12082
                          description: A numeric identifier of the error type
                        field:
                          type: string
                          example: countryCode
                          description: Field in the request body that caused the error
                        message:
                          type: string
                          example: Country Code must have 0 or 3 characters as per ISO format.
                          description: A detailed description of the problem
                        rejectedValue:
                          type: string
                          example: Poland
                          description: The value that caused the error
              example:
                timestamp: 2018-06-07T07:29:27.489+00:00
                status: 403
                error: Forbidden
                message: Forbidden
                path: /path_of_the_endpoint
        "415":
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Summary of the error
                  status:
                    type: integer
                    format: int32
                    description: Status code
                  timestamp:
                    type: string
                    description: Time when the message was sent
                  path:
                    type: string
                    description: URL of the requested resource
                  message:
                    type: string
                    description: Description of the problem
                  errors:
                    type: array
                    description: Additional details of the errors, if applicable
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                          format: int32
                          example: 12082
                          description: A numeric identifier of the error type
                        field:
                          type: string
                          example: countryCode
                          description: Field in the request body that caused the error
                        message:
                          type: string
                          example: Country Code must have 0 or 3 characters as per ISO format.
                          description: A detailed description of the problem
                        rejectedValue:
                          type: string
                          example: Poland
                          description: The value that caused the error
              example:
                timestamp: 2018-06-07T07:27:23.136+00:00
                status: 415
                error: Unsupported Media Type
                message: Content type 'application/xml' not supported
                path: /path_of_the_endpoint
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientLoggedOut
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/logged-out \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

            headers = {
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v4/events/logged-out", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/events/logged-out");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/events/logged-out",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/logged-out');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/events/logged-out")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Events
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
