Integrations
REST API reference for integrations
This reference is generated from the Invitebase OpenAPI contract.
Connected event sources (RevenueCat, Adapty, Stripe, Segment).
Connect an event source
Creates a supported provider connection. The opaque credential is returned exactly once and is never persisted by Invitebase; configure it as a Bearer Authorization header at the provider.
Authentication
Authorization: Bearer <secret key>.
Request body
Required.
application/json schema:
{
"$ref": "#/components/schemas/IntegrationCreate"
}Responses
201
Integration connected. Save the credential now; it cannot be retrieved later.
application/json schema:
{
"$ref": "#/components/schemas/IntegrationConnection"
}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"
}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"
}List connected integrations
Event sources connected to this org (RevenueCat, Adapty, Stripe, Segment). Their events map into the same gate engine as SDK/API events.
Authentication
Authorization: Bearer <secret key>.
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
limit | query | No | {"type":"integer","minimum":1,"maximum":100,"default":25} | |
starting_after | query | No | {"type":"string"} | A cursor (object id) for pagination; returns the page after this object. |
Responses
200
A list of integrations.
application/json schema:
{
"allOf": [
{
"$ref": "#/components/schemas/ListResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Integration"
}
}
}
}
]
}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"
}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"
}Rotate an integration credential
Immediately replaces a source credential and returns the replacement once. The source is re-enabled so the new provider configuration can start delivering events.
Authentication
Authorization: Bearer <secret key>.
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
sourceId | path | Yes | {"type":"string","format":"uuid"} |
Responses
200
Credential rotated. Save the replacement now.
application/json schema:
{
"$ref": "#/components/schemas/IntegrationConnection"
}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"
}404
The requested resource does not exist.
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"
}Disconnect an event source
Disables provider ingress while retaining delivery history for auditability.
Authentication
Authorization: Bearer <secret key>.
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
sourceId | path | Yes | {"type":"string","format":"uuid"} |
Responses
200
Integration disconnected.
application/json schema:
{
"$ref": "#/components/schemas/Integration"
}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"
}404
The requested resource does not exist.
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"
}Simulate a provider event
Sends a synthetic subscription purchase through a RevenueCat or Adapty source's normal delivery ledger. Only available with a test-mode secret key.
Authentication
Authorization: Bearer <secret key>.
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
sourceId | path | Yes | {"type":"string","format":"uuid"} |
Request body
Required.
application/json schema:
{
"$ref": "#/components/schemas/IntegrationSimulation"
}Responses
202
Synthetic provider delivery accepted.
application/json schema:
{
"$ref": "#/components/schemas/EventSourceDelivery"
}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"
}403
The API key is valid but is not permitted to call this endpoint.
application/json schema:
{
"$ref": "#/components/schemas/Error"
}404
The requested resource does not exist.
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"
}Receive a source integration delivery
Provider callback endpoint. It uses the opaque event-source credential issued when the source is connected, then the provider adapter verifies, maps, and emits canonical events into the same qualification engine as SDK events. Provider adapters define their own body contract.
Authentication
No API key required.
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
provider | path | Yes | {"type":"string"} | |
sourceId | path | Yes | {"type":"string","format":"uuid"} | |
Authorization | header | Yes | {"type":"string"} | The source's one-time Bearer es_… connection credential. |
Responses
200
A provider webhook verification request was acknowledged.
application/json schema:
{
"type": "object"
}202
Delivery accepted or an already-processed delivery replayed.
application/json schema:
{
"$ref": "#/components/schemas/EventSourceDelivery"
}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"
}404
The requested resource does not exist.
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 IntegrationCreate object
| Field | Type | Required | Description |
|---|---|---|---|
provider | string | Yes | Event-source provider to connect. |
Full schema:
{
"type": "object",
"required": [
"provider"
],
"additionalProperties": false,
"properties": {
"provider": {
"type": "string",
"enum": [
"revenuecat",
"adapty"
],
"description": "Event-source provider to connect."
}
}
}The IntegrationConnection object
| Field | Type | Required | Description |
|---|---|---|---|
integration | Integration | Yes | |
connection | object | Yes |
Full schema:
{
"type": "object",
"required": [
"integration",
"connection"
],
"properties": {
"integration": {
"$ref": "#/components/schemas/Integration"
},
"connection": {
"type": "object",
"required": [
"ingress_path",
"credential"
],
"properties": {
"ingress_path": {
"type": "string",
"description": "Relative Invitebase API path to configure as the provider webhook URL."
},
"credential": {
"type": "string",
"description": "One-time opaque source credential. Store it at the provider; Invitebase cannot retrieve it again."
}
}
}
}
}The Integration object
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
object | string | Yes | |
provider | string | Yes | Registered provider key, e.g. revenuecat or adapty. |
status | string | Yes | |
credential_prefix | string | No | Safe prefix of the one-time provider credential; the credential itself is never returned. |
received_count | integer | Yes | |
processed_count | integer | Yes | |
failed_count | integer | Yes | |
last_received_at | string or null | No | |
last_processed_at | string or null | No | |
created_at | string | Yes |
Full schema:
{
"type": "object",
"required": [
"id",
"object",
"provider",
"status",
"received_count",
"processed_count",
"failed_count",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"object": {
"type": "string",
"const": "integration"
},
"provider": {
"type": "string",
"description": "Registered provider key, e.g. `revenuecat` or `adapty`."
},
"status": {
"type": "string",
"enum": [
"waiting",
"connected",
"error",
"disconnected"
]
},
"credential_prefix": {
"type": "string",
"description": "Safe prefix of the one-time provider credential; the credential itself is never returned."
},
"received_count": {
"type": "integer",
"format": "int64"
},
"processed_count": {
"type": "integer",
"format": "int64"
},
"failed_count": {
"type": "integer",
"format": "int64"
},
"last_received_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"last_processed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}The Error object
| Field | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
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 ListResponse object
| Field | Type | Required | Description |
|---|---|---|---|
object | string | Yes | |
has_more | boolean | Yes | |
data | array | Yes |
Full schema:
{
"type": "object",
"required": [
"object",
"data",
"has_more"
],
"properties": {
"object": {
"type": "string",
"const": "list"
},
"has_more": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {}
}
}
}The IntegrationSimulation object
| Field | Type | Required | Description |
|---|---|---|---|
referred_user_id | string | Yes | Test participant external id to receive the synthetic purchase. |
product_id | string | No | Optional provider product id for the synthetic purchase. |
Full schema:
{
"type": "object",
"required": [
"referred_user_id"
],
"additionalProperties": false,
"properties": {
"referred_user_id": {
"type": "string",
"maxLength": 160,
"description": "Test participant external id to receive the synthetic purchase."
},
"product_id": {
"type": "string",
"maxLength": 160,
"description": "Optional provider product id for the synthetic purchase."
}
}
}The EventSourceDelivery object
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
object | string | Yes | |
status | string | Yes | |
event_ids | array | Yes |
Full schema:
{
"type": "object",
"required": [
"id",
"object",
"status",
"event_ids"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"object": {
"type": "string",
"const": "event_source_delivery"
},
"status": {
"type": "string",
"enum": [
"processed",
"duplicate"
]
},
"event_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
}
}