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

# Create FX operation

> Creates an FX operation and queues the initial document requirement assessment. Beneficiary and economic-owner declarations are nullable for legacy compatibility, but trust-v2 requires both before a decision can become ready.



## OpenAPI

````yaml /openapi/payfi-v1.json post /v1/operations
openapi: 3.0.0
info:
  title: PayFi Partner API
  description: >-
    Partner API for PayFi compliance document automation. Dashboard Partner
    access is the admin role for exactly one partner integration; public API
    requests remain authenticated with signed partner API keys.
  version: 0.1.0
  contact: {}
servers:
  - url: https://sandbox.payfi.global
    description: Sandbox
  - url: https://api.payfi.global
    description: Production
security: []
tags:
  - name: Customers
    description: Signed partner endpoints for customer records.
  - name: Operations
    description: Signed partner endpoints for operations, documents, and upload completion.
  - name: Webhooks
    description: Partner-managed webhook endpoints and signed callback tests.
paths:
  /v1/operations:
    post:
      tags:
        - Operations
      summary: Create FX operation
      description: >-
        Creates an FX operation and queues the initial document requirement
        assessment. Beneficiary and economic-owner declarations are nullable for
        legacy compatibility, but trust-v2 requires both before a decision can
        become ready.
      operationId: PartnerApiController_createOperation
      parameters: []
      requestBody:
        required: true
        description: Operation payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOperationRequest'
            examples:
              importGoods:
                value:
                  customerId: cus_example
                  operationType: IMPORT_GOODS
                  exchangeModality: TERM
                  partnerOperationId: acme-op-123
                  declaredBeneficiaryName: Shenzhen NovaTech Components Co Ltd
                  declaredEconomicOwnerName: Shenzhen NovaTech Components Co Ltd
                  buyerCountry: BR
      responses:
        '201':
          description: Operation created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOperationResponse'
              examples:
                created:
                  value:
                    operationId: op_example
                    partnerOperationId: acme-op-123
                    status: REQUIREMENTS_PENDING
                    requirementsStatus: PENDING
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidRequest:
                  value:
                    error:
                      code: INVALID_REQUEST
                      message: The request payload is invalid.
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    error:
                      code: UNAUTHORIZED
                      message: Authentication failed.
      security:
        - PayFiApiKey: []
          PayFiNonce: []
          PayFiSignature: []
          PayFiIdempotencyKey: []
components:
  schemas:
    CreateOperationRequest:
      type: object
      properties:
        customerId:
          type: string
          example: cus_example
        operationType:
          type: string
          enum:
            - IMPORT_GOODS
            - EXPORT_GOODS
            - SERVICES
          example: IMPORT_GOODS
        exchangeModality:
          type: string
          enum:
            - ADVANCE
            - SIGHT
            - TERM
          example: TERM
        partnerOperationId:
          type: string
          example: acme-op-123
        declaredBeneficiaryName:
          type: string
          example: Shenzhen NovaTech Components Co Ltd
        declaredEconomicOwnerName:
          type: string
          example: Shenzhen NovaTech Components Co Ltd
        buyerCountry:
          type: string
          pattern: ^[A-Z]{2}$
          example: BR
      required:
        - customerId
        - operationType
        - exchangeModality
    CreateOperationResponse:
      type: object
      properties:
        operationId:
          type: string
          example: op_example
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          example: REQUIREMENTS_PENDING
        requirementsStatus:
          type: string
          example: PENDING
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INVALID_SIGNATURE
            message:
              type: string
              example: The request signature is invalid.
  securitySchemes:
    PayFiApiKey:
      type: apiKey
      in: header
      name: X-PayFi-Api-Key
    PayFiNonce:
      type: apiKey
      in: header
      name: X-PayFi-Nonce
    PayFiSignature:
      type: apiKey
      in: header
      name: X-PayFi-Signature
    PayFiIdempotencyKey:
      type: apiKey
      in: header
      name: Idempotency-Key

````