Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Error when querying email events with eventType parameter

Open
#413 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start with the api_client.api_request call for GET /email/public/v1/events and compare its query-string handling with the working curl request in the issue. Trace how eventType is encoded, then verify that SENT and DELIVERED are accepted by the HubSpot email events endpoint without changing the documented API parameter.

Written by the indexing model from the issue text.

Description

Issue Description

When using the HubSpot API client to query email events, I encountered an error with the eventType parameter format. The API rejects the comma-separated list within curly braces:

response = api_client.api_request({
    "method": "GET",
    "path": "/email/public/v1/events",
    "qs": {
        "eventType": "{SENT,DELIVERED}",
    }
})
print(response.content.decode('utf-8'))

This results in the following error:

{"status":"error","message":"Invalid input JSON on line -1, column -1: Cannot deserialize value of type `com.hubspot.email.events.EventType` from String \"{SENT,DELIVERED}\": not one of the values accepted for Enum class: [DROPPED, UNBOUNCE, STATUSCHANGE, DELIVERED, FORWARD, BOUNCE, REPLY, PRINT, PROCESSED, UNSUBSCRIBED, SUPPRESSED, CLICK_ON_IDENTIFIED_LINK, SENT, SELECTED, SPAMREPORT, OPT_IN_CHANGE, DEFERRED, ERROR, OPEN, MTA_DROPPED, CLICK]","correlationId":"3196b1fe-b2fb-4498-b8f5-afa46570a809"}

Additional Information

https://developers.hubspot.com/docs/reference/api/analytics-and-events/email-analytics#get-email-events

I verified that the API endpoint itself works correctly with the following curl command, which successfully returns results:

curl --request GET --url 'https://api.hubapi.com/email/public/v1/events?eventType={SENT,DELIVERED}'
Dominant language
Python
Stars
434
Forks
126
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HubSpot/hubspot-api-python

All issues in HubSpot/hubspot-api-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.