Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Using TypeScript? Check out our GraphQL SDK for a fully typed client.
Each time Plain attempts to deliver an event to a webhook target, the result is recorded as a delivery attempt. This is useful for debugging failing webhooks programmatically — for example to surface a recent failure rate in your own observability tooling. Each attempt records:
  • the event ID and event type that was delivered
  • when the attempt happened and how long it took
  • the result, which is one of: a successful HTTP response, a failed HTTP response (4xx/5xx), an error (network failure), a rejection, or a schema validation failure
You can filter attempts by event types or by result status.
Query
query getWebhookDeliveryAttempts(
  $webhookTargetId: ID!
  $filters: WebhookDeliveryAttemptFilter
  $first: Int = 50
  $after: String
) {
  webhookDeliveryAttempts(
    webhookTargetId: $webhookTargetId
    filters: $filters
    first: $first
    after: $after
  ) {
    edges {
      node {
        id
        publicEventId
        publicEventEventType
        attemptedAt {
          iso8601
        }
        durationInMilliseconds
        result {
          __typename
          ... on WebhookDeliveryAttemptSuccessfulResult {
            status
            httpStatusCode
          }
          ... on WebhookDeliveryAttemptFailedResult {
            status
            httpStatusCode
          }
          ... on WebhookDeliveryAttemptErrorResult {
            status
            errorCode
            errorMessage
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "webhookTargetId": "wt_01HXXXXXXXXXXXXXXXXXXXXXXX",
  "filters": {
    "resultStatus": "FAILED_RESPONSE"
  },
  "first": 50
}