<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "EndpointSecurity",
  "identifier" : "/documentation/EndpointSecurity/es_subscriptions(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Endpoint Security"
    ],
    "preciseIdentifier" : "c:@F@es_subscriptions"
  },
  "title" : "es_subscriptions(_:_:_:)"
}
-->

# es_subscriptions(_:_:_:)

Returns a list of the client’s subscriptions.

```
func es_subscriptions(_ client: OpaquePointer, _ count: UnsafeMutablePointer<Int>, _ subscriptions: UnsafeMutablePointer<UnsafeMutablePointer<es_event_type_t>>?) -> es_return_t
```

## Parameters

`client`

The client to query.

`count`

On return, the number of items in the `subscriptions` array.

`subscriptions`

An array of subscribed event types.

## Return Value

A value that indicates whether the subscriptions query succeeded. [`ES_RETURN_ERROR`](/documentation/EndpointSecurity/ES_RETURN_ERROR) indicates that the caller couldn’t reach the Endpoint Security subsystem or that the request was invalid.

## Discussion

On return, the caller takes ownership of the memory pointed to by the `subscriptions` parameter, and must free it.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)