Skip to main content
This guide walks you through authenticating, listing workflows, and creating your first request via the API.

Prerequisites

  • A SimpleDocs account with API credentials (client_id and client_secret)
  • At least one published workflow in your company
  • curl (or any HTTP client)

1. Get an access token

curl -X POST https://app.simpledocs.com/api/oauth/token \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "scope=read write"
Save the access_token from the response — you’ll use it in every subsequent call.

2. List your workflows

Fetch the available workflows to find the one you want to create a request for:
curl https://app.simpledocs.com/api/v1/workflows?status=published \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "data": [
    {
      "id": "k9Xp2m",
      "type": "workflow",
      "attributes": {
        "name": "Vendor Agreement",
        "description": "Standard agreement for new vendor onboarding",
        "status": "published"
      }
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 25,
    "total_pages": 1,
    "total_count": 1
  }
}
Note the workflow id — you’ll need it in the next steps.

3. Get the workflow schema

Before creating a request, check which fields and variables the workflow requires:
curl https://app.simpledocs.com/api/v1/workflows/k9Xp2m/schema \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "name": "Vendor Agreement",
  "description": "Standard agreement for new vendor onboarding",
  "required_fields": [
    "workflow_id",
    "requester_email",
    "counterparty_name",
    "counterparty_email",
    "counterparty_organization_name"
  ],
  "required_variables": ["scope_of_work"],
  "variables_properties": {
    "scope_of_work": {
      "required": true,
      "properties": {
        "type": "string",
        "suggestions": ["Cloud infrastructure services", "Marketing and branding"]
      }
    },
    "duration": {
      "required": false,
      "properties": { "type": "number" }
    },
    "duration_unit": {
      "required": false,
      "properties": { "type": "string", "options": ["year", "month"] }
    }
  }
}

4. Create a request

Now submit a request using the required fields and variables from the schema:
curl -X POST https://app.simpledocs.com/api/v1/requests \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -F "workflow_id=k9Xp2m" \
  -F "[email protected]" \
  -F "counterparty_name=John Smith" \
  -F "[email protected]" \
  -F "counterparty_organization_name=Acme Corp" \
  -F 'variables={"scope_of_work":"Cloud infrastructure services","duration":2,"duration_unit":"year"}'
{
  "data": {
    "id": "mN3kYq",
    "type": "legal_request",
    "attributes": {
      "name": "Vendor Agreement — Acme Corp",
      "description": null,
      "status": "initial_review"
    }
  }
}

5. Check the request status

Poll the request to track its progress:
curl https://app.simpledocs.com/api/v1/requests/mN3kYq \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Or view the activity log:
curl https://app.simpledocs.com/api/v1/requests/mN3kYq/activity \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Next steps