Connections Batch API

The Batch API from Connections — 1 operation(s) for batch.

GitHub OpenAPI

Operations 1

POST /v1/batch Segment batch: many calls in one request #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/connections-icu:connections-icu-batch-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

connections-icu-batch-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Connections Icu Batch API
  version: 1.0.0
  description: 'Operations tagged Batch across 2 of this provider''s published API definitions: connections-icu-analytics-openapi-original.json, connections-icu-analytics-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://analytics.connectionsapi.com
tags:
- name: Batch
paths:
  /v1/batch:
    post:
      summary: 'Segment batch: many calls in one request'
      description: 'A sender built for Segment''s HTTP Tracking API sends here by changing only its host: the same write key (the site''s ak_ ingest key, in the body or as the Basic-auth user name), the same JSON, gzip allowed (`Content-Encoding: gzip`). Every message goes through the ordinary ingest path: messageId is the eid, so a retry counts once; the bot rule, the owner''s exclusions, the event catalog and metering all apply. EVIDENCE: Segment''s spec carries none, and ARGUS stores nothing optional without it. A message is read, in order, for `context.tracking` (ARGUS''s own evidence), then `context.consent.categoryPreferences` (only `analytics` is read). With neither, a call from the visitor''s own device gets `implied`, the default our own pixel applies, re-checked against the connection''s location and refused where consent is required. A call relayed by a server gets nothing, so it stores nothing optional until it sends one of the two. A server reporting its own events sends `context.tracking` with source `service`. DEVICE: read from the request, never the body: a browser''s Origin, Referer or Sec-Fetch-Site header; a Segment app library''s own User-Agent (analytics-kotlin/, analytics-android/, analytics-ios/ for Swift and iOS, analytics-flutter/); or React Native''s library name beside the phone''s okhttp or CFNetwork agent. A server replaying a device''s messages is a relay. ADDRESS: `context.ip` is never stored. A device''s call keeps the connection''s address as /ingest does; a relayed call stores no address and no location, because the connection''s are the server''s.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - batch
              properties:
                writeKey:
                  type: string
                  description: The site's ingest key (ak_...). Or send it as the Basic-auth user name.
                batch:
                  type: array
                  description: Up to 2500 messages, each a track, page, screen, identify, group or alias with its own `type`; past that the rest are dropped and counted in rejected.
                  items:
                    type: object
                    required:
                    - type
                    properties:
                      type:
                        type: string
                        enum:
                        - track
                        - page
                        - screen
                        - identify
                        - group
                        - alias
                      messageId:
                        type: string
                        description: 'The dedup key: stored as the event''s eid, so a retried message counts once.'
                      userId:
                        type:
                        - string
                        - number
                        description: Your user's id, stored as the event's sub.
                      anonymousId:
                        type: string
                        description: The visitor id. A message needs this or userId.
                      timestamp:
                        type: string
                        format: date-time
                        description: When it happened, corrected by `sentAt` for the device's clock as Segment corrects it.
                      originalTimestamp:
                        type: string
                        format: date-time
                      sentAt:
                        type: string
                        format: date-time
                      context:
                        type: object
                        description: Segment's `context`. In a batch, the batch's own `context` is merged under each message's.
                        properties:
                          tracking:
                            type: object
                            description: 'ARGUS''s collection evidence, read first and under every /ingest rule. Segment''s spec has no such field, and nothing optional is stored without evidence: see the batch operation''s description for what a message without it gets.'
                            required:
                            - version
                            - source
                            - purposes
                            properties:
                              version:
                                type: integer
                                const: 1
                              source:
                                type: string
                                enum:
                                - connections_consent
                                - consent_mode
                                - service
                                - implied
                                - cookieless
                                description: 'connections_consent or consent_mode: a decision the visitor made, carried in `purposes`. service: a server-side sender, honoured only on a request with no Origin, Referer or Sec-Fetch-Site header. implied: the default grant where nobody has to be asked, re-checked against the request''s location and refused where consent is required. cookieless: nothing stored on the device; analytics only, with no identifier (the server mints a per-day visitor key).'
                              policyVersion:
                                type:
                                - string
                                - 'null'
                              decidedAt:
                                type:
                                - string
                                - integer
                                - 'null'
                              purposes:
                                type: object
                                properties:
                                  analytics:
                                    type: string
                                    enum:
                                    - granted
                                    - denied
                                  personalization:
                                    type: string
                                    enum:
                                    - granted
                                    - denied
                                  marketing:
                                    type: string
                                    enum:
                                    - granted
                                    - denied
                                  cross_context_advertising:
                                    type: string
                                    enum:
                                    - granted
                                    - denied
                                  intelligence_graph:
                                    type: string
                                    enum:
                                    - granted
                                    - denied
                              gpc:
                                type: boolean
                              dnt:
                                type: boolean
                          consent:
                            type: object
                            description: Segment's consent object, as a consent-manager wrapper stamps it.
                            properties:
                              categoryPreferences:
                                type: object
                                additionalProperties:
                                  type: boolean
                                description: 'Keyed by the site''s category ids. Only a category named `analytics` (any case) is read: true grants analytics, anything else denies it. Every other purpose stays denied.'
                          userAgent:
                            type: string
                            description: The visitor's agent. The bot rule judges it, and it is stored in place of the sender's User-Agent.
                          ip:
                            type: string
                            description: 'Ignored: an address the body names is never stored.'
                          library:
                            type: object
                            properties:
                              name:
                                type: string
                              version:
                                type: string
                            description: 'Read only for @segment/analytics-react-native, whose requests carry the phone''s HTTP agent. A library name in the body never makes a server''s call a device''s: a relay copies it.'
                          page:
                            type: object
                            properties:
                              url:
                                type: string
                              path:
                                type: string
                              title:
                                type: string
                              referrer:
                                type: string
                          campaign:
                            type: object
                            description: The campaign tags; `name` is utm_campaign.
                            properties:
                              source:
                                type: string
                              medium:
                                type: string
                              name:
                                type: string
                              term:
                                type: string
                              content:
                                type: string
                context:
                  type: object
                  description: Segment's `context`. In a batch, the batch's own `context` is merged under each message's.
                  properties:
                    tracking:
                      type: object
                      description: 'ARGUS''s collection evidence, read first and under every /ingest rule. Segment''s spec has no such field, and nothing optional is stored without evidence: see the batch operation''s description for what a message without it gets.'
                      required:
                      - version
                      - source
                      - purposes
                      properties:
                        version:
                          type: integer
                          const: 1
                        source:
                          type: string
                          enum:
                          - connections_consent
                          - consent_mode
                          - service
                          - implied
                          - cookieless
                          description: 'connections_consent or consent_mode: a decision the visitor made, carried in `purposes`. service: a server-side sender, honoured only on a request with no Origin, Referer or Sec-Fetch-Site header. implied: the default grant where nobody has to be asked, re-checked against the request''s location and refused where consent is required. cookieless: nothing stored on the device; analytics only, with no identifier (the server mints a per-day visitor key).'
                        policyVersion:
                          type:
                          - string
                          - 'null'
                        decidedAt:
                          type:
                          - string
                          - integer
                          - 'null'
                        purposes:
                          type: object
                          properties:
                            analytics:
                              type: string
                              enum:
                              - granted
                              - denied
                            personalization:
                              type: string
                              enum:
                              - granted
                              - denied
                            marketing:
                              type: string
                              enum:
                              - granted
                              - denied
                            cross_context_advertising:
                              type: string
                              enum:
                              - granted
                              - denied
                            intelligence_graph:
                              type: string
                              enum:
                              - granted
                              - denied
                        gpc:
                          type: boolean
                        dnt:
                          type: boolean
                    consent:
                      type: object
                      description: Segment's consent object, as a consent-manager wrapper stamps it.
                      properties:
                        categoryPreferences:
                          type: object
                          additionalProperties:
                            type: boolean
                          description: 'Keyed by the site''s category ids. Only a category named `analytics` (any case) is read: true grants analytics, anything else denies it. Every other purpose stays denied.'
                    userAgent:
                      type: string
                      description: The visitor's agent. The bot rule judges it, and it is stored in place of the sender's User-Agent.
                    ip:
                      type: string
                      description: 'Ignored: an address the body names is never stored.'
                    library:
                      type: object
                      properties:
                        name:
                          type: string
                        version:
                          type: string
                      description: 'Read only for @segment/analytics-react-native, whose requests carry the phone''s HTTP agent. A library name in the body never makes a server''s call a device''s: a relay copies it.'
                    page:
                      type: object
                      properties:
                        url:
                          type: string
                        path:
                          type: string
                        title:
                          type: string
                        referrer:
                          type: string
                    campaign:
                      type: object
                      description: The campaign tags; `name` is utm_campaign.
                      properties:
                        source:
                          type: string
                        medium:
                          type: string
                        name:
                          type: string
                        term:
                          type: string
                        content:
                          type: string
                sentAt:
                  type: string
                  format: date-time
          text/plain:
            schema:
              type: string
              description: The same JSON; analytics.js sends text/plain.
      responses:
        '200':
          description: '{ success: true, ok: true, accepted, rejected }. A message nothing is stored for (no userId or anonymousId, a track with no event, a group with no groupId, no allowed purpose) counts in rejected and the answer is still 200, as Segment''s is. Not a reason to retry.'
        '400':
          description: 'Not JSON, not gzip, an unsupported Content-Encoding, a single call or batched message over 32 KB, or a batch over 500 KB unzipped. Final: fix the request.'
        '401':
          description: Unknown or inactive write key. Final.
        '413':
          description: Body over 1048576 bytes as sent. Final.
        '500':
          description: 'Any 5xx: retry with the same body. The same messageIds count once.'
      tags:
      - Batch
      operationId: postV1Batch
      x-operation-id-source: derived
    servers:
    - url: https://analytics.connectionsapi.com
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'A Studio-minted cnx_live_ key carrying analytics:read (analytics:write to provision sites). The SAME key is also accepted as Authorization: Bearer (see BearerAuth). Studio is the sole key issuer. The legacy per-plane argus_live_ key class was retired 2026-06-21.'
    memberSession:
      type: http
      scheme: bearer
      description: The member's Connections session access token, exactly as this product's app sends it. Only operations that declare this scheme accept one.
      x-connections-credential: member-session
    cnxKey:
      type: http
      scheme: bearer
      description: A cnx_live_ key minted in Studio. It acts as the member who minted it, within its scopes.
      x-connections-credential: connections-key
    BearerAuth:
      type: http
      scheme: bearer
      description: A cnx_live_ key carrying analytics:read, sent as a bearer token.
x-refined-from:
- connections-icu-analytics-openapi-original.json
- connections-icu-analytics-openapi.yml