ReferenceNotifications (webhooks)

refreshNotificationCallbackConfigSecret mutation

Refreshes the secret of the API key used by the callback configuration. By default, a secret is valid for one year. No notification is sent when a secret expires; you can determine when it will expire using the secretExpirationDateTime field. If a secret expires, notifications fail to be sent for active subscriptions, though we attempt to retry sending them according to the retry policy for the event type. If a secret is refreshed during these retry attempts, notifications will be sent successfully.

If the secret's expiry date is at least three days in the future, you can specify when the new secret is used by specifying the keepExistingSecretActive input parameter. The old and new secrets are sent in the x-eg-notification-signature-v2 notification header, in this format: sha256=hash(timestamp.payload with newSecret),hash(timestamp.payload with oldSecret) during this period.

Syntax

1mutation {
2 refreshNotificationCallbackConfigSecret(
5}

Example

1mutation {
2 refreshNotificationCallbackConfigSecret (
3 input: {
4 callbackConfigId: "1969081f-8380-4dbd-9a19-c26fc1747b06",
5 keepExistingSecretActive: true
6 })
7 {
8 callbackConfigId
9 secret
10 secretExpirationDateTime
11 previousSecretExpirationDateTime
12 }
13}

Arguments

NameDescription

input

Required.

Callback configuration to update.

Type: RefreshNotificationCallbackConfigSecretInput

Types


Name
Type
Boolean
Boolean

The Boolean scalar type represents true or false.

ID
ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

LocalDateTime
LocalDateTime

A type representing a date and time (such as 2007-12-03T10:15:30).

RefreshNotificationCallbackConfigSecretInput
InputObject

Callback configuration to update.

FieldDescription
callbackConfigIdNot nullable.

ID of callback configuration to update.

Type: ID
keepExistingSecretActiveNot nullable.

Whether to persist the existing secret (default value: false). When set to true, the existing secret is used for three days or until the secret's expiry time, whichever comes first. When set to false, the new secret is used immediately. The mutation request will fail if keepExistingSecretActive is set to true for an expired secret.

Type: Boolean
RefreshNotificationCallbackConfigSecretPayload
Object

Details to use when updating the callback configuration's secret.

FieldDescription
callbackConfigIdNot nullable.

ID of callback configuration whose secret is updated.

Type: ID
previousSecretExpirationDateTime

Expiration date and time of the existing secret.

Type: LocalDateTime
secretNot nullable.

String (24 characters in length) used to validate the signature of payloads when you receive notifications from the webhooks service.

Type: String
secretExpirationDateTimeNot nullable.

Expiration date and time of the new secret.

Type: LocalDateTime
String
String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.