Skip to content
Go to Micro

List webhooks

client.Webhooks.List(ctx, query) (*WebhookListResponse, error)
GET/v2/webhooks/{teamId}

Lists the team’s webhooks. Signing secrets are never included.

ParametersExpand Collapse
query WebhookListParams
TeamID param.Field[string]Optional
formatuuid
ReturnsExpand Collapse
type WebhookListResponse struct{…}
Data []Webhook
ID string
formatuuid
CreatedAt Time
formatdate-time
Enabled bool

Disabled webhooks are skipped at delivery time.

Name string
TeamID string
formatuuid
URL string

Endpoint events are delivered to.

formaturi
Verified bool

True once the endpoint has completed the verification handshake.

Description stringOptional
UpdatedAt TimeOptional
formatdate-time
VerificationToken stringOptional

Stable token replayed to the endpoint (as the micro_hook_token query param) during the verification handshake. The endpoint may check it to confirm the request originated from Micro.

VerifiedAt TimeOptional
formatdate-time

List webhooks

package main

import (
  "context"
  "fmt"

  "github.com/micro-so/micro-sdk-go"
  "github.com/micro-so/micro-sdk-go/option"
)

func main() {
  client := micro.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithTeamID("My Team ID"),
  )
  webhooks, err := client.Webhooks.List(context.TODO(), micro.WebhookListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", webhooks.Data)
}
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created_at": "2019-12-27T18:11:19.117Z",
      "enabled": true,
      "name": "name",
      "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "url": "https://example.com",
      "verified": true,
      "description": "description",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "verification_token": "verification_token",
      "verified_at": "2019-12-27T18:11:19.117Z"
    }
  ]
}
Returns Examples
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created_at": "2019-12-27T18:11:19.117Z",
      "enabled": true,
      "name": "name",
      "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "url": "https://example.com",
      "verified": true,
      "description": "description",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "verification_token": "verification_token",
      "verified_at": "2019-12-27T18:11:19.117Z"
    }
  ]
}