LogoLogo
No-code docsResources
  • 🖥️Welcome to the Bird API Docs
  • API Access
    • Access Policies
    • Access Roles
    • API Authorization
    • Common API usage
  • Conversations API
    • API reference
      • Channel configuration
        • Get conversations configuration
        • Update conversations configuration
      • Conversations messaging
        • Create conversation message
        • List conversation messages
        • Get conversation message
        • Update conversation message
        • Delete conversation message
        • Create pre-signed upload
      • Conversations management
        • Create conversation
        • List conversations
        • Get conversation
        • Update conversation
        • Delete conversation
      • Conversation Participants
        • Add participant to conversation
        • List participants
        • Get participant by ID
        • Get participant by identifier key and value
        • Update participant by ID
        • Update participant by identifier key and value
        • Delete participant
        • List participant conversations by ID
        • List participant conversations by identifier key and value
      • Workspace settings
        • Get antispam setting
        • Update antispam setting
        • Create allow/block rule
        • Get allow/block rule
        • List allow/block rules
        • Update allow/block rule
        • Delete allow/block rule
        • Add allow/block rules in bulk
        • Get allow/block bulk upload status
      • Events
  • Collaborations API
    • API reference
      • Agent Management
      • Team Management
      • Feeds
      • Feed item activity
      • Tags
      • Automation Rules
      • Business Hours
      • Capacity Rules
      • Routing Queues
      • Skills
      • SLA Policies
      • Macros
      • Sender Profiles
      • Ticket fields
  • Channels API
    • Supported channels
      • Programmable WhatsApp
        • Sending WhatsApp messages
        • Customer service window
        • Receiving messages
        • Message interactions
        • WhatsApp ISV integration
          • Setting up your customer workspaces
            • API Access
            • Associating your Facebook solution ID and business ID with your Bird CRM Organization
            • Creating a workspace for your customer
            • Buying a number through Bird
            • Subscribing to channel created webhooks
          • WhatsApp channel onboarding
            • Setting up the WhatsApp Embedded flow
            • Install WhatsApp phone number in Bird CRM
            • Subscribe to channel webhooks
      • Programmable SMS
        • Installing an SMS channel
          • US 10DLC API Installation
          • Toll-Free Numbers Verification API
        • Sending SMS messages
        • Receiving messages
        • Twilio Exit API
          • Using Twilio PHP SDK
          • Using Twilio Go SDK
          • Using Twilio Ruby SDK
        • Sinch Exit API
      • Programmable RCS
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Email
        • Sending Emails
        • Receiving messages
        • Message status
        • Message interactions
      • Programmable Line
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Telegram
        • Sending messages
        • Receiving messages
        • Message interactions
    • Message types
      • Text
      • Images
      • Files
      • List
      • Carousel
      • Template
    • Message status and interactions
      • Message Failure Codes
      • Message Failure Sources
        • SMS Platform Extended Error Codes
    • Send batch messages
    • API reference
      • Channel Groups
      • Messaging
      • Channels management
      • Channel connectors
      • Navigators
      • Compliance Keywords Messages
      • Conversions Sharing
      • Events
    • Rate Limit
  • Voice API
    • Installing a Voice channel
    • Voice Calls API
      • Initiate an outbound call
      • List calls from a channel
      • Get a call
      • Update a call
      • Answer a call
      • Ring a call
      • Hangup a call
      • Play a message in a call
      • Say Text-To-Speech (TTS)
      • Gather DTMF from a call
      • Forward a call
      • Record a Call
      • Record a call session
      • Update a call recording
      • List call recordings of a call
      • Get a call recording
      • Get a call insights
      • Get calls log
    • Recordings API
      • List Recordings
      • Get a Recording
      • Delete a Recording
      • List recording storage metrics
    • Transcriptions API
      • Initiate a Transcription
      • List Transcriptions
      • Get a Transcription
      • Delete a Transcription
    • Voice webhooks
    • Flash Calling API
  • Verify API
    • Verify API: Quick Start
  • Contacts API
    • Tracking Contact Events
      • API Reference
        • Get configuration
        • Track events
    • API reference
      • Manage workspace contacts
        • Create a contact
        • Get a contact
        • List contacts
        • Search contact by identifier
        • Update a contact
        • Create or update a contact by identifier
        • Delete a contact
      • Manage contact identifiers
        • Create contact identifier
        • List contact identifiers
        • Delete contact identifier
      • Manage contact attribute definition
        • Create attribute definition
        • Get attribute definition
        • List attribute definitions
      • Manage contact lists
        • Create a list
        • Get a list
        • List lists
        • Update a list
        • Delete a list
        • Add contacts to a list
        • Get contact list memberships
        • List contacts in a list
        • Remove contacts from a list
      • Lookup
        • Network/Country information for a phone number
  • Numbers API
    • API reference
      • Search Available Numbers
      • Buy a Number
      • List your Numbers
      • Get Long Code Number Details
      • Manage Endpoint Subscriptions
        • Cancel Number Subscription
      • Manage Endpoint Compliance Requirements
        • List Workspace compliace Requirements
        • Get Workspace Compliace Requirements
        • Update Workspace Compliace Requirements
      • 10DLC Compliance
        • Brands - Organization
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
        • Brands - workspace
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
          • List brand vettings
        • Campaigns
          • Optional: acting as Reseller
          • Create a campaign
          • List all campaigns
          • Get a campaign
          • Update a campaign
          • Delete a campaign
        • TCR Enums
        • Events
      • Toll-Free Numbers Verification API
      • Long Code Numbers
      • Short Code Numbers
      • Alphanumeric Senders
      • Events
  • Know-Your-Customer (KYC) API
    • List KYC forms
    • Get KYC form
    • Create KYC form entry
    • Update KYC form entry
    • List KYC form entries
    • Get a KYC form entry details
  • Reporting API
    • API reference
      • Channel Metrics
      • Flow Run Metrics
      • Wallet Metrics
      • Campaign Metrics
      • Message Metrics
  • Accounts API
    • API reference
      • Current user
        • Change password
        • Presigned upload
        • Memberships
        • Sessions
        • Configurations
          • Groups
            • Keys
      • IAM policies
      • Organizations
        • Upload media
        • Profile
        • Workspaces
        • Users
        • Access keys
        • Organization roles
        • Organization policies
        • Teams
          • Members
        • Approvals
          • Runs
            • Reviews
        • Configurations
          • Groups
            • Keys
      • Region groups
  • Touchpoints API
    • Supported Projects
      • Whatsapp Approved Message Templates
        • Creating WhatsApp Message templates
          • Text template blocks
          • Blocks Documentation
    • API reference
      • Projects
      • Message Templates
  • Notifications API
    • API Reference
      • Webhook subscriptions
        • Create a webhook subscription
        • List available webhook events
        • Get a webhook subscription
        • List webhook subscriptions
        • Update a webhook subscription
        • Delete a webhook subscription
        • Verifying a webhook subscription
        • Webhook subscription logs
  • Knowledge Base (KB) API
    • API reference
      • Documents
      • Folders
        • Import
      • Search
      • Presigned upload
  • Email API
    • Transmissions
    • Metrics
    • Events
    • SMTP API
  • Connectivity platform migration guide
    • Channels API and Conversations API
    • Migrating conversations API actions
    • Migrating WhatsApp channels
  • Client SDKs
    • Applications
    • Contact Profiles
      • Signed Identity
    • Push notifications
      • Quick Start
      • Subscribe contacts to push notification campaigns
      • Notification Display Priority
    • Event Tracking
      • Quick Start
      • Track Events
        • App
        • Audiences
        • Conference
        • Ecommerce
        • Hospitality
        • Lists
        • Messaging
        • Payments
        • Subscription
        • Suppressions
        • Survey
        • Web
    • App Inbox
      • Quick Start
      • Usage
      • Subscribe contacts to app inbox campaigns
    • SDK Integration
      • Android SDK
        • Notification Interactions
      • Swift SDK
        • Notification Interactions
      • Web SDK
        • Quick Start
        • Usage
        • API Reference
          • IdentityManager
          • BirdSdkApi
          • BirdTracker
            • Ecommerce
            • Conference
            • Messaging
            • Suppressions
            • Subscription
            • Survey
            • Web
            • Audiences
        • Web Push Notifications
          • Notification Interactions
  • Quickstarts
    • Conversations
    • Send an SMS message
    • Send an Email message
    • Send a WhatsApp message
