---
title: "Create a framework agreement and signing link"
method: POST
path: "/public/framework-agreement/v1/create-framework-agreement"
tags: ["Framework Agreement"]
---

# Create a framework agreement and signing link

`POST /public/framework-agreement/v1/create-framework-agreement`

Create a framework agreement and a signing link, for the given worker.
Once the agreement is signed, the FrameworkAgreementSignedEvent webhook is executed.

This endpoint is idempotent for retries: if an unsigned, non-expired framework agreement already exists for
the worker and the requested `isPayrollTaxReduction` matches the worker's stored setting, the existing agreement
and its signing link are returned instead of creating a new one. If the requested `isPayrollTaxReduction`
differs (the worker changes their setting), the pending agreement - including its Stiply signing request - is
cancelled and a new agreement reflecting the new setting is generated. A new agreement is likewise created when
there is no pending agreement (e.g. the previous one expired or was already signed); any obsolete unsigned
agreement is then replaced.

## Request body

- FrameworkAgreementCreationRequestV1
  - `workerId` string, uuid, required — The unique id of the worker, as returned from the /create-worker endpoint.
  - `isPayrollTaxReduction` boolean, required — true if the worker wants us to apply payroll tax reduction (Dutch: loonheffingskorting), false otherwise

## Response `200`

Successfully created the agreement

- FrameworkAgreementCreationResponseV1
  - `frameworkAgreementId` string, uuid, required
  - `signingUrl` string, uri, required — A URL to sign the framework agreement.
  - `signingUrlExpirationTimestamp` string, date-time, required — The timestamp (UTC) at which the signing URL will expire.

## Other responses

- `400` — The request could not be processed. This could be due to a number of reasons: * The request does not have all required data. * Data in the request is invalid. * Data in the request is inconsistent. * The operation is not allowed given the current state of the data.
- `401` — The request did not contain credentials identifying the caller, or the provided credentials were invalid.
- `403` — The data that the request referred to is inaccessible to the caller.

---

[API](https://skmtc.net/maqqie/apis/maqqie-public-api.md) · [All operations](https://skmtc.net/maqqie/apis/maqqie-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maqqie/maqqie-public-api/versions/0cdb49ad47c6/schema)
