Skip to main content
Create a request
curl --request POST \
  --url https://app.simpledocs.com/api/v1/requests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'workflow_id=<string>' \
  --form [email protected] \
  --form 'counterparty_name=<string>' \
  --form [email protected] \
  --form 'counterparty_organization_name=<string>' \
  --form file='@example-file' \
  --form 'variables={
  "purpose": "To agree on confidential",
  "duration_unit": "year",
  "duration": 2
}'
import requests

url = "https://app.simpledocs.com/api/v1/requests"

files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
    "workflow_id": "<string>",
    "requester_email": "[email protected]",
    "counterparty_name": "<string>",
    "counterparty_email": "[email protected]",
    "counterparty_organization_name": "<string>",
    "variables": "{
  \"purpose\": \"To agree on confidential\",
  \"duration_unit\": \"year\",
  \"duration\": 2
}"
}
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
const form = new FormData();
form.append('workflow_id', '<string>');
form.append('requester_email', '[email protected]');
form.append('counterparty_name', '<string>');
form.append('counterparty_email', '[email protected]');
form.append('counterparty_organization_name', '<string>');
form.append('file', '<string>');
form.append('variables', '{
  "purpose": "To agree on confidential",
  "duration_unit": "year",
  "duration": 2
}');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

fetch('https://app.simpledocs.com/api/v1/requests', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{ "data": { "id": "mN3kYq", "type": "legal_request", "attributes": { "name": "Vendor Agreement — Acme Corp", "description": "<string>", "status": "initial_review" } } }

Authorizations

Authorization
string
header
required

Obtain a Bearer token via the Create access token endpoint using the OAuth2 client credentials flow.

Body

multipart/form-data
workflow_id
string
required

The hash ID of the published workflow to use.

requester_email
string<email>
required

Email of an existing user in your company who is making the request.

counterparty_name
string

Name of the counterparty signer. Required by some workflow types — check the workflow schema.

counterparty_email
string<email>

Email of the counterparty signer. Required by some workflow types — check the workflow schema.

counterparty_organization_name
string

Name of the counterparty's organization. Required by some workflow types — check the workflow schema.

file
file

The document file to use. Required by workflows that accept a third-party document — check the workflow schema.

variables
object

A JSON object containing the workflow variable values. Use the workflow schema endpoint to discover required and optional variables.

Example:
{
  "purpose": "To agree on confidential",
  "duration_unit": "year",
  "duration": 2
}

Response

Request created successfully.

data
object