# Webhooks ## List webhooks `client.Webhooks.List(ctx, query) (*WebhookListResponse, error)` **get** `/v2/webhooks/{teamId}` Lists the team's webhooks. Signing secrets are never included. ### Parameters - `query WebhookListParams` - `TeamID param.Field[string]` ### Returns - `type WebhookListResponse struct{…}` - `Data []Webhook` - `ID string` - `CreatedAt Time` - `Enabled bool` Disabled webhooks are skipped at delivery time. - `Name string` - `TeamID string` - `URL string` Endpoint events are delivered to. - `Verified bool` True once the endpoint has completed the verification handshake. - `Description string` - `UpdatedAt Time` - `VerificationToken string` 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 Time` ### Example ```go 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) } ``` #### Response ```json { "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" } ] } ``` ## Create a webhook `client.Webhooks.New(ctx, params) (*WebhookWithSecret, error)` **post** `/v2/webhooks/{teamId}` Registers a webhook and enqueues an asynchronous verification handshake (run by the dispatcher). The response includes the signing `secret`, shown only this once; `verified` is false until the handshake passes. ### Parameters - `params WebhookNewParams` - `TeamID param.Field[string]` Path param - `WebhookCreate param.Field[WebhookCreate]` Body param: On create, the dispatcher asynchronously runs a verification handshake: it sends a GET to `url` with `micro_hook_mode=subscribe`, a one-time `micro_hook_challenge`, and the webhook's `micro_hook_token`. The endpoint must respond 200 and echo the challenge value verbatim in the body; on success the webhook's `verified` flag flips to true. A failed handshake does not fail creation — re-run it later via the verify endpoint. ### Returns - `type WebhookWithSecret struct{…}` Returned ONLY on creation. Includes the signing secret (shown once) and the pending verification status. - `Secret string` HMAC signing secret (prefix `whsec_`). Store it now — it is never returned again. The dispatcher signs each delivered payload with it so your endpoint can verify authenticity. - `Verification WebhookWithSecretVerification` Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its `verified` flag flips to true on success) to observe the outcome. - `Status WebhookWithSecretVerificationStatus` Always `pending` at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet. - `const WebhookWithSecretVerificationStatusPending WebhookWithSecretVerificationStatus = "pending"` ### Example ```go 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"), ) webhookWithSecret, err := client.Webhooks.New(context.TODO(), micro.WebhookNewParams{ WebhookCreate: micro.WebhookCreateParam{ Name: micro.F("x"), URL: micro.F("https://example.com"), }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", webhookWithSecret) } ``` #### Response ```json { "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", "secret": "secret", "verification": { "status": "pending" } } ``` ## Get a webhook `client.Webhooks.Get(ctx, webhookID, query) (*Webhook, error)` **get** `/v2/webhooks/{teamId}/{webhookId}` Get a webhook ### Parameters - `webhookID string` - `query WebhookGetParams` - `TeamID param.Field[string]` ### Returns - `type Webhook struct{…}` A registered webhook endpoint. - `ID string` - `CreatedAt Time` - `Enabled bool` Disabled webhooks are skipped at delivery time. - `Name string` - `TeamID string` - `URL string` Endpoint events are delivered to. - `Verified bool` True once the endpoint has completed the verification handshake. - `Description string` - `UpdatedAt Time` - `VerificationToken string` 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 Time` ### Example ```go 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"), ) webhook, err := client.Webhooks.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.WebhookGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", webhook.ID) } ``` #### Response ```json { "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" } ``` ## Update a webhook `client.Webhooks.Update(ctx, webhookID, params) (*WebhookUpdateResponse, error)` **patch** `/v2/webhooks/{teamId}/{webhookId}` Updates mutable fields. Changing `url` resets verification and re-runs the handshake. ### Parameters - `webhookID string` - `params WebhookUpdateParams` - `TeamID param.Field[string]` Path param - `WebhookUpdate param.Field[WebhookUpdate]` Body param: Partial update. Changing `url` resets verification and re-runs the handshake. ### Returns - `type WebhookUpdateResponse struct{…}` A webhook plus the status of a verification handshake enqueued by this request. - `Verification WebhookUpdateResponseVerification` Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its `verified` flag flips to true on success) to observe the outcome. - `Status WebhookUpdateResponseVerificationStatus` Always `pending` at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet. - `const WebhookUpdateResponseVerificationStatusPending WebhookUpdateResponseVerificationStatus = "pending"` ### Example ```go 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"), ) webhook, err := client.Webhooks.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.WebhookUpdateParams{ WebhookUpdate: micro.WebhookUpdateParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", webhook) } ``` #### Response ```json { "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", "verification": { "status": "pending" } } ``` ## Delete a webhook `client.Webhooks.Delete(ctx, webhookID, body) error` **delete** `/v2/webhooks/{teamId}/{webhookId}` Delete a webhook ### Parameters - `webhookID string` - `body WebhookDeleteParams` - `TeamID param.Field[string]` ### Example ```go package main import ( "context" "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"), ) err := client.Webhooks.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.WebhookDeleteParams{ }, ) if err != nil { panic(err.Error()) } } ``` ## Re-run verification `client.Webhooks.Verify(ctx, webhookID, body) (*WebhookVerifyResponse, error)` **post** `/v2/webhooks/{teamId}/{webhookId}/verify` Re-runs the GET challenge/echo handshake against the webhook's url and updates its verified state. ### Parameters - `webhookID string` - `body WebhookVerifyParams` - `TeamID param.Field[string]` ### Returns - `type WebhookVerifyResponse struct{…}` A webhook plus the status of a verification handshake enqueued by this request. - `Verification WebhookVerifyResponseVerification` Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its `verified` flag flips to true on success) to observe the outcome. - `Status WebhookVerifyResponseVerificationStatus` Always `pending` at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet. - `const WebhookVerifyResponseVerificationStatusPending WebhookVerifyResponseVerificationStatus = "pending"` ### Example ```go 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"), ) response, err := client.Webhooks.Verify( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.WebhookVerifyParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "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", "verification": { "status": "pending" } } ``` ## Send a test event `client.Webhooks.Ping(ctx, webhookID, params) (*WebhookPingResponse, error)` **post** `/v2/webhooks/{teamId}/{webhookId}/ping` Fire-and-forget test delivery through the async dispatcher. The webhook must be enabled and verified. ### Parameters - `webhookID string` - `params WebhookPingParams` - `TeamID param.Field[string]` Path param - `Data param.Field[map[string, unknown]]` Body param: Arbitrary JSON payload body. - `Event param.Field[string]` Body param: Event name to send. ### Returns - `type WebhookPingResponse struct{…}` - `Dispatched bool` - `Event string` - `WebhookID string` ### Example ```go 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"), ) response, err := client.Webhooks.Ping( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.WebhookPingParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.WebhookID) } ``` #### Response ```json { "dispatched": true, "event": "event", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ``` ## List team deliveries `client.Webhooks.ListDeliveries(ctx, params) (*WebhookListDeliveriesResponse, error)` **get** `/v2/webhooks/{teamId}/deliveries` Account-wide delivery feed across all of the team's webhooks, newest first. ### Parameters - `params WebhookListDeliveriesParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. - `Limit param.Field[int64]` Query param: Page size (1–100, default 25). - `Status param.Field[WebhookListDeliveriesParamsStatus]` Query param: Filter by outcome. - `const WebhookListDeliveriesParamsStatusSuccess WebhookListDeliveriesParamsStatus = "success"` - `const WebhookListDeliveriesParamsStatusFailed WebhookListDeliveriesParamsStatus = "failed"` - `Type param.Field[WebhookListDeliveriesParamsType]` Query param: Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to include verification handshakes. - `const WebhookListDeliveriesParamsTypeDelivery WebhookListDeliveriesParamsType = "delivery"` - `const WebhookListDeliveriesParamsTypeVerification WebhookListDeliveriesParamsType = "verification"` - `const WebhookListDeliveriesParamsTypeAll WebhookListDeliveriesParamsType = "all"` ### Returns - `type WebhookListDeliveriesResponse struct{…}` - `Data []WebhookDelivery` - `CreatedAt Time` - `DeliveryID string` - `Status WebhookDeliveryStatus` - `const WebhookDeliveryStatusSuccess WebhookDeliveryStatus = "success"` - `const WebhookDeliveryStatusFailed WebhookDeliveryStatus = "failed"` - `Type WebhookDeliveryType` - `const WebhookDeliveryTypeDelivery WebhookDeliveryType = "delivery"` - `const WebhookDeliveryTypeVerification WebhookDeliveryType = "verification"` - `WebhookID string` - `Attempts int64` Number of attempts made so far (including async retries). - `Event string` Event name (e.g. `webhook.test`); `verification` for handshake runs. - `StatusCode int64` HTTP status of the latest attempt; null on a transport error. - `TeamID string` - `UpdatedAt Time` - `URL string` - `NextCursor string` Pass as `cursor` to fetch the next page; null when there are no more. ### Example ```go 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"), ) response, err := client.Webhooks.ListDeliveries(context.TODO(), micro.WebhookListDeliveriesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "created_at": "2019-12-27T18:11:19.117Z", "delivery_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "success", "type": "delivery", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "attempts": 0, "event": "event", "status_code": 0, "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "url": "url" } ], "next_cursor": "next_cursor" } ``` ## Domain Types ### Webhook - `type Webhook struct{…}` A registered webhook endpoint. - `ID string` - `CreatedAt Time` - `Enabled bool` Disabled webhooks are skipped at delivery time. - `Name string` - `TeamID string` - `URL string` Endpoint events are delivered to. - `Verified bool` True once the endpoint has completed the verification handshake. - `Description string` - `UpdatedAt Time` - `VerificationToken string` 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 Time` ### Webhook Create - `type WebhookCreate struct{…}` On create, the dispatcher asynchronously runs a verification handshake: it sends a GET to `url` with `micro_hook_mode=subscribe`, a one-time `micro_hook_challenge`, and the webhook's `micro_hook_token`. The endpoint must respond 200 and echo the challenge value verbatim in the body; on success the webhook's `verified` flag flips to true. A failed handshake does not fail creation — re-run it later via the verify endpoint. - `Name string` - `URL string` HTTP(S) endpoint. Rejected if it resolves to a private/internal address. - `Description string` - `Enabled bool` ### Webhook Delivery - `type WebhookDelivery struct{…}` A webhook delivery — one logical event delivery to an endpoint, grouping its attempts. Status and status_code reflect the latest attempt. - `CreatedAt Time` - `DeliveryID string` - `Status WebhookDeliveryStatus` - `const WebhookDeliveryStatusSuccess WebhookDeliveryStatus = "success"` - `const WebhookDeliveryStatusFailed WebhookDeliveryStatus = "failed"` - `Type WebhookDeliveryType` - `const WebhookDeliveryTypeDelivery WebhookDeliveryType = "delivery"` - `const WebhookDeliveryTypeVerification WebhookDeliveryType = "verification"` - `WebhookID string` - `Attempts int64` Number of attempts made so far (including async retries). - `Event string` Event name (e.g. `webhook.test`); `verification` for handshake runs. - `StatusCode int64` HTTP status of the latest attempt; null on a transport error. - `TeamID string` - `UpdatedAt Time` - `URL string` ### Webhook Delivery Detail - `type WebhookDeliveryDetail struct{…}` A delivery plus its full attempt timeline. - `AttemptHistory []WebhookDeliveryDetailAttemptHistory` - `Attempt int64` 1-based attempt number. - `CreatedAt Time` - `Status WebhookDeliveryDetailAttemptHistoryStatus` - `const WebhookDeliveryDetailAttemptHistoryStatusSuccess WebhookDeliveryDetailAttemptHistoryStatus = "success"` - `const WebhookDeliveryDetailAttemptHistoryStatusFailed WebhookDeliveryDetailAttemptHistoryStatus = "failed"` - `Error string` Failure reason, when status is failed. - `RequestBody string` Body sent to the endpoint (delivery only); may be truncated. - `ResponseBody string` Body returned by the endpoint; may be truncated. - `StatusCode int64` ### Webhook Update - `type WebhookUpdate struct{…}` Partial update. Changing `url` resets verification and re-runs the handshake. - `Description string` - `Enabled bool` - `Name string` - `URL string` ### Webhook With Secret - `type WebhookWithSecret struct{…}` Returned ONLY on creation. Includes the signing secret (shown once) and the pending verification status. - `Secret string` HMAC signing secret (prefix `whsec_`). Store it now — it is never returned again. The dispatcher signs each delivered payload with it so your endpoint can verify authenticity. - `Verification WebhookWithSecretVerification` Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its `verified` flag flips to true on success) to observe the outcome. - `Status WebhookWithSecretVerificationStatus` Always `pending` at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet. - `const WebhookWithSecretVerificationStatusPending WebhookWithSecretVerificationStatus = "pending"` # Deliveries ## List webhook deliveries `client.Webhooks.Deliveries.List(ctx, webhookID, params) (*WebhookDeliveryListResponse, error)` **get** `/v2/webhooks/{teamId}/{webhookId}/deliveries` An endpoint's deliveries, newest first, with optional status / type / time-range filters and cursor pagination. ### Parameters - `webhookID string` - `params WebhookDeliveryListParams` - `TeamID param.Field[string]` Path param - `After param.Field[Time]` Query param: Only deliveries at or after this ISO-8601 timestamp. - `Before param.Field[Time]` Query param: Only deliveries at or before this ISO-8601 timestamp. - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. - `Limit param.Field[int64]` Query param: Page size (1–100, default 25). - `Status param.Field[WebhookDeliveryListParamsStatus]` Query param: Filter by outcome. - `const WebhookDeliveryListParamsStatusSuccess WebhookDeliveryListParamsStatus = "success"` - `const WebhookDeliveryListParamsStatusFailed WebhookDeliveryListParamsStatus = "failed"` - `Type param.Field[WebhookDeliveryListParamsType]` Query param: Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to include verification handshakes. - `const WebhookDeliveryListParamsTypeDelivery WebhookDeliveryListParamsType = "delivery"` - `const WebhookDeliveryListParamsTypeVerification WebhookDeliveryListParamsType = "verification"` - `const WebhookDeliveryListParamsTypeAll WebhookDeliveryListParamsType = "all"` ### Returns - `type WebhookDeliveryListResponse struct{…}` - `Data []WebhookDelivery` - `CreatedAt Time` - `DeliveryID string` - `Status WebhookDeliveryStatus` - `const WebhookDeliveryStatusSuccess WebhookDeliveryStatus = "success"` - `const WebhookDeliveryStatusFailed WebhookDeliveryStatus = "failed"` - `Type WebhookDeliveryType` - `const WebhookDeliveryTypeDelivery WebhookDeliveryType = "delivery"` - `const WebhookDeliveryTypeVerification WebhookDeliveryType = "verification"` - `WebhookID string` - `Attempts int64` Number of attempts made so far (including async retries). - `Event string` Event name (e.g. `webhook.test`); `verification` for handshake runs. - `StatusCode int64` HTTP status of the latest attempt; null on a transport error. - `TeamID string` - `UpdatedAt Time` - `URL string` - `NextCursor string` Pass as `cursor` to fetch the next page; null when there are no more. ### Example ```go 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"), ) deliveries, err := client.Webhooks.Deliveries.List( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.WebhookDeliveryListParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deliveries.Data) } ``` #### Response ```json { "data": [ { "created_at": "2019-12-27T18:11:19.117Z", "delivery_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "success", "type": "delivery", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "attempts": 0, "event": "event", "status_code": 0, "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "url": "url" } ], "next_cursor": "next_cursor" } ``` ## Get a delivery `client.Webhooks.Deliveries.Get(ctx, webhookID, deliveryID, query) (*WebhookDeliveryDetail, error)` **get** `/v2/webhooks/{teamId}/{webhookId}/deliveries/{deliveryId}` A single delivery plus its full attempt timeline (including async retries). ### Parameters - `webhookID string` - `deliveryID string` - `query WebhookDeliveryGetParams` - `TeamID param.Field[string]` ### Returns - `type WebhookDeliveryDetail struct{…}` A delivery plus its full attempt timeline. - `AttemptHistory []WebhookDeliveryDetailAttemptHistory` - `Attempt int64` 1-based attempt number. - `CreatedAt Time` - `Status WebhookDeliveryDetailAttemptHistoryStatus` - `const WebhookDeliveryDetailAttemptHistoryStatusSuccess WebhookDeliveryDetailAttemptHistoryStatus = "success"` - `const WebhookDeliveryDetailAttemptHistoryStatusFailed WebhookDeliveryDetailAttemptHistoryStatus = "failed"` - `Error string` Failure reason, when status is failed. - `RequestBody string` Body sent to the endpoint (delivery only); may be truncated. - `ResponseBody string` Body returned by the endpoint; may be truncated. - `StatusCode int64` ### Example ```go 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"), ) webhookDeliveryDetail, err := client.Webhooks.Deliveries.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.WebhookDeliveryGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", webhookDeliveryDetail) } ``` #### Response ```json { "created_at": "2019-12-27T18:11:19.117Z", "delivery_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "success", "type": "delivery", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "attempts": 0, "event": "event", "status_code": 0, "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "url": "url", "attempt_history": [ { "attempt": 0, "created_at": "2019-12-27T18:11:19.117Z", "status": "success", "error": "error", "request_body": "request_body", "response_body": "response_body", "status_code": 0 } ] } ```