---
updatedAt: 2025-05-02T06:58:53.000Z
agentTools:
  projectIndex: https://developer.farpay.io/llms.txt
---

# Create agreement

Create an agreement, based on the agreement object. The agreement is returned with status and an ID for later references

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "v2",
    "title": "FarPay API v2"
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/v2/agreements": {
      "post": {
        "tags": [
          "V2Agreements"
        ],
        "summary": "Create agreement",
        "description": "Create an agreement, based on the agreement object. The agreement is returned with status and an ID for later references",
        "operationId": "V2Agreements_CreateAgreement",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FarPay.FrontEnd.Models.v2.Agreements.AgreementCreate"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/FarPay.FrontEnd.Models.v2.Agreements.AgreementCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "See body for details"
          },
          "401": {
            "description": "Unauthorized access"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.farpay.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "description": "API Key Authentication",
        "name": "X-API-KEY",
        "in": "header"
      }
    },
    "schemas": {
      "FarPay.FrontEnd.Models.v2.Agreements.AgreementCreate": {
        "type": "object",
        "properties": {
          "BankRegNumber": {
            "type": "string"
          },
          "BankAccountNumber": {
            "type": "string"
          },
          "DebitorGroupNumber": {
            "type": "string"
          },
          "Id": {
            "format": "int32",
            "type": "integer"
          },
          "Type": {
            "type": "string"
          },
          "Status": {
            "type": "string"
          },
          "CustomerNumber": {
            "type": "string"
          },
          "PayerID": {
            "type": "string"
          },
          "Details": {
            "type": "string"
          },
          "StartDate": {
            "format": "date-time",
            "type": "string"
          },
          "ExpireDate": {
            "format": "date-time",
            "type": "string"
          }
        }
      }
    }
  }
}
```