> ## Documentation Index
> Fetch the complete documentation index at: https://next-developers.opencard.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create TPA

> Creates TPA, fetches registry data, generates legal text.



## OpenAPI

````yaml /openapi/ems-api.json post /accounts/{accountId}/tpas
openapi: 3.0.3
info:
  title: OpenCard EMS API
  version: '1.0'
  description: >-
    API for Expense Management Systems. Manage TPAs, organizations, card
    holders, and webhooks. Receive transaction data via webhooks — not by
    polling this API.
  contact:
    email: support@opencard.io
servers:
  - url: https://api.opencard.io/api/v1/application
    description: Production
  - url: https://sandbox-api.opencard.io/api/v1/application
    description: Sandbox
security: []
paths:
  /accounts/{accountId}/tpas:
    post:
      tags:
        - TPAs
      summary: Create TPA
      description: Creates TPA, fetches registry data, generates legal text.
      operationId: createTpa
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TpaCreate'
            example:
              card_issuer_id: 1
              name: Acme AB
              country: SE
              organization_number: '5561234567'
              language: sv
      responses:
        '201':
          description: TPA created
          content:
            application/json:
              example:
                id: 42
                account_id: 1
                card_issuer_id: 1
                name: Acme AB
                country: SE
                organization_number: '5561234567'
                activated: false
                signatures_verified: false
                signed_document_path: null
                signatures_verified_at: null
                created_at: '2026-06-08T10:00:00.000000Z'
                updated_at: '2026-06-08T10:00:00.000000Z'
      security:
        - opencard_auth:
            - account-tpas-write
components:
  parameters:
    accountId:
      name: accountId
      in: path
      required: true
      description: Your account ID
      schema:
        type: integer
  schemas:
    TpaCreate:
      type: object
      required:
        - card_issuer_id
        - name
        - country
        - organization_number
      properties:
        card_issuer_id:
          type: integer
        name:
          type: string
        country:
          type: string
          enum:
            - SE
            - DK
            - 'NO'
            - FI
        organization_number:
          type: string
        language:
          type: string
          enum:
            - sv
            - 'no'
            - da
            - en
            - fi
  securitySchemes:
    opencard_auth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.opencard.io/oauth/token
          scopes:
            accounts-read: Read your account
            accounts-write: Update your account
            oauth-clients-read: Read OAuth clients
            oauth-clients-write: Create OAuth clients
            public-records-read: Company registry lookup
            account-tpas-read: Read TPAs
            account-tpas-write: Create TPAs
            account-tpas-delete: Delete TPAs
            account-tpa-signatories-read: Read TPA signatories
            account-tpa-signatories-write: Add TPA signatories
            account-tpa-identities-read: List identities on TPA
            billings-write: Create billing profiles
            card-issuers-read: List available card programs (catalog)
            account-card-issuers-read: List enabled issuers
            account-card-issuers-write: Enable issuers
            account-card-issuers-delete: Disable issuers
            organizations-read: Read organizations
            organizations-write: Create organizations
            card-holders-read: Read card holders
            card-holders-write: Create and update card holders
            card-holders-delete: Delete card holders
            webhooks-read: Read webhooks
            webhooks-write: Create webhooks
            webhook-events-read: Read webhook delivery log
            receipts-write: Scan receipts (OCR)

````