Sections
Theme

Activation

REST API reference for activation

This reference is generated from the Invitebase OpenAPI contract.

Server-observed integration milestones for the setup flow.

Record a successful SDK initialization

POST/v1/sdk/initializations

SDKs call this non-blocking endpoint after configuration. Invitebase keeps the first accepted ping for each SDK, app, and mode as a durable activation milestone. Accepts publishable or secret keys.

Authentication

Authorization: Bearer <secret key> or X-Publishable-Key header.

Parameters

NameInRequiredSchemaDescription
Idempotency-KeyheaderNo{"type":"string"}A unique key for one logical mutation. The same key and request replay the original result for 24 hours; using the key with a different request returns 409.

Request body

Required.

application/json schema:

{
  "$ref": "#/components/schemas/SdkInitializationCreate"
}

Responses

202

Initialization observed.

application/json schema:

{
  "$ref": "#/components/schemas/SdkInitialization"
}

400

The request was malformed or invalid.

application/json schema:

{
  "$ref": "#/components/schemas/Error"
}

401

Missing or invalid API key.

application/json schema:

{
  "$ref": "#/components/schemas/Error"
}

429

Too many requests.

Response headers:

{
  "Retry-After": {
    "description": "Seconds until the caller may retry.",
    "schema": {
      "type": "integer",
      "minimum": 1
    }
  }
}

application/json schema:

{
  "$ref": "#/components/schemas/Error"
}

Retrieve server-observed activation milestones

GET/v1/activation/signals

Returns one app-and-mode-scoped snapshot derived from accepted SDK initialization, identify, link, event, and referral-state records. This is intended for the dashboard or a trusted server; never expose a secret key to a browser.

Authentication

Authorization: Bearer <secret key>.

Responses

200

Activation signal snapshot.

application/json schema:

{
  "$ref": "#/components/schemas/ActivationSignals"
}

401

Missing or invalid API key.

application/json schema:

{
  "$ref": "#/components/schemas/Error"
}

403

The API key is valid but is not permitted to call this endpoint.

application/json schema:

{
  "$ref": "#/components/schemas/Error"
}

429

Too many requests.

Response headers:

{
  "Retry-After": {
    "description": "Seconds until the caller may retry.",
    "schema": {
      "type": "integer",
      "minimum": 1
    }
  }
}

application/json schema:

{
  "$ref": "#/components/schemas/Error"
}

Schemas

Schema references below resolve against these definitions. Required fields, enums, bounds, and composed types are preserved from the contract.

The SdkInitializationCreate object

FieldTypeRequiredDescription
sdkstringYesStable lowercase SDK name, for example js or ios.

Full schema:

{
  "type": "object",
  "required": [
    "sdk"
  ],
  "properties": {
    "sdk": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]{0,63}$",
      "description": "Stable lowercase SDK name, for example `js` or `ios`."
    }
  }
}

The SdkInitialization object

FieldTypeRequiredDescription
objectstringYes
sdkstringYes
modeModeYesWhether the object exists in test or live mode (determined by the API key).
livemodebooleanYes
initialized_atstringYes

Full schema:

{
  "type": "object",
  "required": [
    "object",
    "sdk",
    "mode",
    "livemode",
    "initialized_at"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "sdk_initialization"
    },
    "sdk": {
      "type": "string",
      "example": "js"
    },
    "mode": {
      "$ref": "#/components/schemas/Mode"
    },
    "livemode": {
      "type": "boolean"
    },
    "initialized_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

The Mode object

Whether the object exists in test or live mode (determined by the API key).

Full schema:

{
  "type": "string",
  "enum": [
    "test",
    "live"
  ],
  "description": "Whether the object exists in test or live mode (determined by the API key)."
}

The Error object

FieldTypeRequiredDescription
errorobjectYes

Full schema:

{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "type",
        "code",
        "message",
        "doc_url"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "invalid_request_error",
            "authentication_error",
            "rate_limit_error",
            "api_error"
          ]
        },
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": "string"
        },
        "doc_url": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}

The ActivationSignals object

FieldTypeRequiredDescription
objectstringYes
account_idstringYes
modeModeYesWhether the object exists in test or live mode (determined by the API key).
livemodebooleanYes
observed_atstring or nullYes
signalsobjectYes

Full schema:

{
  "type": "object",
  "required": [
    "object",
    "account_id",
    "mode",
    "livemode",
    "observed_at",
    "signals"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "activation_signals"
    },
    "account_id": {
      "type": "string"
    },
    "mode": {
      "$ref": "#/components/schemas/Mode"
    },
    "livemode": {
      "type": "boolean"
    },
    "observed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "signals": {
      "type": "object",
      "required": [
        "campaign_created",
        "pages_designed",
        "sdk_initialized",
        "first_identify",
        "first_referral_link",
        "first_event_received",
        "first_validated_referral"
      ],
      "properties": {
        "campaign_created": {
          "$ref": "#/components/schemas/ActivationSignal"
        },
        "pages_designed": {
          "$ref": "#/components/schemas/ActivationSignal"
        },
        "sdk_initialized": {
          "$ref": "#/components/schemas/ActivationSignal"
        },
        "first_identify": {
          "$ref": "#/components/schemas/ActivationSignal"
        },
        "first_referral_link": {
          "$ref": "#/components/schemas/ActivationSignal"
        },
        "first_event_received": {
          "$ref": "#/components/schemas/ActivationSignal"
        },
        "first_validated_referral": {
          "$ref": "#/components/schemas/ActivationSignal"
        }
      }
    }
  }
}

The ActivationSignal object

FieldTypeRequiredDescription
statusstringYes
detected_atstring or nullYes

Full schema:

{
  "type": "object",
  "required": [
    "status",
    "detected_at"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "detected"
      ]
    },
    "detected_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}

On this page