REST Resource: projects.locations.brands.webhookSubscriptions

Resource: WebhookSubscription

A webhook subscription configured for a brand to receive real-time event notifications.

JSON representation
{
  "name": string,
  "displayName": string,
  "state": enum (State),
  "eventTypes": [
    string
  ],
  "destinationUrl": string,
  "filter": string,
  "authConfig": {
    object (WebhookAuthConfig)
  },
  "createTime": string,
  "updateTime": string
}
Fields
name

string

Identifier. The resource name of the webhook subscription. Format: projects/{project}/locations/{location}/brands/{brand}/webhookSubscriptions/{webhookSubscription}

displayName

string

Optional. Human-readable display name for this webhook subscription.

state

enum (State)

Optional. The current state of the webhook subscription. Users may transition a subscription between ACTIVE and PAUSED.

eventTypes[]

string

Required. Event types that trigger this webhook subscription (e.g., sessions/started, sessions/updated, sessions/closed, orders/updated).

destinationUrl

string

Required. The HTTPS endpoint URL where webhook events are delivered via HTTP POST.

filter

string

Optional. Common Expression Language (CEL) filter expression evaluated against event attributes (e.g., channel == 'CHANNEL_TYPE_DRIVE_THROUGH' && store.endsWith('/stores/store-123')). If empty, all events matching eventTypes for the brand are delivered.

authConfig

object (WebhookAuthConfig)

Optional. Authentication configuration for outbound webhook deliveries.

createTime

string (Timestamp format)

Output only. The time this webhook subscription was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time this webhook subscription was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

State

Lifecycle state of the webhook subscription.

Enums
STATE_UNSPECIFIED Unspecified state.
ACTIVE The subscription is active and receiving webhook event deliveries.
PAUSED The subscription has been paused by the user and will not receive events until re-activated.
SUSPENDED The subscription has been automatically suspended by the platform circuit breaker due to repeated delivery failures.

WebhookAuthConfig

Authentication configuration for outbound webhook deliveries.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "basicAuth": {
    object (BasicAuth)
  },
  "apiKeyAuth": {
    object (ApiKeyAuth)
  },
  "bearerTokenAuth": {
    object (BearerTokenAuth)
  }
  // End of mutually exclusive fields.
}
Fields
The authentication method to use when dispatching webhook requests. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
basicAuth

object (BasicAuth)

Optional. Configuration for HTTP Basic authentication.

apiKeyAuth

object (ApiKeyAuth)

Optional. Configuration for API key / custom header authentication.

bearerTokenAuth

object (BearerTokenAuth)

Optional. Configuration for Bearer token authentication.

End of mutually exclusive fields.

BasicAuth

HTTP Basic Authentication (Authorization: Basic <base64(user:pass)>).

JSON representation
{
  "credential": {
    object (SecretSource)
  }
}
Fields
credential

object (SecretSource)

Required. Secret containing the colon-separated basic auth credential in <username>:<password> format.

SecretSource

Reference to a secret value used for webhook authentication.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "secretVersion": string
  // End of mutually exclusive fields.
}
Fields
The backing store for the secret value. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
secretVersion

string

Optional. The name of the Secret Manager secret version resource storing the secret value. Format: projects/{project}/secrets/{secret}/versions/{secretVersion}

Note: You must grant the roles/secretmanager.secretAccessor role to the Food Ordering AI Agent service agent service-<PROJECT-NUMBER>@gcp-sa-foodorderingaiagent.iam.gserviceaccount.com.

End of mutually exclusive fields.

ApiKeyAuth

API Key / Custom Header Authentication (<header>: <secret_value>).

JSON representation
{
  "header": string,
  "apiKey": {
    object (SecretSource)
  }
}
Fields
header

string

Required. The HTTP header to populate (e.g., "X-API-Key").

apiKey

object (SecretSource)

Required. Secret containing the API key or header value.

BearerTokenAuth

Bearer Token Authentication (Authorization: Bearer <token>).

JSON representation
{
  "token": {
    object (SecretSource)
  }
}
Fields
token

object (SecretSource)

Required. Secret containing the bearer token.

Methods

create

Creates a webhook subscription.

delete

Deletes the specified webhook subscription.

get

Gets a webhook subscription.

list

Lists webhook subscriptions for a brand.

patch

Updates the specified webhook subscription.