Replace a connection's webhook secret with a new one, returned once.
POST
/api/v1/git/connections/{connection}/webhook-secret
const url = 'https://example.com/api/v1/git/connections/example/webhook-secret';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/git/connections/example/webhook-secretParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”connection
required
string
Connection id
Responses
Section titled “Responses”Media typeapplication/json
A Git connection’s new webhook secret, shown once.
object
webhookSecret
required
Paste it into the provider’s webhook settings; the previous secret stops working now.
string
webhookUrl
Where the provider sends push events for this connection.
string | null
Examplegenerated
{ "webhookSecret": "example", "webhookUrl": "example"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}