Powered by GitBook
On this page

Was this helpful?

  1. Email API

Events

The Events API allows searching for recent events, and supports various types of result filtering. Available events include message status (injection, delivery, bounce) as well as recipient engagement (clicks and opens). You can fetch all event types or only specific ones, such as bounces, deliveries, or clicks. You can also filter by date range, campaign, or just about any other field.

Note: The maximum URI length is 4096 characters, so please keep your queries below that size when adding filters.

Data Retention

  • Events data is retained for 10 days

  • Aggregate reporting data is available through metrics or the app for up to 6 months

Event Types

The following types of events can be queried from the Events API:

  • Message Status Events:

    • injection: Message was accepted for delivery

    • delivery: Message was successfully delivered

    • delay: Message delivery was delayed

    • bounce: Message delivery failed

    • spam_complaint: Recipient marked message as spam

    • out_of_band: Message bounced after initial acceptance

    • policy_rejection: Message was rejected by policy

    • generation_failure: Message generation failed

    • generation_rejection: Message was rejected during generation

  • Recipient Engagement Events:

    • open: Message was opened

    • initial_open: First time message was opened

    • click: Link in message was clicked

    • initial_click: First time a link was clicked

    • amp_click: Link in AMP version was clicked

    • amp_open: AMP version was opened

