latestOpenAPI 3.0.02026-08-0819201.1 MB

411f9f98c01e

contracts

Update the specified contract

For updating Contract name this request is authorized to the users with contracts.contract.edit permission.

For updating the set of available roles of the particular Contract this request is authorized to the user with contracts.contract.edit_available_roles permission.

For updating the custom data this request is authorized to the users with contracts.contract.edit_custom_data permission.

For updating the feature flags this request is authorized to the users with tenants.contract.edit_feature_flags permission.

For updating the type this request is authorized to the users with tenants.contract.edit_type permission.

patch/contracts/{contract_id}

Path parameters

contract_idstring required

Contract identifier

Request body

Example request

{
  "data": {
    "id": "5b4f337bff4304610483ba67",
    "attributes": {
      "name": "Contract name",
      "available_roles": [
        {
          "role": "admin"
        }
      ],
      "status": "active",
      "support_user_id": "5b4f337bff4304610483ba67",
      "feature_flags": {
        "disable_recipe_feature": true,
        "subscribe_to_error_by_default": true
      }
    }
  }
}

Response

OK

metaobject required

Example response

{
  "data": {
    "id": "5b4f337bff4304610483ba67",
    "links": {
      "self": "/v2/contracts/5b4f337bff4304610483ba67"
    },
    "attributes": {
      "name": "Contract name",
      "available_roles": [
        {
          "role": "admin"
        }
      ],
      "status": "active",
      "support_user_id": "5b4f337bff4304610483ba67",
      "feature_flags": {
        "disable_recipe_feature": true,
        "subscribe_to_error_by_default": true
      }
    },
    "relationships": {
      "members": {
        "data": [
          {
            "id": "5b4f337bff4304610483ba67"
          }
        ],
        "links": {
          "self": "/v2/contracts/5b4f337bff4304610483ba67/members"
        }
      },
      "workspaces": {
        "data": [
          {
            "id": "5b4f337bff4304610483ba67"
          }
        ]
      },
      "invites": {
        "data": [
          {
            "id": "5b4f337bff4304610483ba67"
          }
        ],
        "links": {
          "self": "/v2/contracts/5b4f337bff4304610483ba67/invites"
        }
      }
    }
  }
}