POST
/api/v1/users/{user}/webhooksCreate a user webhook
Creates a webhook for a user. Provide the destination url and, if needed, a signingSecret for HMAC-SHA256 signing; the secret is not included in the response. The name field uses the users/{user}/webhooks/{webhook} resource-name format.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
userstringrequired
The identifier of the user who will own the webhook.
Webhook configuration, including its destination URL and optional display name and signing secret.
namestringoptional
The name of the webhook.
Format: users/{user}/webhooks/{webhook}
urlstringoptional
The URL to send the webhook to.
displayNamestringoptional
Optional. Human-readable name for the webhook.
createTimestringoptional
The creation time of the webhook.
updateTimestringoptional
The last update time of the webhook.
signingSecretstringoptional
Optional. Signing secret used to HMAC-SHA256 sign the webhook request body.
This field is input-only; it is never returned in responses.
signingSecretSetbooleanoptional
Whether a signing secret is configured for this webhook.
200Returns the created webhook configuration, including its name, URL, timestamps, and signing-secret configuration status. The signing secret itself is not returned.
namestringoptional
The name of the webhook.
Format: users/{user}/webhooks/{webhook}
urlstringoptional
The URL to send the webhook to.
displayNamestringoptional
Optional. Human-readable name for the webhook.
createTimestringoptional
The creation time of the webhook.
updateTimestringoptional
The last update time of the webhook.
signingSecretstringoptional
Optional. Signing secret used to HMAC-SHA256 sign the webhook request body.
This field is input-only; it is never returned in responses.
signingSecretSetbooleanoptional
Whether a signing secret is configured for this webhook.
defaultReturned when the request fails. The response contains a status code, a developer-facing message, and optional error details.
codeintegeroptional
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
messagestringoptional
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
detailsarray<object>optional
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Error handling
The user path parameter identifies the webhook owner. A supplied name must follow the users/{user}/webhooks/{webhook} resource-name format; signingSecret is used to HMAC-SHA256 sign webhook request bodies.
