Skip to main content
Workflows define the structure of a legal process — who signs, what variables are required, and what document is used. Before creating a request, you need to find a published workflow and understand what it expects.

Listing workflows

Use the List workflows endpoint to retrieve all workflows for your company:
curl https://app.simpledocs.com/api/v1/workflows \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "data": [
    {
      "id": "k9Xp2m",
      "type": "workflow",
      "attributes": {
        "name": "NDA — Mutual",
        "description": "Mutual non-disclosure agreement for partnerships",
        "status": "published",
        "type": "generated"
      }
    },
    {
      "id": "rT7vWx",
      "type": "workflow",
      "attributes": {
        "name": "Vendor Agreement",
        "description": "Standard agreement for new vendor onboarding",
        "status": "published",
        "type": "generated"
      }
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 25,
    "total_pages": 1,
    "total_count": 2
  }
}
You can filter to only published workflows by adding ?status=published:
curl "https://app.simpledocs.com/api/v1/workflows?status=published" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Getting a workflow’s schema

Before creating a request, fetch the workflow schema to discover exactly which fields and variables are required. Use the Get workflow schema endpoint:
curl https://app.simpledocs.com/api/v1/workflows/k9Xp2m/schema \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "name": "NDA — Mutual",
  "description": "Mutual non-disclosure agreement for partnerships",
  "required_fields": [
    "workflow_id",
    "requester_email",
    "counterparty_name",
    "counterparty_email",
    "counterparty_organization_name",
    "internal_signer_email"
  ],
  "optional_fields": [
    "support_documents[]",
    "merge_documents_into_pdf"
  ],
  "required_variables": ["purpose"],
  "fields_properties": {
    "workflow_id": {
      "required": true,
      "properties": { "type": "string" }
    },
    "requester_email": {
      "required": true,
      "properties": { "type": "string" }
    },
    "counterparty_name": {
      "required": true,
      "properties": { "type": "string" }
    },
    "counterparty_email": {
      "required": true,
      "properties": { "type": "string" }
    },
    "counterparty_organization_name": {
      "required": true,
      "properties": { "type": "string" }
    },
    "support_documents[]": {
      "required": false,
      "properties": { "type": "file" }
    },
    "internal_signer_email": {
      "required": true,
      "properties": {
        "type": "string",
        "options": ["[email protected]", "[email protected]"]
      }
    },
    "merge_documents_into_pdf": {
      "required": false,
      "properties": { "type": "boolean" }
    }
  },
  "variables_properties": {
    "purpose": {
      "required": true,
      "properties": {
        "type": "string"
      }
    },
    "duration": {
      "required": false,
      "properties": {
        "type": "integer"
      }
    },
    "duration_unit": {
      "required": false,
      "properties": {
        "type": "string",
        "options": ["month", "year"]
      }
    }
  }
}

Multi-signer workflows

When a workflow supports multiple internal signers, internal_signer_emails[] replaces internal_signer_email in the schema. It appears in required_fields and accepts an ordered array of signer emails.
{
  "required_fields": [
    "workflow_id",
    "requester_email",
    "counterparty_name",
    "counterparty_email",
    "counterparty_organization_name",
    "internal_signer_emails[]"
  ],
  "optional_fields": ["support_documents[]", "merge_documents_into_pdf"],
  "fields_properties": {
    "internal_signer_emails[]": {
      "required": true,
      "properties": {
        "type": "array",
        "options": ["[email protected]", "[email protected]", "[email protected]"]
      }
    }
  }
}
Check options for the list of valid signer emails before creating a request.

Reading the schema

FieldDescription
required_fieldsTop-level fields you must include when calling Create request.
optional_fieldsOptional top-level fields the workflow accepts.
required_variablesKeys that must appear inside the variables object.
fields_propertiesType information for each top-level field.
variables_propertiesType information and available options for each variable.
Use this schema to build the correct Create request payload. See the Requests guide for a full example.