Pipelines

Subscribe a pipeline to a mailbox

Subscribes this pipeline to a connected Gmail or Outlook mailbox so the provider delivers new-message notifications directly to deliveryUrl (https). Gmail: Khotan registers the mailbox watch and a Pub/Sub push subscription whose pushes carry a Google OIDC token. Outlook: Khotan creates a Microsoft Graph subscription — Graph first validates deliveryUrl by POSTing a validationToken query parameter that the receiver must echo as text/plain within 10 seconds, and every later notification carries the clientState returned here. Secret-bearing and never cached; recover a lost clientState from the client-state endpoint.

post/api/v1/pipelines/{pipelineId}/email-subscriptions

Request

  • Base URL
    https://app.khotan.com
  • URL
    https://app.khotan.com/api/v1/pipelines/{pipelineId}/email-subscriptions
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Path parameters

pipelineIdstring required

Request body

emailIntegrationIdstring required
deliveryUrlstring uri required

Response

The created subscription. For Outlook it includes the clientState secret.

idstring required
emailIntegrationIdstring required
provider'google' | 'microsoft' required
deliveryUrlstring required
status'pending' | 'active' | 'failed' | 'disabled' required
expiresAtstring nullable required
createdAtstring required
updatedAtstring required
clientStatestring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.