Keyword Searching

Some filter parameters support keyword searching, allowing filtering without precise values and multiple values without listing each one. Keywords are determined by natural breaks in phrases by spaces, dashes, underscores, and in special cases periods. The following filters support keyword searching:

  • ab_tests

  • campaigns

  • ip_pools

  • reasons

  • recipient_domains

  • sending_domains

  • subjects

  • templates

  • mailbox_providers

  • mailbox_provider_regions

Pagination

The Events API supports pagination for queries with larger result sets. Pagination is done through the use of the cursor and per_page query parameters. The per_page query parameter tells the Events API the number of events to return in a single request, and supports a maximum value of 10,000.

To start a paging request, add the query parameter ?cursor=initial to your Events API request. This will fetch the first page of results. If cursor is not provided, then the default value of initial is applied. In the response body, there are three main keys: results, total_count and links. results is an array which contains the page of JSON events that matched the request,total_count is an integer that describes the total number of JSON events that matched your request, and links is an object which provides a way to request the next page of events, if there is more than one page.

Once you have the response, you then can use links to retrieve the URL for your next page, which will be prefilled with the appropriate value for the cursor query parameter, as well as any other filters you supplied with the original request.

In the following examples, to retrieve the first page, we use the initial value for the cursor query parameter. Then use the cursor value from the next key in the links object to make the request for the second page. This process would then be repeated until all results have been paged through, at which point the links object will not have a next key, and no further additional requests are necessary.

If your result set is less than one page of data, then the links object will not have a next key.

Note: Pagination requests count towards the number of requests allowed by rate limiting, the same as non-paginated requests.

Was this helpful?

Search Message Events

get

Returns message events matching the filtered search. Data retention: 10 days for events, 6 months for aggregate reporting.

Note: Maximum URI length is 4096 characters.

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

Query parameters
fromstring · date-timeOptional

Start datetime (YYYY-MM-DDTHH:MM:ssZ), inclusive. Value should be in UTC. Default is 24 hours ago.

tostring · date-timeOptional

End datetime (YYYY-MM-DDTHH:MM:ssZ), exclusive. Value should be in UTC. Default is 1 minute ago.

cursorstringOptional

Results cursor for pagination. Used in conjunction with the per_page parameter. See the Pagination section for more information.

