> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.invoice-api.xhub.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.invoice-api.xhub.io/_mcp/server.

# Activate Peppol for the organization

POST https://service.invoice-api.xhub.io/api/v1/peppol/registration
Content-Type: application/json

Registers the organization as a participant in the Peppol network via the platform's Access Point (legal entity + Peppol identifier are created under the platform account). Status may be `pending` when the Access Point requires an asynchronous verification (KYC). Provider and API key are platform configuration — they are never supplied by the customer.

Reference: https://docs.invoice-api.xhub.io/api-reference/peppol/register

## Authentication

- `Authorization` header (bearer token, required) — API Key authentication. Use `sk_live_*` for production or `sk_test_*` for testing.

## Servers

- `https://service.invoice-api.xhub.io` (Invoice API v1 (production), default)
- `/` (Diese Instanz (lokale Entwicklung))

## Request

### Body (application/json)

This endpoint expects an object.

- `senderPeppolId` (string, required) — The organization's own Peppol address
- `legalName` (string, required) — Registered legal name — published in the Peppol directory
- `country` (string, required) — ISO 3166-1 alpha-2
- `environment` (enum, optional, default: production) — Peppol settings scope to use (which provider config + API key)
  - Allowed values: `sandbox`, `production`
- `address` (ApiV1PeppolRegistrationPostRequestBodyContentApplicationJsonSchemaAddress, optional) — Postal address — some Access Points require it for KYC

## Response

### 200

Registration state after the activation attempt

- `success` (boolean, required)
- `settings` (ApiV1PeppolRegistrationPostResponsesContentApplicationJsonSchemaSettings, required, nullable) — Registration lifecycle state (null when nothing is configured)
- `errorCode` (string, optional)
- `errorMessage` (string, optional)

## Errors

### 400 Bad Request Error

Invalid input (Peppol id, legal name)

- `PostApiV1PeppolRegistrationRequestBadRequestError`
  - PostApiV1PeppolRegistrationRequestBadRequestError0
  - RequestValidationError: RequestValidationError

### 409 Conflict Error

Platform provider not configured

- `success` (boolean, required)
- `settings` (ApiV1PeppolRegistrationPostResponsesContentApplicationJsonSchemaSettings, required, nullable) — Registration lifecycle state (null when nothing is configured)
- `errorCode` (string, optional)
- `errorMessage` (string, optional)

### 501 Not Implemented Error

Registration layer not available in this deployment yet

- `error` (string, required)
- `missing` (string, required)

### 502 Bad Gateway Error

Access Point rejected the registration

- `success` (boolean, required)
- `settings` (ApiV1PeppolRegistrationPostResponsesContentApplicationJsonSchemaSettings, required, nullable) — Registration lifecycle state (null when nothing is configured)
- `errorCode` (string, optional)
- `errorMessage` (string, optional)

## Types

### ApiV1PeppolRegistrationPostRequestBodyContentApplicationJsonSchemaAddress

Postal address — some Access Points require it for KYC

- `line1` (string, optional)
- `city` (string, optional)
- `zip` (string, optional)

### ApiV1PeppolRegistrationPostResponsesContentApplicationJsonSchemaSettings

Registration lifecycle state (null when nothing is configured)

- `senderPeppolId` (string, optional)
- `registrationStatus` (enum, optional)
  - Allowed values: `unregistered`, `pending`, `active`, `deregistering`, `failed`
- `registrationError` (string, optional, nullable)
- `registeredAt` (datetime, optional, nullable)
- `enabled` (boolean, optional)
- `environment` (enum, optional) — Peppol settings scope to use (which provider config + API key)
  - Allowed values: `sandbox`, `production`

### PostApiV1PeppolRegistrationRequestBadRequestError0

- `success` (boolean, required)
- `settings` (ApiV1PeppolRegistrationPostResponsesContentApplicationJsonSchemaOneOf0Settings, required, nullable) — Registration lifecycle state (null when nothing is configured)
- `errorCode` (string, optional)
- `errorMessage` (string, optional)

### RequestValidationError

The request body failed the input check. `error` lists every finding; each names the field (`path`) and the rule (`code`). Depending on the code, a finding also carries the limit (`maximum`, `minimum`), the expected type (`expected`), the allowed values (`values`) or the unknown keys (`keys`).

- `success` (false, required)
- `error` (list of RequestValidationErrorErrorItems, required)

### ApiV1PeppolRegistrationPostResponsesContentApplicationJsonSchemaOneOf0Settings

Registration lifecycle state (null when nothing is configured)

- `senderPeppolId` (string, optional)
- `registrationStatus` (enum, optional)
  - Allowed values: `unregistered`, `pending`, `active`, `deregistering`, `failed`
- `registrationError` (string, optional, nullable)
- `registeredAt` (datetime, optional, nullable)
- `enabled` (boolean, optional)
- `environment` (enum, optional) — Peppol settings scope to use (which provider config + API key)
  - Allowed values: `sandbox`, `production`

### RequestValidationErrorErrorItems

- `code` (string, required) — Rule that failed, e.g. `too_big`, `invalid_type`, `invalid_value`.
- `path` (list of RequestValidationErrorErrorItemsPathItems, required) — Path of the field in the request body, e.g. `["invoice", "seller", "name"]`.
- `message` (string, required)
- `maximum` (double, optional)
- `minimum` (double, optional)
- `inclusive` (boolean, optional)
- `origin` (string, optional)
- `expected` (string, optional)
- `values` (list of any, optional)
- `keys` (list of string, optional)
- `format` (string, optional)

### RequestValidationErrorErrorItemsPathItems

- string
- double

## Examples

**Request**

```json
{
  "senderPeppolId": "9930:DE123456789",
  "legalName": "string",
  "country": "DE"
}
```

**Response**

```json
{
  "success": true,
  "settings": {
    "senderPeppolId": "string",
    "registrationStatus": "unregistered",
    "registrationError": "string",
    "registeredAt": "2024-01-15T09:30:00Z",
    "enabled": true,
    "environment": "sandbox"
  },
  "errorCode": "string",
  "errorMessage": "string"
}
```

**SDK Code**

```python
import requests

url = "https://service.invoice-api.xhub.io/api/v1/peppol/registration"

payload = {
    "senderPeppolId": "9930:DE123456789",
    "legalName": "string",
    "country": "DE"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://service.invoice-api.xhub.io/api/v1/peppol/registration';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"senderPeppolId":"9930:DE123456789","legalName":"string","country":"DE"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://service.invoice-api.xhub.io/api/v1/peppol/registration"

	payload := strings.NewReader("{\n  \"senderPeppolId\": \"9930:DE123456789\",\n  \"legalName\": \"string\",\n  \"country\": \"DE\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://service.invoice-api.xhub.io/api/v1/peppol/registration")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"senderPeppolId\": \"9930:DE123456789\",\n  \"legalName\": \"string\",\n  \"country\": \"DE\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://service.invoice-api.xhub.io/api/v1/peppol/registration")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"senderPeppolId\": \"9930:DE123456789\",\n  \"legalName\": \"string\",\n  \"country\": \"DE\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://service.invoice-api.xhub.io/api/v1/peppol/registration', [
  'body' => '{
  "senderPeppolId": "9930:DE123456789",
  "legalName": "string",
  "country": "DE"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://service.invoice-api.xhub.io/api/v1/peppol/registration");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"senderPeppolId\": \"9930:DE123456789\",\n  \"legalName\": \"string\",\n  \"country\": \"DE\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "senderPeppolId": "9930:DE123456789",
  "legalName": "string",
  "country": "DE"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://service.invoice-api.xhub.io/api/v1/peppol/registration")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```