### Get User Response Source: https://api.commonpaper.com/docs/api/users Example JSON response for a single user profile. ```json { "data": { "id": "USER_UUID_1", "type": "user", "attributes": { "email": "admin@xample.com", "created_at": "2021-09-01T21:23:24.838Z", "updated_at": "2022-04-14T16:51:07.975Z", "name": "Ben Garvey", "title": "CTO", "id": "USER_UUID_1", "email_verified": true, "role": "admin" } } } ``` -------------------------------- ### List Agreement Statuses using Java Source: https://api.commonpaper.com/docs/api/agreement-statuses Java example for fetching agreement statuses from the API. This code uses the OkHttp library to make the GET request. ```java OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.commonpaper.com/v1/agreement_statuses") .get() .addHeader("Authorization", "") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Example Response: List Templates Source: https://api.commonpaper.com/docs/api/templates This is an example of a successful response when listing agreement templates. It includes template ID, type, attributes, and version. ```json { "data": [ { "id": "00000000-0000-0000-0000-000000000000", "type": "template_nda", "attributes": { "name": "Standard NDA", "agreement_type": "nda", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }, "standard_version": "1.0" } ] } ``` -------------------------------- ### List Agreement Statuses using Swift Source: https://api.commonpaper.com/docs/api/agreement-statuses Swift example for retrieving agreement statuses. This code uses `URLSession` to perform a GET request and sets the Authorization header. ```swift import Foundation let url = URL(string: "https://api.commonpaper.com/v1/agreement_statuses")! var request = URLRequest(url: url) request.httpMethod = "GET" request.setValue("", forHTTPHeaderField: "Authorization") let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data { let jsonString = String(data: data, encoding: .utf8) print(jsonString ?? "") } } task.resume() ``` -------------------------------- ### List Agreement Statuses using JavaScript Source: https://api.commonpaper.com/docs/api/agreement-statuses Example of how to retrieve agreement statuses using JavaScript. This snippet demonstrates making a GET request to the API endpoint. ```javascript fetch('https://api.commonpaper.com/v1/agreement_statuses', { method: 'GET', headers: { 'Authorization': '' } }) .then(response => { // Handle response }) .catch(error => { // Handle error }); ``` -------------------------------- ### Example Response for Listing Agreements Source: https://api.commonpaper.com/docs/api/agreements This is an example of the JSON response you will receive when successfully listing agreements. It includes details about each agreement, such as its ID, type, attributes, and status. ```json { "data": [ { "id": "AGREEMENT_UUID", "type": "agreement", "attributes": { "term": 1, "confidentiality_period": 1, "purpose": "Evaluating whether to enter into a business relationship with the other party.", "chosen_courts_region": "Delaware", "sender_signer_name": "Ben Garvey", "sender_signer_title": "CTO", "sender_organization": "RJMetrics", "sender_street_address": "315 Walnut St", "sender_signer_email": "ben@rjmetrics.com", "recipient_name": "Benjamin Garvey", "recipient_title": null, "recipient_organization": null, "recipient_street_address": null, "recipient_email": "art@vandelay.com", "created_at": "2022-05-19T23:04:45.063Z", "updated_at": "2022-05-19T23:04:45.109Z", "status": "sent_waiting_for_initial_review", "pdf_path": null, "sender_city": "Philadelphia", "sender_state": "PA", "sender_zip": "19107", "recipient_city": null, "recipient_state": null, "recipient_zip": null, "governing_law_region": "Delaware", "additional_changes": "None", "term_period_perpetual": false, "confidentiality_period_perpetual": false, "sender_accepted": true, "recipient_accepted": false, "sender_accepted_date": "2022-05-19T23:04:45.059Z", "recipient_accepted_date": null, "id": "AGREEMENT_UUID", "template_nda_id": "TEMPLATE_UUID", "organization_id": "ORGANIZATION_UUID", "hellosign_signature_request_id": null, "sender_signed_date": null, "recipient_signed_date": null, "sender_last_viewed": "2022-11-14T16:44:36.023Z", "recipient_last_viewed": null, "negotiations_allowed": true, "declined_reason": null, "district_or_county": "", "effective_date_of_confidentiality": "Effective Date", "template_csa_id": null, "agreement_type": "NDA", "recipient_org_id": "RECIPIENT_ORG_UUID", "sender_role": "Provider", "recipient_role": "Customer", "proposal_count": 1, "hellosign_sender_signature_id": null, "hellosign_recipient_signature_id": null, "recipient_country": null, "deleted_at": null, "include_terms": false, "sender_last_to_sign": false, "template_dpa_id": null, "exclude_recipient_organization": false, "template_design_id": null, "uploaded": false, "custom_agreement_type_id": null, "origin": "application", "effective_date": null, "end_date": null, "last_activity_date": "2022-05-19T23:04:45.138Z", "include_additional_changes": true, "include_expiration_date": null, "sent_date": "2022-05-19T23:04:45.063Z", "expired": false, "include_cc_users": false, "expiration_warning_sent": false, "include_message": false, "message": null, "include_expiration_days": null, "include_expiration_type": "none", "include_automated_nudges": false, "include_automated_nudges_last_sent_date": null, "template_psa_id": null, "all_signed_date": null, "test_agreement": false, "parent_agreement_id": null, "underlying_agreement_type": null, "underlying_agreement_form_type": null, "underlying_agreement_val": null, "underlying_agreement_external_url_link": null, "include_billing_workflow": false, "billing_workflow_type": "stripe", "payment_link_url": null, "include_automated_payment_reminders": true, "governing_law_country": "United States of America", "chosen_courts_country": "United States of America", "include_billing_info": false, "billing_name": null, "billing_email": null, "sender_notice_email_address": null, "recipient_notice_email_address": null, "framework_terms_type": "new", "framework_terms_description": null, "manual_send": false, "agreement_request_page_id": null, "display_status": "Agreement sent for initial review", "summary": "Agreement Summary", "csa_subscription_start_date": "2022-05-19T23:04:45.063Z", "agreement_histories": [ { "id": "AGREEMENT_HISTORY_UUID", "description": "Ben Garvey (ben@rjmetrics.com) sent the agreement to Art Vandelay (art@vandelay.com)", "status": "sent_waiting_for_initial_review", "action": "sent", "created_at": "2022-05-19T23:04:45.138Z", "agreement_" } ] } } ] } ``` -------------------------------- ### GET /mcp Source: https://api.commonpaper.com/docs/api/~endpoints Establishes a connection to the MCP server. ```APIDOC ## GET /mcp ### Description Establishes a connection to the MCP server. ### Method GET ### Endpoint https://api.commonpaper.com/mcp ### Parameters #### Headers - **Authorization** (string) - Required - The API key in the format 'Bearer YOUR_KEY_HERE'. ### Response #### Success Response (200) - **Response** (string) - Returns ': connected' #### Response Example ": connected" ``` -------------------------------- ### List Agreement Statuses using C# Source: https://api.commonpaper.com/docs/api/agreement-statuses C# code to fetch agreement statuses from the API. This example uses `HttpClient` to perform the GET request and includes the Authorization header. ```csharp using System; using System.Net.Http; using System.Threading.Tasks; public class Example { public static async Task Main() { using var client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", ""); HttpResponseMessage response = await client.GetAsync("https://api.commonpaper.com/v1/agreement_statuses"); string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } } ``` -------------------------------- ### Example Response for List Agreement Statuses Source: https://api.commonpaper.com/docs/api/agreement-statuses This is an example of a successful JSON response when listing agreement statuses. It contains a 'data' array with all possible status strings. ```json { "data": [ "sent_waiting_for_initial_review", "sent_waiting_for_sender_review", "sent_waiting_for_recipient_review", "sent_to_recipient_for_signature", "sent_to_sender_signer_for_signature", "sent_to_hellosign_by_recipient_initial_review", "sent_to_hellosign_by_recipient", "sent_to_hellosign_by_sender", "waiting_for_sender_signature", "waiting_for_recipient_signature", "declined_by_recipient", "signed_waiting_for_final_confirmation", "signed", "draft", "voided_by_sender" ] } ``` -------------------------------- ### Get Agreement History Response Source: https://api.commonpaper.com/docs/api/agreement-history Example JSON response containing a list of agreement history events. ```json { "data": [ { "id": "AGREEMENT_HISTORY_UUID_1", "type": "agreement_history", "attributes": { "id": "AGREEMENT_HISTORY_UUID_1", "description": "Ben Garvey (ben@example.com) sent the agreement to Benjamin Garvey (ben@bengarvey.com)", "status": "sent_waiting_for_initial_review", "action": "sent", "created_at": "2022-05-19T23:04:45.138Z", "agreement_id": "AGREEMENT_UUID", "user_id": "USER_UUID_1" } }, { "id": "AGREEMENT_HISTORY_UUID_2", "type": "agreement_history", "attributes": { "id": "AGREEMENT_HISTORY_UUID_2", "description": "Benjamin Garvey (ben@bengarvey.com) viewed the agreement.", "status": "sent_waiting_for_initial_review", "action": "viewed", "created_at": "2023-03-27T03:22:17.208Z", "agreement_id": "AGREEMENT_UUID", "user_id": "USER_UUID_2" } }, { "id": "AGREEMENT_HISTORY_UUID_3", "type": "agreement_history", "attributes": { "id": "AGREEMENT_HISTORY_UUID_3", "description": "Benjamin Garvey (ben@bengarvey.com) proposed changes to the agreement.", "status": "sent_waiting_for_sender_review", "action": "proposed changes", "created_at": "2023-03-27T03:22:40.270Z", "agreement_id": "AGREEMENT_UUID", "user_id": "USER_UUID_2" } } ] } ``` -------------------------------- ### List Users Response Source: https://api.commonpaper.com/docs/api/users Example JSON response containing a list of user objects. ```json { "data": [ { "id": "USER_UUID_1", "type": "user", "attributes": { "email": "admin@xample.com", "created_at": "2021-09-01T21:23:24.838Z", "updated_at": "2022-04-14T16:51:07.975Z", "name": "Ben Garvey", "title": "CTO", "id": "USER_UUID_1", "email_verified": true, "role": "admin" } }, { "id": "USER_UUID_2", "type": "user", "attributes": { "email": "standard@example.com", "created_at": "2021-11-10T19:04:39.835Z", "updated_at": "2021-11-10T19:05:21.578Z", "name": "Standard Garvey", "title": "Engineer", "id": "USER_UUID_2", "email_verified": false, "role": "standard" } }, { "id": "USER_UUID_3", "type": "user", "attributes": { "email": "anotherstandard@example.com", "created_at": "2022-04-07T15:28:23.867Z", "updated_at": "2022-04-07T15:28:57.573Z", "name": "Another Standard", "title": "Intern", "id": "USER_UUID_3", "email_verified": false, "role": "standard" } } ] } ``` -------------------------------- ### Rate Limiting Response Example Source: https://api.commonpaper.com/docs/api/attachments Example response returned when the API rate limit is exceeded. ```json { "type": "https://httpproblems.com/http-status/429", "title": "Too Many Requests", "status": 429, "instance": "/foo/bar" } ``` -------------------------------- ### List Agreement Statuses using Kotlin Source: https://api.commonpaper.com/docs/api/agreement-statuses Kotlin example demonstrating how to retrieve agreement statuses using the Ktor client. It shows setting the Authorization header for the API request. ```kotlin import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.client.* import io.ktor.client.engine.cio.* suspend fun main() { val client = HttpClient(CIO) val response: HttpResponse = client.get("https://api.commonpaper.com/v1/agreement_statuses") { headers { append("Authorization", "") } } println(client.readFromResponse(response)) } ``` -------------------------------- ### Example MCP POST Request Body Source: https://api.commonpaper.com/docs/api/~endpoints This is an example of the JSON request body required for a POST request to the MCP endpoint, used for initialization. ```json { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "your-client", "version": "1.0" } } } ``` -------------------------------- ### Webhook Payload Example Source: https://api.commonpaper.com/docs/webhooks A sample JSON payload representing the data sent when a new agreement is created. ```json { "agreement_id": "20af5c12-ea91-446c-b80d-aaafb09b1a21", "agreement_type": "NDA", "template_name": "Company Dot Com Mutual NDA Template", "url": "http://app.commonpaper.com/agreements/20af5c12-ea91-446c-b80d-aaafb09b1a21", "sender_email": "jerry@company.com", "sender_name": "Jerry", "recipient_organization": "Vandelay Industries", "recipient_name": "George", "recipient_email": "george@vendelay.com", "status": "sent_waiting_for_initial_review", "event_type": "sent", "event_date": "2022-08-18T17:56:29.018Z", "event_description": "Jerry (jerry@company.com) sent the agreement to George (george@vendelay.com)." } ``` -------------------------------- ### Example MCP POST Response Body Source: https://api.commonpaper.com/docs/api/~endpoints This is an example of a successful JSON response body when making a POST request to the MCP endpoint. ```json { "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2024-11-05", "capabilities": { "tools": {} }, "serverInfo": { "name": "common-paper-api", "version": "1.0.0" } } } ``` -------------------------------- ### Example Agreement Response Source: https://api.commonpaper.com/docs/api/agreements This is a sample JSON response for a successful retrieval of an agreement. It contains detailed attributes of the agreement, including sender and recipient information, status, and timestamps. ```json { "data": { "id": "AGREEMENT_UUID", "type": "agreement", "attributes": { "term": 1, "confidentiality_period": 1, "purpose": "Evaluating whether to enter into a business relationship with the other party.", "chosen_courts_region": "Delaware", "sender_signer_name": "Ben Garvey", "sender_signer_title": "CTO", "sender_organization": "RJMetrics", "sender_street_address": "315 Walnut St", "sender_signer_email": "ben@rjmetrics.com", "recipient_name": "Benjamin Garvey", "recipient_title": null, "recipient_organization": null, "recipient_street_address": null, "recipient_email": "art@vandelay.com", "created_at": "2022-05-19T23:04:45.063Z", "updated_at": "2022-05-19T23:04:45.109Z", "status": "sent_waiting_for_initial_review", "pdf_path": null, "sender_city": "Philadelphia", "sender_state": "PA", "sender_zip": "19107", "recipient_city": null, "recipient_state": null, "recipient_zip": null, "governing_law_region": "Delaware", "additional_changes": "None", "term_period_perpetual": false, "confidentiality_period_perpetual": false, "sender_accepted": true, "recipient_accepted": false, "sender_accepted_date": "2022-05-19T23:04:45.059Z", "recipient_accepted_date": null, "id": "AGREEMENT_UUID", "template_nda_id": "TEMPLATE_UUID", "organization_id": "ORGANIZATION_UUID", "hellosign_signature_request_id": null, "sender_signed_date": null, "recipient_signed_date": null, "sender_last_viewed": "2022-11-14T16:44:36.023Z", "recipient_last_viewed": null, "negotiations_allowed": true, "declined_reason": null, "district_or_county": "", "effective_date_of_confidentiality": "Effective Date", "template_csa_id": null, "agreement_type": "NDA", "recipient_org_id": "RECIPIENT_ORG_UUID", "sender_role": "Provider", "recipient_role": "Customer", "proposal_count": 1, "hellosign_sender_signature_id": null, "hellosign_recipient_signature_id": null, "recipient_country": null, "deleted_at": null, "include_terms": false, "sender_last_to_sign": false, "template_dpa_id": null, "exclude_recipient_organization": false, "template_design_id": null, "uploaded": false, "custom_agreement_type_id": null, "origin": "application", "effective_date": null, "end_date": null, "last_activity_date": "2022-05-19T23:04:45.138Z", "include_additional_changes": true, "include_expiration_date": null, "sent_date": "2022-05-19T23:04:45.063Z", "expired": false, "include_cc_users": false, "expiration_warning_sent": false, "include_message": false, "message": null, "include_expiration_days": null, "include_expiration_type": "none", "include_automated_nudges": false, "include_automated_nudges_last_sent_date": null, "template_psa_id": null, "all_signed_date": null, "test_agreement": false, "parent_agreement_id": null, "underlying_agreement_type": null, "underlying_agreement_form_type": null, "underlying_agreement_val": null, "underlying_agreement_external_url_link": null, "include_billing_workflow": false, "billing_workflow_type": "stripe", "payment_link_url": null, "include_automated_payment_reminders": true, "governing_law_country": "United States of America", "chosen_courts_country": "United States of America", "include_billing_info": false, "billing_name": null, "billing_email": null, "sender_notice_email_address": null, "recipient_notice_email_address": null, "framework_terms_type": "new", "framework_terms_description": null, "manual_send": false, "agreement_request_page_id": null, "display_status": "Agreement sent for initial review", "summary": "Agreement Summary", "csa_subscription_start_date": "2022-05-19T23:04:45.063Z", "effective_date_type": "signature", "agreement_histories": [ { "id": "AGREEMENT_HISTORY_UUID", "description": "Ben Garvey (ben@rjmetrics.com) sent the agreement to Art Vandelay (art@vandelay.com)", "status": "sent_waiting_for_initial_review", "action": "sent", "created_at": "2022-05-19T23:04:45.138Z", "agreement_id": "AGREEMENT_UUID", "user_id": "USER_UUID" } ] }, "links": { "agreement_url": "https://app.commonpaper.com/agreements/AGREEMENT_UUID", "pd" } } } ``` -------------------------------- ### List Agreement Statuses using PHP Source: https://api.commonpaper.com/docs/api/agreement-statuses PHP script to retrieve agreement statuses from the Common Paper API. This example uses cURL to make the GET request and set the Authorization header. ```php ' )); $response = curl_exec($curl); if (curl_errno($curl)) { echo 'Error:' . curl_error($curl); } certify_close($curl); echo $response; ?> ``` -------------------------------- ### List Agreements using cURL Source: https://api.commonpaper.com/docs/api/agreements Use this cURL command to make a GET request to the /v1/agreements endpoint. Ensure you replace '' with your actual API key for authorization. ```shell curl --request GET \ --url https://api.commonpaper.com/v1/agreements \ --header 'Authorization: ' ``` -------------------------------- ### List Agreement Statuses using Go Source: https://api.commonpaper.com/docs/api/agreement-statuses A Go program to retrieve agreement statuses from the Common Paper API. It demonstrates setting the Authorization header for the GET request. ```go package main import ( "fmt" "net/http" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "https://api.commonpaper.com/v1/agreement_statuses", nil) if err != nil { fmt.Print(err) } req.Header.Add("Authorization", "") res, err := client.Do(req) if err != nil { fmt.Print(err) } defer res.Body.Close() bodyText, err := io.ReadAll(res.Body) if err != nil { fmt.Print(err) } fmt.Print(string(bodyText)) } ``` -------------------------------- ### List Agreement Statuses using Python Source: https://api.commonpaper.com/docs/api/agreement-statuses This Python code snippet shows how to get agreement statuses by making a GET request to the Common Paper API. It includes setting the Authorization header. ```python import requests url = "https://api.commonpaper.com/v1/agreement_statuses" headers = { "Authorization": "" } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### GET /agreements Source: https://api.commonpaper.com/docs/pagination Retrieve a paginated list of agreements using page number and page size parameters. ```APIDOC ## GET /agreements ### Description Retrieves a list of agreements with support for pagination using the page namespace. ### Method GET ### Endpoint /agreements ### Parameters #### Query Parameters - **page[number]** (Integer) - Optional - The page number to retrieve. Must be greater than 0. Default is 1. - **page[size]** (Integer) - Optional - The number of records to return per page. Default is 30. ### Request Example GET /agreements?page[number]=1&page[size]=2 ``` -------------------------------- ### List Agreement History (cURL) Source: https://api.commonpaper.com/docs/api/agreement-history Use this cURL command to make a GET request to the /v1/agreement_history endpoint. Ensure you replace '' with your actual authorization token. ```shell curl --request GET \ --url https://api.commonpaper.com/v1/agreement_history \ --header 'Authorization: ' ``` -------------------------------- ### Example Response for List Agreement Types Source: https://api.commonpaper.com/docs/api/agreement-types This JSON structure represents a successful response (200 OK) when listing agreement types. It includes details like the agreement type ID, name, and short name. ```json { "data": [ { "id": "NDA", "type": "agreement_type", "attributes": { "name": "Mutual Non-Disclosure Agreement", "short_name": "NDA" } }, { "id": "CSA", "type": "agreement_type", "attributes": { "name": "Cloud Service Agreement", "short_name": "CSA" } }, { "id": "DPA", "type": "agreement_type", "attributes": { "name": "Data Processing Agreement", "short_name": "DPA" } }, { "id": "Design", "type": "agreement_type", "attributes": { "name": "Design Partner Agreement", "short_name": "Design" } }, { "id": "PSA", "type": "agreement_type", "attributes": { "name": "Professional Services Agreement", "short_name": "PSA" } } ] } ``` -------------------------------- ### GET /v1/templates Source: https://api.commonpaper.com/docs/api/templates Retrieves a list of all agreement templates created within Common Paper. ```APIDOC ## GET /v1/templates ### Description This endpoint returns a list of agreement templates that have been created within Common Paper, and their attributes. ### Method GET ### Endpoint https://api.commonpaper.com/v1/templates ### Parameters #### Headers - **Authorization** (string) - Required - The API key in the format 'Bearer YOUR_KEY_HERE'. ### Response #### Success Response (200) - **data** (object[]) - A list of template objects. #### Response Example { "data": [ { "id": "00000000-0000-0000-0000-000000000000", "type": "template_nda", "attributes": { "name": "Standard NDA", "agreement_type": "nda", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }, "standard_version": "1.0" } ] } ``` -------------------------------- ### Example Response for Agreement History Source: https://api.commonpaper.com/docs/api/agreement-history This JSON object represents a successful response containing an array of agreement history entries. Each entry details an action performed on an agreement, including user, status, and timestamps. ```json { "data": [ { "id": "AGREEMENT_HISTORY_UUID_1", "type": "agreement_history", "attributes": { "id": "AGREEMENT_HISTORY_UUID_1", "description": "Ben Garvey (ben@example.com) sent the agreement to Benjamin Garvey (ben@bengarvey.com)", "status": "sent_waiting_for_initial_review", "action": "sent", "created_at": "2022-05-19T23:04:45.138Z", "agreement_id": "AGREEMENT_UUID", "user_id": "USER_UUID_1" } }, { "id": "AGREEMENT_HISTORY_UUID_2", "type": "agreement_history", "attributes": { "id": "AGREEMENT_HISTORY_UUID_2", "description": "Benjamin Garvey (ben@bengarvey.com) viewed the agreement.", "status": "sent_waiting_for_initial_review", "action": "viewed", "created_at": "2023-03-27T03:22:17.208Z", "agreement_id": "AGREEMENT_UUID", "user_id": "USER_UUID_2" } }, { "id": "AGREEMENT_HISTORY_UUID_3", "type": "agreement_history", "attributes": { "id": "AGREEMENT_HISTORY_UUID_3", "description": "Benjamin Garvey (ben@bengarvey.com) proposed changes to the agreement.", "status": "sent_waiting_for_sender_review", "action": "proposed changes", "created_at": "2023-03-27T03:22:40.270Z", "agreement_id": "AGREEMENT_UUID", "user_id": "USER_UUID_2" } } ] } ``` -------------------------------- ### Get Specific Template Details Source: https://api.commonpaper.com/docs/api/templates Retrieve the detailed information for a single agreement template by providing its unique UUID. The Authorization header is required for authentication. ```shell curl --request GET \ --url https://api.commonpaper.com/v1/templates/:id \ --header 'Authorization: ' ``` -------------------------------- ### GET /v1/templates/{id} Source: https://api.commonpaper.com/docs/api/templates Retrieves the details of a specific agreement template by its UUID. ```APIDOC ## GET /v1/templates/{id} ### Description This endpoint returns the details of a specific agreement template within Common Paper by providing its uuid. ### Method GET ### Endpoint https://api.commonpaper.com/v1/templates/{id} ### Parameters #### Path Parameters - **id** (string/uuid) - Required - The UUID of the template resource. #### Headers - **Authorization** (string) - Required - The API key in the format 'Bearer YOUR_KEY_HERE'. ### Response #### Success Response (200) - **data** (object[]) - The details of the requested template. #### Response Example { "data": [ { "id": "00000000-0000-0000-0000-000000000000", "type": "template_nda", "attributes": { "name": "Standard NDA", "agreement_type": "nda", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }, "standard_version": "1.0" } ] } ``` -------------------------------- ### List Agreement Statuses using Objective-C Source: https://api.commonpaper.com/docs/api/agreement-statuses Objective-C code for fetching agreement statuses. This snippet uses `URLSession` to make the GET request and includes the necessary Authorization header. ```objectivec #import int main(int argc, const char * argv[]) { @autoreleasepool { NSURL *url = [NSURL URLWithString:@"https://api.commonpaper.com/v1/agreement_statuses"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@"GET"]; [request setValue:@"" forHTTPHeaderField:@"Authorization"]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSString *jsonString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSLog(@"%@", jsonString); } }]; [dataTask resume]; } return 0; } ``` -------------------------------- ### List Agreement Statuses using Ruby Source: https://api.commonpaper.com/docs/api/agreement-statuses Ruby code to fetch agreement statuses. This snippet uses the `Net::HTTP` library to make a GET request and includes the Authorization header. ```ruby require 'uri' require 'net/http' uri = URI.parse("https://api.commonpaper.com/v1/agreement_statuses") request = Net::HTTP::Get.new(uri) request["Authorization"] = "" response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request) end puts response.body ``` -------------------------------- ### Get Agreement by ID (cURL) Source: https://api.commonpaper.com/docs/api/agreements Use this cURL command to retrieve a specific agreement by its ID. Ensure you replace ':id' with the actual agreement ID and provide your API key in the Authorization header. ```shell curl --request GET \ --url https://api.commonpaper.com/v1/agreements/:id \ --header 'Authorization: ' ``` -------------------------------- ### List All Templates Source: https://api.commonpaper.com/docs/api/templates Use this endpoint to retrieve a list of all agreement templates. Ensure you include the Authorization header with your API key. ```shell curl --request GET \ --url https://api.commonpaper.com/v1/templates \ --header 'Authorization: ' ``` -------------------------------- ### Create Discount Fees Source: https://api.commonpaper.com/docs/fees Discounts can be fixed amounts or percentages with varying durations. Requires description, cost, discount_type, and discount_duration_type. ```curl curl -X POST "https://api.commonpaper.com/v1/agreements" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "TEMPLATE_ID", "owner_email": "OWNER_EMAIL", "signer_email": "SIGNER_EMAIL", "agreement": { "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "Early adopter discount", "type": "Fees::Discount", "cost": 10000, "discount_type": "fixed_amount", "discount_duration_type": "forever" } } } } }' ``` ```curl curl -X POST "https://api.commonpaper.com/v1/agreements" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "TEMPLATE_ID", "owner_email": "OWNER_EMAIL", "signer_email": "SIGNER_EMAIL", "agreement": { "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "Promotional discount", "type": "Fees::Discount", "cost": 15, "discount_type": "percentage", "discount_duration_type": "multiple_months", "discount_duration_amount": 6 } } } } }' ``` ```curl curl -X POST "https://api.commonpaper.com/v1/agreements" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "TEMPLATE_ID", "owner_email": "OWNER_EMAIL", "signer_email": "SIGNER_EMAIL", "agreement": { "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "One-time setup discount", "type": "Fees::Discount", "cost": 5000, "discount_type": "fixed_amount", "discount_duration_type": "once" } } } } }' ``` -------------------------------- ### Get MCP Endpoint using cURL Source: https://api.commonpaper.com/docs/api/~endpoints Use this cURL command to make a GET request to the MCP endpoint. Ensure you replace the placeholder with your actual API key. ```shell curl --request GET \ --url https://api.commonpaper.com/mcp \ --header 'Authorization: ' ``` -------------------------------- ### Create an agreement with Fees::Included Source: https://api.commonpaper.com/docs/fees Defines an included or free item. Requires a description and optionally accepts a quantity. ```curl curl -X POST "https://api.commonpaper.com/v1/agreements" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "TEMPLATE_ID", "owner_email": "OWNER_EMAIL", "signer_email": "SIGNER_EMAIL", "agreement": { "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "Basic support included", "type": "Fees::Included", "quantity": 1 } } } } }' ``` -------------------------------- ### POST /v1/agreements Source: https://api.commonpaper.com/docs/fees Create a new agreement with specific fee configurations. ```APIDOC ## POST /v1/agreements ### Description Creates a new agreement. The request body supports various fee types under the csa_order_form_attributes. ### Method POST ### Endpoint https://api.commonpaper.com/v1/agreements ### Request Body - **template_id** (string) - Required - The ID of the template to use. - **owner_email** (string) - Required - Email of the agreement owner. - **signer_email** (string) - Required - Email of the signer. - **agreement** (object) - Required - The agreement details containing csa_order_form_attributes. ### Request Example { "template_id": "TEMPLATE_ID", "owner_email": "OWNER_EMAIL", "signer_email": "SIGNER_EMAIL", "agreement": { "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "Fee description", "type": "Fees::Type" } } } } } ``` -------------------------------- ### Configure MCP Server for Cursor Source: https://api.commonpaper.com/docs/api/~endpoints Add this JSON configuration to your `~/.cursor/mcp.json` file to set up the CommonPaper MCP server for Cursor. Replace the placeholder with your API key. ```json { "mcpServers": { "commonpaper": { "url": "https://api.commonpaper.com/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } ``` -------------------------------- ### GET /v1/agreements/{id} Source: https://api.commonpaper.com/docs/api/agreements Retrieves the details of a specific agreement by its UUID. ```APIDOC ## GET /v1/agreements/{id} ### Description Retrieves a specific agreement from Common Paper by providing its UUID. ### Method GET ### Endpoint /v1/agreements/{id} ### Parameters #### Path Parameters - **id** (string, uuid) - Required - The UUID of the resource. ``` -------------------------------- ### GET /v1/agreements/{id} Source: https://api.commonpaper.com/docs/api/agreements Retrieves the details of a specific agreement by its unique identifier. ```APIDOC ## GET /v1/agreements/{id} ### Description Retrieves the details of a specific agreement by its unique identifier. ### Method GET ### Endpoint https://api.commonpaper.com/v1/agreements/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the agreement. ### Request Example curl --request GET \ --url https://api.commonpaper.com/v1/agreements/:id \ --header 'Authorization: ' ### Response #### Success Response (200) - **data** (object) - The agreement object containing attributes and metadata. #### Response Example { "data": { "id": "AGREEMENT_UUID", "type": "agreement", "attributes": { "purpose": "Evaluating whether to enter into a business relationship with the other party.", "status": "sent_waiting_for_initial_review", "agreement_type": "NDA" } } } ``` -------------------------------- ### GET /v1/agreements/{id}/shareable_link Source: https://api.commonpaper.com/docs/api/agreements Retrieves a shareable link for a specific agreement by its ID. ```APIDOC ## GET /v1/agreements/{id}/shareable_link ### Description Retrieves a shareable link for a specific agreement. ### Method GET ### Endpoint /v1/agreements/{id}/shareable_link ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the agreement. ### Request Example curl --request GET \ --url https://api.commonpaper.com/v1/agreements/:id/shareable_link \ --header 'Authorization: ' ### Response #### Success Response (200) - **link** (string) - The URL for the agreement review page. #### Response Example { "link": "https://app.commonpaper.com/agreements/:agreement_id/review?token=:token" } ``` -------------------------------- ### Create an agreement with Fees::Text Source: https://api.commonpaper.com/docs/fees Defines a fee using free-form text. Requires a description field. ```curl curl -X POST "https://api.commonpaper.com/v1/agreements" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "TEMPLATE_ID", "owner_email": "OWNER_EMAIL", "signer_email": "SIGNER_EMAIL", "agreement": { "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "Custom pricing: Contact sales for enterprise pricing", "type": "Fees::Text" } } } } }' ``` -------------------------------- ### GET /v1/agreement_types Source: https://api.commonpaper.com/docs/api/agreement-types Retrieves a list of all agreement types available in the Common Paper organization. ```APIDOC ## GET /v1/agreement_types ### Description This endpoint returns a list of all agreement types within Common Paper, including any custom types you defined in your organization. ### Method GET ### Endpoint https://api.commonpaper.com/v1/agreement_types ### Parameters #### Headers - **Authorization** (string) - Required - The API key used for authentication. Format: `Bearer YOUR_KEY_HERE`. ### Request Example ```bash curl --request GET \ --url https://api.commonpaper.com/v1/agreement_types \ --header 'Authorization: ' ``` ### Response #### Success Response (200) - **data** (array) - A list of agreement type objects. #### Response Example ```json { "data": [ { "id": "NDA", "type": "agreement_type", "attributes": { "name": "Mutual Non-Disclosure Agreement", "short_name": "NDA" } }, { "id": "CSA", "type": "agreement_type", "attributes": { "name": "Cloud Service Agreement", "short_name": "CSA" } } ] } ``` ``` -------------------------------- ### Get User API Request Source: https://api.commonpaper.com/docs/api/users Retrieves profile information for a specific user by their UUID. ```shell curl --request GET \ --url https://api.commonpaper.com/v1/users/:id \ --header 'Authorization: ' ``` -------------------------------- ### Get Agreement History Request Source: https://api.commonpaper.com/docs/api/agreement-history Retrieves the event history for a specific agreement using its UUID. ```shell curl --request GET \ --url https://api.commonpaper.com/v1/agreements/:id/history \ --header 'Authorization: ' ``` -------------------------------- ### List Agreement Types Source: https://api.commonpaper.com/docs/api/agreement-types Use this endpoint to retrieve a list of all available agreement types, including custom ones. Authentication is required via an Authorization header. ```shell curl --request GET \n --url https://api.commonpaper.com/v1/agreement_types \n --header 'Authorization: ' ```