Skip to main content
POST
/
{org}
/
webhook-targets
Create webhook target
curl --request POST \
  --url https://api.mesa.dev/v1/{org}/webhook-targets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "events": [
    "push"
  ],
  "repo_ids": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "url": "<string>",
  "events": [
    "repo.created"
  ],
  "repo_ids": [
    "<string>"
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "secret": "<string>"
}
Required scope: admin

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

org
string
required
Minimum string length: 1

Body

application/json
url
string<uri>
required
events
enum<string>[]
Minimum array length: 1
Available options:
repo.created,
repo.updated,
repo.deleted,
bookmark.created,
bookmark.deleted,
bookmark.moved,
bookmark.merged,
change.created,
change.evolved,
push
repo_ids
string[]
Minimum array length: 1
Minimum string length: 1

Response

Webhook target created

id
string
required
url
string
required
events
enum<string>[]
required
Available options:
repo.created,
repo.updated,
repo.deleted,
bookmark.created,
bookmark.deleted,
bookmark.moved,
bookmark.merged,
change.created,
change.evolved,
push
repo_ids
string[] | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
secret
string
required