---
title: "Improved error messages for POST /v1/company/profiles"
canonical: https://documentation.maventa.com/changelogs/developer-changelog/2025-10-15-improved-error-messages-for-post-v1-company-profiles/
---

When calling [POST /v1/company/profiles](https://swagger.maventa.com/#/company/postV1CompanyProfiles) the parameters `scheme` and `endpoint_id` are optional, for example registering to Peppol can be done with this payload:
```json
{
  "profiles": [
    "INVOICE_AND_CREDIT_NOTE"
  ],
  "network": "PEPPOL"
}
```

The `scheme` and `endpoint_id` will then be generated automatically based on the company's bid and country.

However, if we could not generate them automatically, we previously would return a 400 Bad Request and a message that parameters
`scheme` and `endpoint_id` were required. This error message was not very helpful since the parameters are not required for this request—there was something else wrong.
A common case when this happens is in the staging environment where companies can be registered with an invalid bid format.

Now whenever automatic generation fails, the status code will be 422 Unprocessable Entity with a new error message
> Could not auto-generate scheme and endpoint_id from company business id (COUNTRY BID). Provide both parameters explicitly using valid identifiers or ensure that your company is registered with a valid bid.

We expect this new error message will only appear in the staging environment and provide clearer guidance to integrators about what is wrong and how to fix it.
