Skip to Content

RotateEndpointSecret

POST
/webhooks/v1/projects/{project_id}/endpoints/{endpoint_id}/rotate-secret

RotateEndpointSecret installs a fresh signing secret. For 24h deliveries are signed with both the old and the new secret so consumers can migrate.

Path Parameters

project_id*project_id
Length1 <= length
endpoint_id*endpoint_id
Length1 <= length

Response Body

200application/json

Success

type: unknown

{
  "$ref": "#/components/schemas/webhooks.v1.RotateEndpointSecretResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "secret": {
        "type": "string",
        "examples": [
          "whsec_6PJkX9sR3uVbNwYqTzLeHdCgAfMjKoQx"
        ],
        "title": "secret"
      }
    },
    "title": "RotateEndpointSecretResponse",
    "additionalProperties": false
  }
}
defaultapplication/json

An unexpected error response.

type: unknown

{
  "$ref": "#/components/schemas/google.rpc.Status",
  "$ref-value": {
    "type": "object",
    "properties": {
      "code": {
        "type": "integer",
        "format": "int32",
        "description": "The status code, which should be an enum value of google.rpc.Code."
      },
      "message": {
        "type": "string",
        "description": "A developer-facing error message."
      },
      "details": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/google.protobuf.Any",
          "$ref-value": {
            "type": "object",
            "properties": {
              "@type": {
                "type": "string",
                "description": "A URL/resource name that uniquely identifies the type of the serialized message."
              }
            },
            "additionalProperties": true,
            "description": "Contains an arbitrary serialized message along with a @type that describes the type of the serialized message."
          }
        },
        "description": "A list of messages that carry the error details."
      }
    },
    "description": "The Status type defines a logical error model suitable for gRPC and REST APIs."
  }
}
curl -X POST 'https://api.rixl.com/webhooks/v1/projects/string/endpoints/string/rotate-secret'

Success

application/json

{
  "$ref": "#/components/schemas/webhooks.v1.RotateEndpointSecretResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "secret": {
        "type": "string",
        "examples": [
          "whsec_6PJkX9sR3uVbNwYqTzLeHdCgAfMjKoQx"
        ],
        "title": "secret"
      }
    },
    "title": "RotateEndpointSecretResponse",
    "additionalProperties": false
  }
}