# API Request for User Segments

### Parameters

- **networkId** (int32) - *required*  
  Your account (network) ID

- **userKey** (string) - *required*  
  The user ID to update

- **group** (integer) - *optional*  
  Sets the user's incrementality group (1–100) as part of this request; use `group=null` to clear it, or omit to leave it unchanged. Invalid values reject the entire request.

- **segments** (array of int32s) - *required*  
  List of segment IDs to be added.

- **accept** (string) - *enum*  
  Defaults to application/json. Generated from available response content types. Allowed values: `application/json`, `text/plain`.

### Responses

#### `200 OK`
- **object**  
  - **key** (string)  
  - **segments** (array of integers)

#### `400 Bad Request`

---

### Example CURL Request

```shell
curl --request POST \
     --url https://e-networkId.adzerk.net/udb/networkId/segments \
     --header 'accept: application/json' \
     --header 'content-type: application/json'
```

### Example Response

```json
{
  "key": "ue1-e397eb5990",
  "segments": [
    79,
    80
  ]
}
```
