Skip to main content
InstantCampaign accepts the Segment event format. You can send it three ways:
  • Segment or RudderStack libraries (analytics-node, analytics-python, rudder-sdk-node and others) pointed at your Data plane URL.
  • A webhook destination in Segment (Webhooks (Actions)) or RudderStack (Webhook) pointed at your Ingest URL.
  • Your own code, posting to the same URLs.
What each call does:
  • identify creates or updates a contact.
  • track, page and screen record events, count purchases and can start journeys.
  • alias and group link ids and set the contact’s company.
Segment needs the Pro or Enterprise plan. Only Owners and Admins can connect, pause, regenerate or disconnect it.

Connect

1

Create a write key

Go to Settings → Developers → Integrations. Under Segment CDP, click Connect Segment.
2

Copy the write key now

The write key is shown once, with the warning “Save your write key now — it will not be shown again.” Copy it somewhere safe. Afterwards the card shows only its Write key prefix.
3

Point your library or destination at InstantCampaign

The card shows two URLs:
  • Data plane URL (https://instantcampaign.ai/api/cdp): set it as the host of a Segment or RudderStack library. The library sends batches to /v1/batch and puts the write key in Basic auth. Library setup snippets on the card has ready-made code.
  • Ingest URL (https://instantcampaign.ai/api/cdp/v1/event): set it as the endpoint of a webhook destination, with a header named X-Write-Key holding your write key. It takes one event or, with batching on, an array.
Treat the write key as a secret. It belongs on your servers or in Segment and RudderStack, not in a web page. The API answers server-to-server requests only.

What each call does

Traits

A value a field can’t hold, such as an invalid country code, is skipped. The rest of the call still applies.

Purchases

An Order Completed event with a numeric revenue, total or value is recorded as a purchase goal, in its currency. Order Refunded is recorded as a negative purchase. Purchases feed revenue segments and the contact’s lifetime value.

Events from people you don’t know yet

An event that carries only an anonymousId or a userId nobody has identified yet is stored without a contact. When a later identify or alias names that id, the earlier events are linked to the contact. Linking never starts a journey for an old event.

Start journeys from Segment events

Create a journey with the Website Event trigger and enter the event name as InstantCampaign stores it: order_completed for a track named Order Completed, page for page calls. When a matching event arrives for a known contact whose status is Active, the contact enters the journey. The event’s properties are available to later steps. See Automation triggers.

Retries and duplicates

Every event carries a messageId, and the libraries reuse it when they retry. InstantCampaign stores each messageId once, so a retried request never records an event twice. Events are stored as they arrive and applied a moment later. A contact usually appears within seconds, even during a large backfill.

Manage the connection

  • Pause stops accepting events and shows the card as Paused. Resume turns it back on.
  • Regenerate Key creates a new write key and shows it once. The old key stops working, so update your library or destination straight away.
  • Disconnect invalidates the write key and stops receiving events. Existing contacts and events aren’t affected.
  • Last hour shows how many events were received, applied, rejected, skipped because the workspace reached its contact limit, and how many are still waiting.

Limits

  • Up to 4,000 requests per minute per write key. A batch can hold up to 500 KB, so that is well over 100,000 events a minute.
  • Up to 32 KB per event and 2,500 events per batch.
  • New contacts stop at your plan’s contact limit. Calls for existing contacts still apply.

Troubleshooting