---
title: "Subscriptions | Docs | e-TVA Check by R&D Copilot"
description: "Register an HTTPS endpoint and e-TVA Check sends your events to it, each one signed."
canonical: "https://etva.rdcopilot.com/docs/events/subscriptions/"
language: en
updated: 2026-11-22
---

# Subscriptions

Register an HTTPS endpoint and e-TVA Check sends your events to it, each one signed.

A subscription names an HTTPS endpoint of yours and the event types you want. [Create a subscription](https://etva.rdcopilot.com/docs/api-reference/subscriptions/#create-subscription) registers one, and the answer carries the signing secret, shown once: the same request sent again omits it.

curl

```bash
curl -X POST "$RDC_BASE_URL/etva/v1/subscriptions" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "e8e21be6-7bab-4f99-be24-d3f52abb1264",
  "companyId": "b61159f8-9c0b-4cdb-ac61-afb49517aae6",
  "url": "https://erp.brumar.example/etva/events",
  "eventTypes": [
    "com.rdcopilot.etva.period.compared.v1",
    "com.rdcopilot.etva.row.status_changed.v1",
    "com.rdcopilot.etva.difference.explained.v1",
    "com.rdcopilot.etva.difference.reopened.v1",
    "com.rdcopilot.etva.file.approved.v1",
    "com.rdcopilot.etva.file.filed.v1"
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/subscriptions`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "e8e21be6-7bab-4f99-be24-d3f52abb1264",
    "companyId": "b61159f8-9c0b-4cdb-ac61-afb49517aae6",
    "url": "https://erp.brumar.example/etva/events",
    "eventTypes": [
      "com.rdcopilot.etva.period.compared.v1",
      "com.rdcopilot.etva.row.status_changed.v1",
      "com.rdcopilot.etva.difference.explained.v1",
      "com.rdcopilot.etva.difference.reopened.v1",
      "com.rdcopilot.etva.file.approved.v1",
      "com.rdcopilot.etva.file.filed.v1"
    ]
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/etva/v1/subscriptions',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'e8e21be6-7bab-4f99-be24-d3f52abb1264',
        'companyId': 'b61159f8-9c0b-4cdb-ac61-afb49517aae6',
        'url': 'https://erp.brumar.example/etva/events',
        'eventTypes': [
            'com.rdcopilot.etva.period.compared.v1',
            'com.rdcopilot.etva.row.status_changed.v1',
            'com.rdcopilot.etva.difference.explained.v1',
            'com.rdcopilot.etva.difference.reopened.v1',
            'com.rdcopilot.etva.file.approved.v1',
            'com.rdcopilot.etva.file.filed.v1',
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "e8e21be6-7bab-4f99-be24-d3f52abb1264",
  "companyId": "b61159f8-9c0b-4cdb-ac61-afb49517aae6",
  "url": "https://erp.brumar.example/etva/events",
  "eventTypes": [
    "com.rdcopilot.etva.period.compared.v1",
    "com.rdcopilot.etva.row.status_changed.v1",
    "com.rdcopilot.etva.difference.explained.v1",
    "com.rdcopilot.etva.difference.reopened.v1",
    "com.rdcopilot.etva.file.approved.v1",
    "com.rdcopilot.etva.file.filed.v1"
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etva/v1/subscriptions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "e8e21be6-7bab-4f99-be24-d3f52abb1264",
  "companyId": "b61159f8-9c0b-4cdb-ac61-afb49517aae6",
  "url": "https://erp.brumar.example/etva/events",
  "eventTypes": [
    "com.rdcopilot.etva.period.compared.v1",
    "com.rdcopilot.etva.row.status_changed.v1",
    "com.rdcopilot.etva.difference.explained.v1",
    "com.rdcopilot.etva.difference.reopened.v1",
    "com.rdcopilot.etva.file.approved.v1",
    "com.rdcopilot.etva.file.filed.v1"
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "e8e21be6-7bab-4f99-be24-d3f52abb1264",
  "status": "accepted",
  "aggregateId": "a9d7d4b7-3d63-4f0e-b42f-5894e5338015",
  "aggregateRevision": 1,
  "subscriptionId": "a9d7d4b7-3d63-4f0e-b42f-5894e5338015",
  "secret": "whsec_VGhlIHNpZ25pbmcgc2VjcmV0IG9mIHRoZSBlLVRWQSBkb2NzLg=="
}
```

## What your endpoint receives

-   A `POST` with the event as JSON, in the envelope described in [Event envelope](https://etva.rdcopilot.com/docs/events/event-envelope/).
-   The headers `webhook-id`, `webhook-timestamp` and `webhook-signature`. [Verify signatures](https://etva.rdcopilot.com/docs/events/signatures/) shows how to check them.
-   Your answer: any 2xx status within 10 seconds confirms the delivery.

Check the signature of every request to your endpoint, on the raw body, and refuse a request whose signature does not match.

[Delivery and retries](https://etva.rdcopilot.com/docs/events/delivery-and-retries/) says what happens when your endpoint does not answer.

The full rule: [Developer guide](https://rdcopilot.com/docs/webhooks/)
