- [Resource: CreateSubscriberPayload](https://developers.google.com/health/reference/rest/v4/projects.subscribers#CreateSubscriberPayload)
  - [JSON representation](https://developers.google.com/health/reference/rest/v4/projects.subscribers#CreateSubscriberPayload.SCHEMA_REPRESENTATION)
- [SubscriberConfig](https://developers.google.com/health/reference/rest/v4/projects.subscribers#SubscriberConfig)
  - [JSON representation](https://developers.google.com/health/reference/rest/v4/projects.subscribers#SubscriberConfig.SCHEMA_REPRESENTATION)
- [SubscriberConfig.SubscriptionCreatePolicy](https://developers.google.com/health/reference/rest/v4/projects.subscribers#SubscriberConfig.SubscriptionCreatePolicy)
- [EndpointAuthorization](https://developers.google.com/health/reference/rest/v4/projects.subscribers#EndpointAuthorization)
  - [JSON representation](https://developers.google.com/health/reference/rest/v4/projects.subscribers#EndpointAuthorization.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/health/reference/rest/v4/projects.subscribers#METHODS_SUMMARY)

## Resource: CreateSubscriberPayload

Payload for creating a subscriber.

| JSON representation |
|---|
| ``` { "endpointUri": string, "subscriberConfigs": [ { object (`https://developers.google.com/health/reference/rest/v4/projects.subscribers#SubscriberConfig`) } ], "endpointAuthorization": { object (`https://developers.google.com/health/reference/rest/v4/projects.subscribers#EndpointAuthorization`) } } ``` |

| Fields ||
|---|---|
| `endpointUri` | `string` Required. The full HTTPS URI where update notifications will be sent. The URI must be a valid URL and use HTTPS as the scheme. This endpoint will be verified during the `subscribers.create` call. See subscribers.create RPC documentation for verification details. |
| `subscriberConfigs[]` | ``object (`https://developers.google.com/health/reference/rest/v4/projects.subscribers#SubscriberConfig`)`` Optional. Configuration for the subscriber. |
| `endpointAuthorization` | ``object (`https://developers.google.com/health/reference/rest/v4/projects.subscribers#EndpointAuthorization`)`` Required. Authorization mechanism for the subscriber endpoint. The `secret` within this message is crucial for endpoint verification and for securing webhook notifications. |

## SubscriberConfig

Configuration for a subscriber. A notification is sent to a subscription ONLY if the subscriber has a config for the data type.

| JSON representation |
|---|
| ``` { "dataTypes": [ string ], "subscriptionCreatePolicy": enum (`https://developers.google.com/health/reference/rest/v4/projects.subscribers#SubscriberConfig.SubscriptionCreatePolicy`) } ``` |

| Fields ||
|---|---|
| `dataTypes[]` | `string` Required. See [Google Health API data types](https://developers.google.com/health/data-types) for the list of supported data types. Values should be in kebab-case. |
| `subscriptionCreatePolicy` | ``enum (`https://developers.google.com/health/reference/rest/v4/projects.subscribers#SubscriberConfig.SubscriptionCreatePolicy`)`` Required. Policy for subscription creation. |

## SubscriberConfig.SubscriptionCreatePolicy

Policy for subscription creation.

| Enums ||
|---|---|
| `SUBSCRIPTION_CREATE_POLICY_UNSPECIFIED` | Represents an unspecified policy. |
| `AUTOMATIC` | When using `AUTOMATIC`, individual subscriptions are not created or stored. Instead, eligibility for notifications is computed dynamically. When a data update occurs for a given data type, notifications are sent to all subscribers with an `AUTOMATIC` policy for that data type, provided the user has granted the necessary consents. This means you do not need to call `CreateSubscription` for each user; notifications are managed automatically based on user consents. As `Subscription` resources are not stored, they cannot be retrieved or managed through `GetSubscription`, `ListSubscriptions`, `UpdateSubscription`, or `DeleteSubscription`. |
| `MANUAL` | Requires subscriptions to be created manually for new users. The developer needs to call CreateSubscription for new users. |

## EndpointAuthorization

Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the `GOOGLE-HEALTH-API-SIGNATURE` HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API.

| JSON representation |
|---|
| ``` { "secret": string, "secretSet": boolean } ``` |

| Fields ||
|---|---|
| `secret` | `string` Required. Input only. Provides a client-provided secret that will be sent with each notification to the subscriber endpoint using the "Authorization" header. The value must include the authorization scheme, e.g., "Bearer " or "Basic ", as it will be used as the full Authorization header value. This secret is used by the API to test the endpoint during `subscribers.create` and `subscribers.patch` calls, and will be sent in the `Authorization` header for all subsequent webhook notifications to this endpoint. |
| `secretSet` | `boolean` Output only. Whether the secret is set. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/health/reference/rest/v4/projects.subscribers/create` | Registers a new subscriber endpoint to receive notifications. |
| ### `https://developers.google.com/health/reference/rest/v4/projects.subscribers/delete` | Deletes a subscriber registration. |
| ### `https://developers.google.com/health/reference/rest/v4/projects.subscribers/list` | Lists all subscribers registered within the owned Google Cloud Project. |
| ### `https://developers.google.com/health/reference/rest/v4/projects.subscribers/patch` | Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in. |