Context4
Technical documentation

Provider events.

Context4 provider event types and subscriptions: create and manage subscriptions through the public API.

Generated from the public Context4 OpenAPI. Authenticate with Authorization: Bearer and an API key. General rules: API. Full contract: OpenAPI JSON. In the JSON below, $ref points to a named schema in the Schemas section.

listProviderEventTypes

GET /v1/provider-event-types

Deployment URL: https://ctx4.me/v1/provider-event-types. Replace parameters in braces with actual IDs from the API.

List supported provider notification types and fields

Capability: events:read.

The contract defines no additional parameters.

Responses and errors

HTTPMeaningFormat and schema
200Provider event catalogapplication/json {"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"connector_id":{"type":"string"},"entity":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"string"}},"field_types":{"type":"object","additionalProperties":{"type":"string","enum":["string","number","boolean"]}},"hydration_available":{"type":"boolean"}},"required":["connector_id","entity","event_types","fields","field_types","hydration_available"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Successful response headers:

Data
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}

subscribeProviderEvents

POST /v1/provider-event-subscriptions

Deployment URL: https://ctx4.me/v1/provider-event-subscriptions. Replace parameters in braces with actual IDs from the API.

Subscribe to provider events without entity storage

Capability: events:write.

The contract defines no additional parameters.

Request body

Required.

Data
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "example": "9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "minItems": 1,
            "maxItems": 32
          }
        },
        "required": [
          "connection_id",
          "event_types"
        ],
        "additionalProperties": false
      }
    }
  }
}

Responses and errors

HTTPMeaningFormat and schema
200Configured event subscriptionapplication/json {"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"connection_id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"source_id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"connector_id":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"version":{"type":"integer","exclusiveMinimum":0},"enabled_at":{"type":"string","format":"date-time"},"payload_retention_seconds":{"type":"integer","exclusiveMinimum":0}},"required":["id","connection_id","source_id","connector_id","event_types","status","version","enabled_at","payload_retention_seconds"],"additionalProperties":false}
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Successful response headers:

Data
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}

getProviderEventSubscription

GET /v1/provider-event-subscriptions

Deployment URL: https://ctx4.me/v1/provider-event-subscriptions. Replace parameters in braces with actual IDs from the API.

Read the connection event subscription

Capability: events:read.

Parameters

NameLocationRequiredType and constraints
connection_idqueryyes{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Responses and errors

HTTPMeaningFormat and schema
200Subscription or nullapplication/json {"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"connection_id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"source_id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"connector_id":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"version":{"type":"integer","exclusiveMinimum":0},"enabled_at":{"type":"string","format":"date-time"},"payload_retention_seconds":{"type":"integer","exclusiveMinimum":0}},"required":["id","connection_id","source_id","connector_id","event_types","status","version","enabled_at","payload_retention_seconds"],"additionalProperties":false}
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Successful response headers:

Data
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}

disableProviderEventSubscription

DELETE /v1/provider-event-subscriptions/{subscriptionId}

Deployment URL: https://ctx4.me/v1/provider-event-subscriptions/{subscriptionId}. Replace parameters in braces with actual IDs from the API.

Disable a provider event subscription

Capability: events:write.

Parameters

NameLocationRequiredType and constraints
subscriptionIdpathyes{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"}

Responses and errors

HTTPMeaningFormat and schema
200Disabled subscriptionapplication/json {"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"connection_id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"source_id":{"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"},"connector_id":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"version":{"type":"integer","exclusiveMinimum":0},"enabled_at":{"type":"string","format":"date-time"},"payload_retention_seconds":{"type":"integer","exclusiveMinimum":0}},"required":["id","connection_id","source_id","connector_id","event_types","status","version","enabled_at","payload_retention_seconds"],"additionalProperties":false}
400Problem (validation_failed)application/problem+json Problem
401Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked)application/problem+json Problem
403Problem (capability_missing)application/problem+json Problem
404Problem (not_found)application/problem+json Problem
409Problem (conflict)application/problem+json Problem
429Problem (rate_limited)application/problem+json Problem
500Problem (internal)application/problem+json Problem
503Problem (service_unavailable)application/problem+json Problem

Successful response headers:

Data
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}