---
updatedAt: 2026-06-05T17:27:12.000Z
agentTools:
  projectIndex: https://clickwrap-developer.ironcladapp.com/llms.txt
---

# Create and Publish a Contract

Note: Only supported for HTML contracts at this time.


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "contact": {
      "email": "support@ironcladapp.com",
      "name": "Ironclad Support"
    },
    "title": "REST API",
    "version": "v1.1"
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "servers": [
    {
      "description": "Ironclad Clickwrap REST API",
      "url": "https://api.pactsafe.com/v1.1"
    }
  ],
  "components": {
    "securitySchemes": {
      "Bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "paths": {
    "/groups": {
      "get": {
        "summary": "List all Groups",
        "description": "List all groups available to the current user",
        "tags": [
          "Groups"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1sites/get/parameters/2"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/5"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/3"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/4"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "allOf": [
                    {
                      "properties": {
                        "count": {
                          "type": "integer"
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total_count": {
                          "type": "integer"
                        }
                      },
                      "title": "Collection",
                      "type": "object"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/paths/~1groups~1%7Bgroup_id%7D/patch/requestBody/content/application~1json/schema"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "An array of Groups"
          },
          "400": {
            "description": "Bad request."
          },
          "401": {
            "$ref": "#/paths/~1sites/get/responses/401"
          }
        }
      }
    },
    "/activity": {
      "get": {
        "description": "List Clickwrap Actions within the context of the User (across all Sites and Accounts)",
        "summary": "List all Activity.",
        "tags": [
          "Activity"
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1sites/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/2"
          },
          {
            "$ref": "#/paths/~1sites/get/parameters/3"
          }
        ],
        "responses": {
          "200": {
            "description": "An array of Clickwrap Actions",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/paths/~1groups/get/responses/200/content/application~1json/schema/allOf/0"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/paths/~1activity~1%7Bactivity_id%7D/get/responses/200/content/application~1json/schema"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1groups/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1sites/get/responses/401"
          },
          "403": {
            "description": "Forbidden."
          }
        }
      }
    },
    "/sites": {
      "get": {
        "summary": "List all sites",
        "tags": [
          "Sites"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page number to offset results for pagination. Defaults to 1.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "expand",
            "description": "Expands objects that only return an ID. Works up to 2 levels deep.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "description": "Filter activities by the various fields. Note the use of 'and' between the fields. Example: `event_type==agreed and signer_id==claddy@ironcladapp.com`.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "description": "Sort the results of your call by a field in the Request.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "fields",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "no_count",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "lean",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of sites",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/paths/~1groups/get/responses/200/content/application~1json/schema/allOf/0"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/paths/~1sites~1%7Bsite_id%7D/patch/requestBody/content/application~1json/schema"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The requester is unauthorized."
          }
        }
      }
    },
    "/contracts/publish": {
      "post": {
        "summary": "Create and Publish a Contract",
        "description": "Note: Only supported for HTML contracts at this time.\n",
        "tags": [
          "Contracts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "CreateContractRequest",
                "allOf": [
                  {
                    "$ref": "#/paths/~1versions~1%7Bversion_id%7D/patch/requestBody/content/application~1json/schema"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "public": {
                        "type": "boolean",
                        "description": "The status of allowing the contract to be published to a legal center or be added to a Group.",
                        "default": false
                      },
                      "shared": {
                        "type": "boolean"
                      },
                      "key": {
                        "type": "string",
                        "example": "template-0rnbcrv3g"
                      },
                      "description": {
                        "type": "string",
                        "example": "This is a description of the Terms of Use"
                      },
                      "classification": {
                        "type": "string",
                        "example": "privacy_policy"
                      },
                      "clm_record_sync": {
                        "$ref": "#/paths/~1contracts~1%7Bcontract_id%7D/patch/requestBody/content/application~1json/schema/properties/clm_record_sync"
                      },
                      "countries": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "RU"
                        ]
                      },
                      "locales": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "ru-RU"
                        ]
                      },
                      "tags": {
                        "type": "array",
                        "description": "The tags to uniquely identify or easily filter from other contracts.",
                        "items": {
                          "type": "string"
                        }
                      },
                      "language_direction": {
                        "$ref": "#/paths/~1contracts~1%7Bcontract_id%7D/patch/requestBody/content/application~1json/schema/properties/language_direction"
                      },
                      "used_in": {
                        "type": "array",
                        "items": {
                          "$ref": "#/paths/~1contracts~1%7Bcontract_id%7D/patch/requestBody/content/application~1json/schema/properties/used_in/items"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Contract and version created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1versions~1%7Bversion_id%7D/patch/requestBody/content/application~1json/schema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1groups/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1sites/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1activity/get/responses/403"
          }
        }
      }
    }
  }
}
```