Skip to main content

Resolving the "event submission rejected with_reason: ProjectId" 403 error

Issue

My events fail to reach Sentry, and the network response returns a 403 with {"detail":"event submission rejected with_reason: ProjectId"}. This often happens when using the envelope endpoint. I want to know what causes this and how to fix it.

Applies To

  • All SaaS Customers and Self-Hosted Users

  • Event Ingestion

  • Customers using the envelope endpoint

Symptoms

  • Events fail to submit, with one or more of these in the network response:

    • Request failed, API returned 403

    • {"detail":"event submission rejected with_reason: ProjectId"}

    • The transport failed to send the envelope with response code 403

Resolution

This 403 means Sentry could not match your request to a valid project at the ingest endpoint you used. Work through the causes below, most common first.

  1. Send to the correct regional ingest endpoint. This is the most common cause. If your organization is hosted outside the US (for example, in the EU), you must send events to your region's ingest domain, not the default US one. Routing the request to the region where your project actually exists resolves the 403. An EU ingest URL looks like this:

    https://o123456789.ingest.de.sentry.io/api/1234567/envelope/

    In this format:

    • o123456789.ingest.de.sentry.io is your EU ingest domain.

    • 1234567 is your project ID.

    The DSN in Project Settings > SDK Setup > Client Keys (DSN) already contains the correct regional host, so use it exactly as shown rather than building the endpoint by hand.

  2. Verify your DSN. Confirm the DSN matches an existing project and is not malformed. If you build the DSN dynamically from variables, hardcode the exact DSN string from Client Keys (DSN) to rule out a bad value.

  3. If the project is new, wait for provisioning. A newly created project can take a short time to finish setting up on the backend. If the DSN and endpoint are correct, the 403 clears once provisioning completes.

Did this answer your question?