> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openregister.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Store credentials

> Store username and password credentials for accessing the Transparenzregister API.
These credentials will be used for subsequent requests to retrieve company documents.
Credential names are user-scoped; the reserved name `sandbox` cannot be used.
Credentials are validated against Transparenzregister before they are persisted.


## Store Transparenzregister credentials

Stores Transparenzregister login credentials so that subsequent extract requests can authenticate on your behalf.

Use the body field `name` to identify this credential set. If omitted, `name` defaults to `default`. You can store multiple named credential sets (e.g. per client). Submitting the same `name` again overwrites the stored credentials for that name without affecting extracts already in flight.

The reserved name `sandbox` **cannot** be used — it is reserved for test-mode extracts via `X-Credential-Name: sandbox` on the [order extract](/endpoint/transparenzregister-extract-create) endpoint. Using `sandbox` as a credential name returns `400`.

Your credentials are encrypted at rest. The plaintext values never touch our database — only encrypted ciphertext is persisted, and every decryption is logged and auditable.

### Responses

| Status | Meaning                                                                                                 |
| ------ | ------------------------------------------------------------------------------------------------------- |
| `201`  | Credentials stored successfully                                                                         |
| `400`  | Invalid body (e.g. reserved name `sandbox`, missing username/password)                                  |
| `401`  | Not authenticated, or Transparenzregister rejected the provided username/password                       |
| `402`  | Transparenzregister API access requires a paid API plan — [contact us](mailto:founders@openregister.de) |
| `409`  | Maximum number of stored credential sets reached for this account                                       |
| `500`  | Internal server error                                                                                   |

**Cost:** 0 credits


## OpenAPI

````yaml POST /v1/transparenzregister/credentials
openapi: 3.1.0
info:
  title: OpenRegister API
  version: 2.0.0
  description: >
    API for accessing comprehensive company data from official registers.

    This API provides access to company information, shareholder data, financial
    reports, and contact details.
servers:
  - url: https://api.openregister.de
    description: Production
security:
  - BearerAuth: []
paths:
  /v1/transparenzregister/credentials:
    post:
      tags:
        - v1
      summary: Store Transparenzregister credentials
      description: >
        Store username and password credentials for accessing the
        Transparenzregister API.

        These credentials will be used for subsequent requests to retrieve
        company documents.

        Credential names are user-scoped; the reserved name `sandbox` cannot be
        used.

        Credentials are validated against Transparenzregister before they are
        persisted.
      operationId: setTransparenzregisterCredentials
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransparenzregisterCredentials'
      responses:
        '201':
          description: Credentials stored successfully
        '400':
          description: >-
            Bad Request - Invalid parameters provided (including reserved
            credential name `sandbox`)
        '401':
          description: >-
            Unauthorized - Authentication required or Transparenzregister
            credentials rejected
        '402':
          description: >-
            Payment Required - Transparenzregister API access requires a paid
            API plan
        '409':
          description: >-
            Conflict - Maximum number of stored credential sets reached for this
            account
        '500':
          description: >-
            Internal Server Error - An error occurred while processing the
            request
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Openregister from 'openregister';


            const client = new Openregister({
              apiKey: process.env['OPENREGISTER_API_KEY'], // This is the default and can be omitted
            });


            await client.transparenzregister.setCredentialsV1({ password:
            'password', username: 'username' });
        - lang: Python
          source: |-
            import os
            from openregister import Openregister

            client = Openregister(
                api_key=os.environ.get("OPENREGISTER_API_KEY"),  # This is the default and can be omitted
            )
            client.transparenzregister.set_credentials_v1(
                password="password",
                username="username",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/oregister/openregister-go\"\n\t\"github.com/oregister/openregister-go/option\"\n)\n\nfunc main() {\n\tclient := openregister.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Transparenzregister.SetCredentialsV1(context.TODO(), openregister.TransparenzregisterSetCredentialsV1Params{\n\t\tPassword: \"password\",\n\t\tUsername: \"username\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            openregister transparenzregister set-credentials-v1 \
              --api-key 'My API Key' \
              --password password \
              --username username
components:
  schemas:
    TransparenzregisterCredentials:
      type: object
      description: |
        Credentials for accessing the Transparenzregister API.
      properties:
        name:
          type: string
          description: >
            Name to identify this set of credentials. Allows storing multiple

            Transparenzregister credentials per user (e.g., for different
            accounts

            or clients). Defaults to 'default' if not provided.

            Cannot be `sandbox` because that name is reserved for test-mode
            extracts.

            Example: "client_a"
          default: default
        username:
          type: string
          description: |
            Username for Transparenzregister API access.
            Example: "compliance@example.com"
        password:
          type: string
          description: |
            Password for Transparenzregister API access.
          format: password
      required:
        - username
        - password
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        API Key Authentication
        Provide your API key as a Bearer token in the Authorization header.

````