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

# Update organization

> Update `reference_id`, `name`, `tpa_id`, `billing_id`, or the card-type flags. The response does not include `billing_id` — read it back with GET.



## OpenAPI

````yaml /openapi/ems-api.json put /accounts/{accountId}/organizations/{organizationId}
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}/organizations/{organizationId}:
    put:
      tags:
        - Organizations
      summary: Update organization
      description: >-
        Update `reference_id`, `name`, `tpa_id`, `billing_id`, or the card-type
        flags. The response does not include `billing_id` — read it back with
        GET.
      operationId: updateOrganization
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/organizationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationUpdate'
            example:
              billing_id: 1
              process_card_type_corporate: true
              process_card_type_corporate_with_private_invoice: false
              process_card_type_private: false
      responses:
        '200':
          description: Updated organization
          content:
            application/json:
              example:
                id: 3
                reference_id: client_acme_001
                tpa_id: 42
                account_id: 1
                name: Acme AB
                process_card_type_corporate: true
                process_card_type_corporate_with_private_invoice: false
                process_card_type_private: false
      security:
        - opencard_auth:
            - organizations-write
components:
  parameters:
    accountId:
      name: accountId
      in: path
      required: true
      description: Your account ID
      schema:
        type: integer
    organizationId:
      name: organizationId
      in: path
      required: true
      description: Organization ID
      schema:
        type: integer
  schemas:
    OrganizationUpdate:
      type: object
      description: Fields to change. Omit a field to leave it unchanged.
      properties:
        reference_id:
          type: string
        name:
          type: string
        tpa_id:
          type: integer
        billing_id:
          type: integer
        process_card_type_corporate:
          type: boolean
          description: Deliver transactions for corporate cards invoiced to the company
        process_card_type_corporate_with_private_invoice:
          type: boolean
          description: Deliver transactions for corporate cards invoiced to the card holder
        process_card_type_private:
          type: boolean
          description: Deliver transactions for private cards invoiced to the card holder
  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 and update 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-signatories-delete: Delete TPA signatories
            account-tpa-identities-read: List identities on TPA
            billings-read: Read billing profiles
            billings-write: Create and update billing profiles
            payment-products-read: List available payment products (catalog)
            account-payment-products-read: List enabled payment products
            account-payment-products-write: Enable and disable payment products
            organizations-read: Read organizations
            organizations-write: Create and update organizations
            organizations-delete: Delete 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 and update webhooks
            webhook-events-read: Read webhook delivery log
            webhook-headers-read: Read custom webhook headers
            webhook-headers-write: Create and update custom webhook headers
            webhook-headers-delete: Delete custom webhook headers
            webhook-groups-read: Read webhook buyer-party filters
            webhook-groups-write: Create webhook buyer-party filters
            webhook-groups-delete: Delete webhook buyer-party filters
            receipts-write: Scan receipts (OCR)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.