Skip to content
Go to Micro

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).

ParametersExpand Collapse
webhookID string
formatuuid
deliveryID string
formatuuid
query WebhookDeliveryGetParams
TeamID param.Field[string]Optional
formatuuid
ReturnsExpand Collapse
type WebhookDeliveryDetail struct{…}

A delivery plus its full attempt timeline.

AttemptHistory []WebhookDeliveryDetailAttemptHistoryOptional
Attempt int64

1-based attempt number.

CreatedAt Time
formatdate-time
Status WebhookDeliveryDetailAttemptHistoryStatus
One of the following:
const WebhookDeliveryDetailAttemptHistoryStatusSuccess WebhookDeliveryDetailAttemptHistoryStatus = "success"
const WebhookDeliveryDetailAttemptHistoryStatusFailed WebhookDeliveryDetailAttemptHistoryStatus = "failed"
Error stringOptional

Failure reason, when status is failed.

RequestBody stringOptional

Body sent to the endpoint (delivery only); may be truncated.

ResponseBody stringOptional

Body returned by the endpoint; may be truncated.

StatusCode int64Optional

Get a delivery

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)
}
{
  "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
    }
  ]
}
Returns Examples
{
  "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
    }
  ]
}