Skip to content
Navigation

updateRepoWebhookSecret

Replace a webhook's secret. One whose secret Forge makes takes an empty body and answers a new secret, the one time it is shown; one whose provider makes it takes the provider's as {"secret":"…"}.

PUT
/repos/{repo_id}/webhooks/{extension_name}/{webhook}/secret

Path parameters

  • repo_id
    string
    required
    pattern: ^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • extension_name
    string
    required
    maxLength: 129 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$
  • webhook
    string
    required
    maxLength: 128 · pattern: ^[A-Za-z_][A-Za-z0-9_]*$

Request body JSON required

  • secret
    optional
    string
    maxLength: 1024 · minLength: 1

Returns

200

RepoWebhookSubscription

JSON
  • url
    string
    required
  • secret
    required

    One of the following:

    • string
    • null
  • secret_set_at
    required

    One of the following:

    • string
    • null

400

InvalidRequest | RequestBodyTooDeep
JSON

One of the following:

  • InvalidRequestEncoded
    • _tag
      InvalidRequest
      required
    • part
      path
      or
      query
      or
      headers
      or
      body
      required
    • issues
      array of
      object
      required
      • path
        array of
        required

        One of the following:

        • string
        • integer
      • message
        string
        required
  • RequestBodyTooDeepEncoded
    • _tag
      RequestBodyTooDeep
      required
    • max_depth
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991

401

InvalidCredentials
JSON
  • _tag
    InvalidCredentials
    required

403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired
JSON

One of the following:

  • ForbiddenEncoded
    • _tag
      Forbidden
      required
    • message
      string
      required
  • ForbiddenOriginEncoded
    • _tag
      ForbiddenOrigin
      required
  • RequiresPersonalSessionEncoded
    • _tag
      RequiresPersonalSession
      required
  • RunBranchRequiredEncoded
    • _tag
      RunBranchRequired
      required
    • branch
      string
      required
      minLength: 1
    • message
      string
      required

404

ExtensionWebhookNotFound | RepoNotFound
JSON

One of the following:

  • ExtensionWebhookNotFoundEncoded
    • _tag
      ExtensionWebhookNotFound
      required
    • extension_name
      string
      required
      minLength: 1
    • webhook
      string
      required
      minLength: 1
  • RepoNotFoundEncoded
    • _tag
      RepoNotFound
      required

409

RepoArchived
JSON
  • _tag
    RepoArchived
    required

413

WriteTooLarge | RequestBodyTooLarge
JSON

One of the following:

  • WriteTooLargeEncoded
    • _tag
      WriteTooLarge
      required
    • message
      string
      required
  • RequestBodyTooLargeEncoded
    • _tag
      RequestBodyTooLarge
      required
    • max_bytes
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991

422

ExtensionWebhookSecretRefused
JSON
  • _tag
    ExtensionWebhookSecretRefused
    required
  • extension_name
    string
    required
    minLength: 1
  • webhook
    string
    required
    minLength: 1
  • secret_source
    forge
    or
    provider
    required

429

RateLimited
JSON
  • _tag
    RateLimited
    required

500

RepoFailure | OrgFailure
JSON

One of the following:

  • RepoFailureEncoded
    • _tag
      RepoFailure
      required
    • reason
      string
      required
  • OrgFailureEncoded
    • _tag
      OrgFailure
      required
    • reason
      string
      required

503

ExtensionWebhookUnavailable | RepoBusy | SessionUnavailable | RateLimitUnavailable
JSON

One of the following:

  • ExtensionWebhookUnavailableEncoded
    • _tag
      ExtensionWebhookUnavailable
      required
    • extension_name
      string
      required
      minLength: 1
    • webhook
      string
      required
      minLength: 1
  • RepoBusyEncoded
    • _tag
      RepoBusy
      required
    • message
      string
      required
  • SessionUnavailableEncoded
    • _tag
      SessionUnavailable
      required
  • RateLimitUnavailableEncoded
    • _tag
      RateLimitUnavailable
      required

Type to search…

↑↓ navigate↵ selectEsc close