---
schema_version: "1"
id: 0c7d78d88056535b8ff5c1737135e0a3e36912710ed1b356cd4f9647d9de283c
title: Post Data from an Authenticated Server-to-Server Connection
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-engagement-mobile-sdk/guides/c360a-api-engagement-web-mobile-sdk-authenticated-server-to-server.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-engagement-mobile-sdk/guide/c360a-api-engagement-web-mobile-sdk-authenticated-server-to-server.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 207544aa5048c510b298ebaf4be9daff0ccee99315e98b1bc548e84a4bda9341
products:
  - Data 360 Engagement Mobile SDK
  - Data 360 Developer Documentation
---
# Post Data from an Authenticated Server-to-Server Connection

Use the POST method to send event data through an authenticated server-to-server connection. Use a server-to-server connection when your server already collects engagement data that you want to forward to Data 360 or when you require an authenticated connection.

- URI

  - : `/server/events/{appSourceId}`.

Retrieve the `{appSourceId}` after you create a server-to-server connection in Data 360.

- Available since release

  - : Salesforce v63.0

- Formats

  - : REST

- HTTP methods

  - : POST

- Authentication

  - : Authenticated connections require a connected app. For instructions, see [Create an Authenticated Server-to-Server Connection](https://developer.salesforce.com/docs/data/data-cloud-int/guide/c360-a-authenticated-server-to-server.html).

- Request body

  - :

    ```bash
    url --location --request POST
    'https://{Data_Cloud_instance_url}/server/events/{appSourceId}\
    --header 'Authorization: Bearer {access_token}' \
    --header 'Content-Type: application/json' \
    --data `{
        "events": [
            {
                "eventId": "Event ID",
                "dateTime": "Time stamp",
                "sessionId": "Session ID",
                "deviceId": "Device ID",
                "eventType": "Event type",
                "category": "Category"
            }
          ]
    }`
    ```

**note:** You can include multiple event types in a request. For more information, see the [recommended schema](https://developer.salesforce.com/docs/atlas.en-us.c360a_api.meta/c360a_api/c360a_api_salesforce_cdp_module_of_the_salesforce_web_sdk.htm).

- Request parameters

  - :

    | Parameter   | Description                                                                    |
    | ----------- | ------------------------------------------------------------------------------ |
    | `eventId`   | A unique ID for each event                                                     |
    | `dateTime`  | Timestamp must be in ISO8601 format `YYYY-MM-DD'T'HH:mm:ss.SSS'Z'`             |
    | `sessionId` | Same as the `deviceId`                                                         |
    | `deviceId`  | A unique ID, stored in a cookie, for the device from which the request is made |
    | `eventType` | Contains the `developerName` value used in the definition of an event schema   |
    | `category`  | Must be either `profile` or `engagement`                                       |

- Response body

  - :

    | Code  | Description                 |
    | ----- | --------------------------- |
    | `204` | No Content (payload posted) |
    | `400` | Bad Request                 |
    | `401` | Unauthorized                |
    | `500` | Server Error                |
