---
id: config-delete-agreement
title: "Delete data agreement"
description: "This endpoint allows the admin to delete all revisions of a chosen data agreement defined earlier in an organisation."
sidebar_label: "Delete data agreement"
hide_title: true
hide_table_of_contents: true
api: eJzlWNtuGzkS/ZUCX8YetNqSfElGGAzWiZ0dTQZJEDsYYGMDKTVLao7ZZIdkS1YEvc2X7KftlyyK3a17Fg7ysMBuHpwWb3VYl1NVXAhJPnOqDMoaMRC3ufJARpZWmQCotZ15CDkBykIZCBYkaQrEU+BoqryyxoMdA0KWW08GJAYEnDiigkwASWNlSAKh04ocKANowLoJGuWRxaYiEbYkF38MpRiIzJqxmlxFSZftSSIRJTosKJDzYvBxsQP9g1GfK4LhVURjwI7+pIx3KZ4tMeQiEQYLEgPBGFcHD6VIhKPPlXIkxSC4ihLhs5wKFIOFCPOSt/jglJmI5fKeF/vSGk+e5/vdLv+XWRMY5WAhsCy1yuJ1Tv70DG6xf94KXlBB88D7Rpsi2bnYJfw4IUNOZT+uVA6FlaQhwzJUjmoTeXIKtfIkoQFTG8bMoZb+gwevzEQTODtLIdpaxb0GfBXxsIV7x5C5eRnsxGGZqwy8mhhkOYBGQv8YsJIqKDNJ78ydufRKEoydLSKKO+GrLCPvrbsTkFldFSYBXCP3ua20hBExSt7rSIK22QNJ9oTHjrGho0yHbTRCT2IwRu1p00QfhWKb1bd6wyZNGn1GW9afVxiQF5FTX1CrLyRvDJY+t6EZrQd/RZ9HKxTkAxaluE9E6dgfg6oNrOS+GyRibF2BQQyESAQ9YlFGI16cnz3r9ft9ep49y05Ho9Osn11cdHt7Rm2tDcMrsdy6ypNlbTnxnoB3rHBbeT1nk8Tj7wSMqgBj6yBQlhuVIQcxeg7hDbOg1iRXuxjUXZRsqoJ1vyu3tFplcwawOfGeMuukuF9umOa71Pj87Kf+3i1vc4J3r9nN2fds48M5Bpih34gIsdxyiycDWaRpujwodVOW2hXFEUPyDxVyW4W3+9cfWasJzdfENg6/LXRoJJNKDHYM0Co1XlTTOMBIo3lgfj3g8jDjIM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C4FDpqIYSMzpOgNJJunPsAJqNP89t5VgjnQea//Ip1uGbTrEQo/jrVZvZfvvjdv9uMS1AsA9koETvW3j1SQ1mbiG2QMBKgzFAY76PG9bFCZtOsA8rM7ZtpGMWI50KVGxeX5WldeFvK5OuTaL+vh7a9oX14r2oWm2Co3/99c9jLnwQbmYklc/rLoIesxzNpH63mJJT48ac0fNUxlayU36CiBVq5YkbOT3ueDslR2piQEl2gjBPmv040sQVXRxG7ZPYmUxUQA0zbpxDFOatVhJKK+tO22o7UeQTIIOjaHMEQzPQNCXNDsWMFGkLR0qrMI+HYBVsUXdrmS1KrZALzWiweD1Hk9jNcfvOz2oQE379OhNxFmgMOS5ktMrI+MiBbRSUmOUE/bS7p/PZbJZinE6tm5w0e/3J78OX129urju8Z7l+uFrbgWNH2qxiHmmji2mkthc3FOlp2ouFmvWhQLOBp37t23k93PXgjQzyX3uqbDw+0GM4KTWqWMpHBS4aov3YPGA2TyKdzesMdp8e7xORWx9412LBRd0Hp5dLHv5ckYsJIBFTdNHzaj5Wnr/l4XeCTRUdvW/S6DF89XX04HVaHjVMopH16lr5gWl27/V0yY88DUcwwHoVk00ZNvbvZfzlZrK6uv79+vZa1I3bNpc/RC5vPljAQXi7tF6j4L+cgA5u+Zkd9jXNf1ktr2e+umFFhPVqVtb9crn8N1PECsI=
sidebar_class_name: "delete api-method"
info_path: docs/consent-management-admin-api/igrant-io-api-documentation
custom_edit_url: null
---

