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

# Post payees



## OpenAPI

````yaml /api-reference/specs/court-orders.json post /payees
openapi: 3.0.1
info:
  title: CourtOrders Service
  description: CourtOrders API for FlowPayroll
  contact:
    name: FlowPayroll
    email: support@flowpayroll.com
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/court-orders
security:
  - X-Auth-Token: []
    X-Org-Id: []
tags:
  - name: Court orders
    description: >-
      Create, retrieve, update, and delete court orders, list them for an
      employee, and reconcile against a pay run.
  - name: Attachments
    description: Upload and remove supporting documents for a court order.
  - name: Reference data
    description: Available tax years and per-year court order constants.
  - name: Payees
paths:
  /payees:
    post:
      tags:
        - Payees
      operationId: CreatePayee
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayeeRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_PayeeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_Object'
components:
  schemas:
    CreatePayeeRequest:
      type: object
      properties:
        name:
          type: string
        paymentMethod:
          enum:
            - Bacs
            - Cheque
            - Card
          type: string
        bacsDetails:
          $ref: '#/components/schemas/BacsDetails'
      additionalProperties: false
    ResponseBody_PayeeResponse:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_PayeeResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    ResponseBody_Object:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_Object'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    BacsDetails:
      type: object
      properties:
        accountNumber:
          type: string
        sortCode:
          type: string
        includeInRemittanceFile:
          type: boolean
          nullable: true
      additionalProperties: false
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ContentResponse_PayeeResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PayeeResponse'
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssue:
      type: object
      properties:
        field:
          type: string
        reason:
          type: string
        reasonToken:
          type: string
        reasonTokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ContentResponse_Object:
      type: object
      properties:
        data:
          nullable: true
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          nullable: true
      additionalProperties: false
    PayeeResponse:
      type: object
      properties:
        id:
          type: string
        organisationId:
          type: string
        name:
          type: string
        paymentMethod:
          enum:
            - Bacs
            - Cheque
            - Card
          type: string
        bacsDetails:
          $ref: '#/components/schemas/BacsDetails'
        createdDate:
          type: string
        createdBy:
          type: string
        updatedDate:
          type: string
        updatedBy:
          type: string
      additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: Authentication token for API access
      name: X-Auth-Token
      in: header
    X-Org-Id:
      type: apiKey
      description: >-
        Organisation to scope the request to. Required when the principal can
        access more than one organisation; optional for single-organisation
        principals (the authorizer resolves it automatically).
      name: X-Org-Id
      in: header

````