Default: initial
per_pageinteger · min: 1 · max: 10000Optional

Results per page

Default: 1000
delimiterstringOptional

Specifies the delimiter for query parameter lists

Default: ,
event_idsstringOptional

Comma delimited list of event IDs to search

eventsstringOptional

Comma delimited list of event types to search

Default: all event types
recipientsstringOptional

Comma delimited list of recipients to search

recipient_domainsstringOptional

Comma delimited list of recipient domains to search. Supports keyword searching by domain segment

from_addressesstringOptional

Comma delimited list of friendly from addresses to search

sending_domainsstringOptional

Comma delimited list of sending domains to search. Supports keyword searching by domain segment

subjectsstringOptional

Comma delimited list of subject lines from the email header to search. Supports keyword searching

bounce_classesstringOptional

Comma delimited list of bounce classification codes to search. See the Bounce Classification Codes documentation for more information.

reasonsstringOptional

Comma delimited list of bounce/failure/rejection reasons to search. Supports keyword searching

campaignsstringOptional

Comma delimited list of campaign IDs to search. Supports keyword searching

templatesstringOptional

Comma delimited list of template IDs to search. Supports keyword searching

sending_ipsstringOptional

Comma delimited list of sending IP addresses to search

ip_poolsstringOptional

Comma delimited list of IP pool IDs to search. Supports keyword searching

subaccountsstringOptional

Comma delimited list of subaccount IDs to search

messagesstringOptional

Comma delimited list of message IDs to search

transmissionsstringOptional

Comma delimited list of transmission IDs to search

mailbox_providersstringOptional

Comma delimited list of mailbox providers to search. Supports keyword searching

mailbox_provider_regionsstringOptional

Comma delimited list of mailbox provider regions to search. Supports keyword searching

ab_testsstringOptional

Comma delimited list of A/B test IDs to search. Supports keyword searching

ab_test_versionsstringOptional

Comma delimited list of version numbers of A/B tests to search. If provided, ab_tests parameter becomes required

Responses
200
Successfully retrieved events
application/json
400
Request validation error
application/json
get
GET /api/workspaces/{workspaceId}/reach/events/message HTTP/1.1
Host: email.eu-west-1.api.bird.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "results": [
    {
      "type": "click",
      "campaign_id": "Example Campaign Name",
      "customer_id": "1",
      "delv_method": "esmtp",
      "event_id": "92356927693813856",
      "friendly_from": "sender@example.com",
      "geo_ip": {
        "country": "US",
        "region": "MD",
        "city": "Columbia",
        "latitude": "39.1749",
        "longitude": "-76.8375"
      },
      "injection_time": "2016-04-18T14:25:07.000+00:00",
      "ip_address": "127.0.0.1",
      "ip_pool": "Example-Ip-Pool",
      "message_id": "000443ee14578172be22",
      "msg_from": "sender@example.com",
      "msg_size": "1337",
      "num_retries": "2",
      "queue_time": "12",
      "rcpt_meta": {
        "customKey": "customValue",
        "anotherKey": [
          "value1",
          "value2",
          "value3"
        ]
      },
      "rcpt_tags": [
        "male",
        "US"
      ],
      "rcpt_to": "recipient@example.com",
      "raw_rcpt_to": "recipient@example.com",
      "rcpt_type": "cc",
      "recipient_domain": "example.com",
      "routing_domain": "example.com",
      "sending_domain": "example.com",
      "sending_ip": "127.0.0.1",
      "subaccount_id": "101",
      "subject": "Summer deals are here!",
      "target_link_name": "Example Link Name",
      "target_link_url": "http://example.com",
      "template_id": "my-template",
      "template_version": "1",
      "timestamp": "2016-04-18T14:25:07.000+00:00",
      "transmission_id": "65832150921904138",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36",
      "mailbox_provider": "Gmail",
      "mailbox_provider_region": "Europe"
    }
  ],
  "total_count": 1,
  "links": {}
}
  • Data Retention
  • Event Types
  • Keyword Searching
  • Pagination
  • GETSearch Message Events