Skip to content

Commit 872f676

Browse files
authored
Merge pull request #7023 from segmentio/add-batch-event-limit
update http api guide with batch limit
2 parents e4576c4 + 2de9dcd commit 872f676

File tree

1 file changed

+3
-2
lines changed
  • src/connections/sources/catalog/libraries/server/http-api

1 file changed

+3
-2
lines changed

src/connections/sources/catalog/libraries/server/http-api/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,9 @@ When sending a HTTP call from a user's device, you can collect the IP address by
462462

463463
Segment returns a `200` response for all API requests except errors caused by large payloads and JSON errors (which return `400` responses.) To debug events that return `200` responses but aren't accepted by Segment, use the Segment Debugger.
464464

465-
Common reasons events are not accepted by Segment include:
466-
- **Payload is too large:** The HTTP API can handle API requests that are 32KB or smaller. The batch API endpoint accepts a maximum of 500KB per request, with a limit of 32KB per event in the batch. If these limits are exceeded, Segment returns a 400 Bad Request error.
465+
Common reasons that events are not accepted by Segment:
466+
- **Payload is too large:** Most HTTP API routes can handle API requests that are 32KB or smaller. If this limit is exceeded, Segment returns a 400 Bad Request error.
467+
- **The `\batch` API endpoint:** This endpoint accepts a maximum of 500KB per batch API request. Each batch request can only have up to 2500 events, and each batched event needs to be less than 32KB. Segment returns a `200` response but rejects the event when the number of batched events exceeds the limit.
467468
- **Identifier is not present**: The HTTP API requires that each payload has a userId and/or anonymousId. If you send events without either the userId or anonymousId, Segment’s tracking API responds with an no_user_anon_id error. Check the event payload and client instrumentation for more details.
468469
- **Track event is missing name**: All Track events sent to Segment must have an `event` field.
469470
- **Deduplication**: Segment deduplicates events using the `messageId` field, which is automatically added to all payloads coming into Segment. If you're setting up the HTTP API yourself, ensure all events have unique messageId values with fewer than 100 characters.

0 commit comments

Comments
 (0)