Ability to use UI api endpoints with API token

Goal:
Use export feature from web ui with branch filtering (not available via Export Data in OpenAPI/Swagger Format - Apidog API)

Example of request that expected to work:

curl 'https://api.apidog.com/api/v1/export/openapi' \
  -H 'Authorization: Bearer <api-token>' \
  -H 'content-type: application/json' \
  -H 'x-client-version: 2.7.33' \
  -H 'x-branch-id: <branchId>' \
  -H 'x-project-id: <projectId>' \
  --data-raw '{
  "projectId": <projectId>,
  "type": 1,
  "format": "yaml",
  "version": "3.0",
  "apiDetailId": [],
  "includeTags": [],
  "excludeTags": [],
  "checkedFolder": [],
  "selectedEnvironments": [],
  "excludeExtension": true,
  "excludeTagsWithFolder": true,
  "moduleId": <moduleId>
}'

Response from server:

{"success":false,"errorCode":"403012","errorMessage":"No project maintainer privilege"}

User is admin on project and team.
Some of other endpoints that web UI uses - works ok.

Based on the error message you received, it seems there might be a permission issue. Please verify that your role in the project has at least “Editor” permissions, as this is required for exporting. You can check your permissions and roles settings here: Member Roles & Permission Settings - Apidog Docs

Token from user with Admin role on project. Also tried with token from user with Editor role.

Understood, we’ll investigate this issue.

We couldn’t reproduce this issue on our end. Could you provide the projectId for us to investigate further?

ProjectId is 1054774.
The goal is to use
https://api.apidog.com/api/v1/export/openapi
instead of officially published
https://api.apidog.com/v1/projects/{projectId}/export-openapi

I’m already successfully called:
https://api.apidog.com/api/v1/projects/1054774/sprint-branches
https://api.apidog.com/api/v1/projects/1054774/modules
With API key to collect necessary information to build correct request.

The endpoints you’re trying to use are internal APIs of our app. For security reasons, not all endpoints are accessible via API Access Token, including the export-openapi endpoint. Could you explain why you need to call these APIs directly? Please describe your workflow in detail so we can suggest better alternatives to achieve your goal.

I need to export openapi spec from sprint-branch during CI flow for building server part to keep everything update.