---
title: "Agreement (GoCardLess)"
method: POST
path: "/auth/gocardless/agreement"
---

# Agreement (GoCardLess)

`POST /auth/gocardless/agreement`

## Request body

- GoCardLessAgreementBodySchema
  - `institutionId` string, required
  - `transactionTotalDays` number, required

## Response `200`

Retrieve Agreement

- GoCardLessAgreementSchema
  - `data` object, required
    - `id` string, required
    - `created` string, required
    - `access_valid_for_days` number, required
    - `max_historical_days` number, required
    - `institution_id` string, required
    - `accepted` boolean, required

## Other responses

- `400` — Returns an error

## Changes

- **2024-07-24** `7a388bdc5a89` — 1 breaking, 1 warning
  - added the new required request property `institutionId`
  - removed the request property `institution_id`
- **2024-07-23** `1515e7c2644a` — 1 breaking, 1 warning
  - the `code` response's property type/format changed from `number`/`` to `string`/`` for status `400`
  - removed the optional property `details` from the response with the `400` status
- **2024-07-23** `85b4f43c2bb3` — 2 info
  - added the optional property `details` to the response with the `400` status
  - added the required property `requestId` to the response with the `400` status
- **2024-07-15** `23ae4134a5c4` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/midday-ai/apis/midday-engine-api/changes/auth/gocardless/agreement/post.md)

---

[API](https://skmtc.dev/midday-ai/apis/midday-engine-api.md) · [All operations](https://skmtc.dev/midday-ai/apis/midday-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/midday-ai/midday-engine-api/revisions/bf3c1ab4d60d/schema)
