Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Events

    Read the events resources and their request and response fields.

    On this page

    Read an event envelope

    GET /private-ai/v1/events/{eventId}

    Parameters

    NameInTypeRequiredMeaning
    eventId path string Yesrequired Record identifier.

    Responses

    StatusMeaningBody
    200 Current record state. EventEnvelope
    401 unauthorized Error
    403 forbidden Error
    404 Record not found in this installation. Error
    429 rate_limited Error
    503 unavailable Error

    Request

    curl

    curl "$RDC_BASE_URL/private-ai/v1/events/8a000004-0000-4000-8000-000000000001" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/events/8a000004-0000-4000-8000-000000000001`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/events/8a000004-0000-4000-8000-000000000001',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/events/8a000004-0000-4000-8000-000000000001');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/events/8a000004-0000-4000-8000-000000000001");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    JSON

    {
      "specversion": "1.0",
      "id": "8a000004-0000-4000-8000-000000000001",
      "type": "com.rdcopilot.private-ai.chat.answered.v1",
      "source": "/private-ai/v1",
      "time": "2026-11-23T07:12:00Z",
      "customerOrgId": "8a000005-0000-4000-8000-000000000001",
      "legalCompanyId": "8a000006-0000-4000-8000-000000000001",
      "aggregateType": "chat",
      "aggregateId": "8a000002-0000-4000-8000-000000000001",
      "aggregateRevision": 1,
      "correlationId": "8a000001-0000-4000-8000-000000000001",
      "causationId": "8a000001-0000-4000-8000-000000000001",
      "actor": {
        "type": "client",
        "id": "workspace-integration"
      },
      "data": {
        "workspaceId": "workspace-main",
        "status": "answered",
        "documentIds": [
          "doc-procedure"
        ]
      }
    }

    List event receivers

    GET /private-ai/v1/subscriptions

    Parameters

    NameInTypeRequiredMeaning
    limit query integer Nooptional Records per page. Default 100 Range 1 – 500
    cursor query string Nooptional Opaque cursor from the preceding page.

    Responses

    StatusMeaningBody
    200 Current record state. SubscriptionPage
    401 unauthorized Error
    403 forbidden Error
    404 Record not found in this installation. Error
    429 rate_limited Error
    503 unavailable Error

    Request

    curl

    curl "$RDC_BASE_URL/private-ai/v1/subscriptions?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/subscriptions?limit=20`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/subscriptions?limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/subscriptions?limit=20');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/subscriptions?limit=20");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    JSON

    {
      "items": [
        {
          "id": "8a000003-0000-4000-8000-000000000001",
          "revision": 1,
          "endpoint": "https://receiver.example/events",
          "eventTypes": [
            "com.rdcopilot.private-ai.chat.answered.v1",
            "com.rdcopilot.private-ai.request.refused.v1",
            "com.rdcopilot.private-ai.document.indexed.v1",
            "com.rdcopilot.private-ai.document.failed.v1",
            "com.rdcopilot.private-ai.model.changed.v1"
          ],
          "enabled": true
        }
      ],
      "nextCursor": null
    }

    Register an event receiver

    POST /private-ai/v1/subscriptions

    The account and actor come from the authenticated client. Repeating the same operationId and payload returns its recorded outcome. A changed payload or stale revision returns 409. Read the operation until completed or rejected; 202 is not completion.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A new UUID for a new intent; reuse it after a timeout.
    expectedRevision integer Yesrequired The revision you last read.
    endpoint string Yesrequired HTTPS receiver inside the permitted network.
    eventTypes string[] Yesrequired Events to deliver.

    Responses

    StatusMeaningBody
    202 Subscription created; keep this secret. SubscriptionOperationResult
    400 invalid_request Error
    401 unauthorized Error
    403 forbidden Error
    404 record_not_found Error
    409 revision_conflict Error
    422 invalid_transition Error
    429 rate_limited Error
    503 unavailable Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/private-ai/v1/subscriptions" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "8a000001-0000-4000-8000-000000000002",
      "expectedRevision": 0,
      "endpoint": "https://receiver.example/events",
      "eventTypes": [
        "com.rdcopilot.private-ai.chat.answered.v1",
        "com.rdcopilot.private-ai.request.refused.v1",
        "com.rdcopilot.private-ai.document.indexed.v1",
        "com.rdcopilot.private-ai.document.failed.v1",
        "com.rdcopilot.private-ai.model.changed.v1"
      ]
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/subscriptions`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "8a000001-0000-4000-8000-000000000002",
        "expectedRevision": 0,
        "endpoint": "https://receiver.example/events",
        "eventTypes": [
          "com.rdcopilot.private-ai.chat.answered.v1",
          "com.rdcopilot.private-ai.request.refused.v1",
          "com.rdcopilot.private-ai.document.indexed.v1",
          "com.rdcopilot.private-ai.document.failed.v1",
          "com.rdcopilot.private-ai.model.changed.v1"
        ]
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/subscriptions',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '8a000001-0000-4000-8000-000000000002',
            'expectedRevision': 0,
            'endpoint': 'https://receiver.example/events',
            'eventTypes': [
                'com.rdcopilot.private-ai.chat.answered.v1',
                'com.rdcopilot.private-ai.request.refused.v1',
                'com.rdcopilot.private-ai.document.indexed.v1',
                'com.rdcopilot.private-ai.document.failed.v1',
                'com.rdcopilot.private-ai.model.changed.v1',
            ],
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "8a000001-0000-4000-8000-000000000002",
      "expectedRevision": 0,
      "endpoint": "https://receiver.example/events",
      "eventTypes": [
        "com.rdcopilot.private-ai.chat.answered.v1",
        "com.rdcopilot.private-ai.request.refused.v1",
        "com.rdcopilot.private-ai.document.indexed.v1",
        "com.rdcopilot.private-ai.document.failed.v1",
        "com.rdcopilot.private-ai.model.changed.v1"
      ]
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/subscriptions');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/subscriptions");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "8a000001-0000-4000-8000-000000000002",
      "expectedRevision": 0,
      "endpoint": "https://receiver.example/events",
      "eventTypes": [
        "com.rdcopilot.private-ai.chat.answered.v1",
        "com.rdcopilot.private-ai.request.refused.v1",
        "com.rdcopilot.private-ai.document.indexed.v1",
        "com.rdcopilot.private-ai.document.failed.v1",
        "com.rdcopilot.private-ai.model.changed.v1"
      ]
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "8a000001-0000-4000-8000-000000000002",
      "status": "completed",
      "aggregateId": "8a000003-0000-4000-8000-000000000001",
      "aggregateRevision": 1,
      "secret": "whsec_cHJpdmF0ZS1haS1zaWduaW5nLWtleS1maXh0dXJl"
    }

    Read event delivery state

    GET /private-ai/v1/deliveries

    Parameters

    NameInTypeRequiredMeaning
    limit query integer Nooptional Records per page. Default 100 Range 1 – 500
    cursor query string Nooptional Opaque cursor from the preceding page.

    Responses

    StatusMeaningBody
    200 Current record state. DeliveryPage
    401 unauthorized Error
    403 forbidden Error
    404 Record not found in this installation. Error
    429 rate_limited Error
    503 unavailable Error

    Request

    curl

    curl "$RDC_BASE_URL/private-ai/v1/deliveries?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/deliveries?limit=20`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/deliveries?limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/deliveries?limit=20');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/deliveries?limit=20");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    JSON

    {
      "items": [
        {
          "id": "8a000004-0000-4000-8000-000000000001",
          "subscriptionId": "8a000003-0000-4000-8000-000000000001",
          "eventId": "8a000004-0000-4000-8000-000000000001",
          "state": "parked",
          "attempts": 6,
          "revision": 1
        }
      ],
      "nextCursor": null
    }

    Replay a parked delivery

    POST /private-ai/v1/deliveries/{deliveryId}/replay

    Only parked deliveries can be replayed. Send the current delivery revision and a new operationId. Replay preserves the event id and starts a new attempt series; deduplicate by event id at the receiver. Other states return invalid_transition.

    Parameters

    NameInTypeRequiredMeaning
    deliveryId path string Yesrequired Record identifier.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A new UUID for a new intent; reuse it after a timeout.
    expectedRevision integer Yesrequired The revision you last read.

    Responses

    StatusMeaningBody
    202 The operation was accepted. OperationResult
    400 invalid_request Error
    401 unauthorized Error
    403 forbidden Error
    404 record_not_found Error
    409 revision_conflict Error
    422 invalid_transition Error
    429 rate_limited Error
    503 unavailable Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/private-ai/v1/deliveries/8a000004-0000-4000-8000-000000000001/replay" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/deliveries/8a000004-0000-4000-8000-000000000001/replay`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "8a000001-0000-4000-8000-000000000001",
        "expectedRevision": 1
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/deliveries/8a000004-0000-4000-8000-000000000001/replay',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '8a000001-0000-4000-8000-000000000001',
            'expectedRevision': 1,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/deliveries/8a000004-0000-4000-8000-000000000001/replay');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/deliveries/8a000004-0000-4000-8000-000000000001/replay");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "status": "accepted",
      "aggregateId": "8a000004-0000-4000-8000-000000000001",
      "aggregateRevision": 2
    }

    Rotate the signing secret

    POST /private-ai/v1/subscriptions/{subscriptionId}/secret

    The account and actor come from the authenticated client. Repeating the same operationId and payload returns its recorded outcome. A changed payload or stale revision returns 409. Read the operation until completed or rejected; 202 is not completion.

    Parameters

    NameInTypeRequiredMeaning
    subscriptionId path string Yesrequired Record identifier.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A new UUID for a new intent; reuse it after a timeout.
    expectedRevision integer Yesrequired The revision you last read.

    Responses

    StatusMeaningBody
    202 New secret; both signatures are delivered during rotation. SubscriptionOperationResult
    400 invalid_request Error
    401 unauthorized Error
    403 forbidden Error
    404 record_not_found Error
    409 revision_conflict Error
    422 invalid_transition Error
    429 rate_limited Error
    503 unavailable Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/private-ai/v1/subscriptions/8a000003-0000-4000-8000-000000000001/secret" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/subscriptions/8a000003-0000-4000-8000-000000000001/secret`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "8a000001-0000-4000-8000-000000000001",
        "expectedRevision": 1
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/subscriptions/8a000003-0000-4000-8000-000000000001/secret',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '8a000001-0000-4000-8000-000000000001',
            'expectedRevision': 1,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/subscriptions/8a000003-0000-4000-8000-000000000001/secret');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/subscriptions/8a000003-0000-4000-8000-000000000001/secret");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "status": "completed",
      "aggregateId": "8a000003-0000-4000-8000-000000000001",
      "aggregateRevision": 2,
      "secret": "whsec_cHJpdmF0ZS1haS1yb3RhdGVkLXNpZ25pbmcta2V5"
    }