> **Build this with an AI coding agent.** Install the iGrant.io Agent Skills, then ask your agent to build the integration:
>
> ```bash
> npx skills add L3-iGrant/skills
> ```


import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<h1 className={"openapi__heading"}>Delete data agreement</h1>

<MethodEndpoint method={"delete"} path={"/config/data-agreement/{dataAgreementId}"}></MethodEndpoint>



This endpoint allows the admin to delete all revisions of a chosen data agreement defined earlier in an organisation.

## Request

<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"description":"Unique ID of an object","in":"path","name":"dataAgreementId","required":true,"schema":{"type":"string"}}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Data agreement (based on ISO 27560) deleted successfully

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c6601","description":"Revision ID"}}></SchemaItem><SchemaItem collapsible={false} name={"schemaName"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`dataAgreement`, `policy`, `dataAgreementRecord`]"} schema={{"type":"string","format":"","example":"dataAgreement","description":"Previously \"schema\" but for technical reasons should be called \"schemaName\"","enum":["dataAgreement","policy","dataAgreementRecord"]}}></SchemaItem><SchemaItem collapsible={false} name={"objectId"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8492","description":"The PK of the object that was serialised"}}></SchemaItem><SchemaItem collapsible={false} name={"objectData"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"The object that is serialised"}}></SchemaItem><SchemaItem collapsible={false} name={"signedWithoutObjectId"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":false,"description":"Indicates that objectId was left blank in serizalizedSnapshot when calculating serializedHash. objectId may subsequently be filled in."}}></SchemaItem><SchemaItem collapsible={false} name={"serizalizedSnapshot"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"Revisioned data (sed as JSON) as a dict. Apply JSON Canonicalization Scheme as per IETF RFC 8785.  It contains all the fields of the schema except sucessorId, serializedHash, serializedSnapshot.\n"}}></SchemaItem><SchemaItem collapsible={false} name={"serializedHash"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2","description":"Hash of serizalizedSnapshot (SHA-1)"}}></SchemaItem><SchemaItem collapsible={false} name={"timestamp"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"2024-01-15T10:30:00Z","description":"Timestamp of when revisioning happened. It should be ISO 8601 UTC date time"}}></SchemaItem><SchemaItem collapsible={false} name={"authorizedByIndividualId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Individual ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"authorizedByOtherId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"64541a2e6e7569000145ab00","description":"Reference to an admin user that has created this revision"}}></SchemaItem><SchemaItem collapsible={false} name={"successorId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"x-fk-model":"Revision","type":"string","description":"If this revision is no longer the latest revision, refer to its successor"}}></SchemaItem><SchemaItem collapsible={false} name={"predecessorHash"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3","description":"Tamper-resistent artifact from previous record, copied from serializedHash"}}></SchemaItem><SchemaItem collapsible={false} name={"predecessorSignature"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"c3d4e5f6a1b2...","description":"Tamper-resistent artifact from previous record (we don't know if the previous record was signed or not)"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"id\": \"65471222e8c7c3bb3c2c6601\",\n  \"schemaName\": \"dataAgreement\",\n  \"objectId\": \"65471222e8c7c3bb3c2c8492\",\n  \"objectData\": \"{...}\",\n  \"signedWithoutObjectId\": false,\n  \"serizalizedSnapshot\": \"{...}\",\n  \"serializedHash\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\",\n  \"timestamp\": \"2024-01-15T10:30:00Z\",\n  \"authorizedByIndividualId\": \"string\",\n  \"authorizedByOtherId\": \"64541a2e6e7569000145ab00\",\n  \"successorId\": \"string\",\n  \"predecessorHash\": \"b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\",\n  \"predecessorSignature\": \"c3d4e5f6a1b2...\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

bad input parameter

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div></div></TabItem><TabItem label={"401"} value={"401"}><div>

Unauthorized

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"404"} value={"404"}><div>

Resource not found

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"500"} value={"500"}><div>

Internal server error

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
      