> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simpledocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a request

> Create a new legal request for a published workflow. The required fields and variables depend on the workflow — use the [Get workflow schema](/api-reference/workflows/get-workflow-schema) endpoint first to discover them.

Some workflows generate an agreement from a template and require counterparty details, while others accept an uploaded document via the `file` field. The schema endpoint tells you exactly which fields and variables are needed.

Requires the `write` scope.



## OpenAPI

````yaml POST /v1/requests
openapi: 3.1.0
info:
  title: SimpleDocs API
  version: 1.0.0
  description: >-
    The SimpleDocs API lets you programmatically manage repository documents,
    workflows, requests, and webhooks.


    All endpoints are scoped to the company associated with your OAuth
    application.


    **Rate limiting:** 600 requests per minute per IP address.


    **Base URL:** `https://app.simpledocs.com/api`
servers:
  - url: https://app.simpledocs.com/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Obtain access tokens via OAuth2 client credentials
  - name: Repository Documents
    description: Upload and manage documents in your repository
  - name: Workflows
    description: List workflows and retrieve their schemas
  - name: Requests
    description: Create and track legal requests
  - name: Webhooks
    description: Register webhooks to receive event notifications
paths:
  /v1/requests:
    post:
      tags:
        - Requests
      summary: Create a request
      description: >-
        Create a new legal request for a published workflow. The required fields
        and variables depend on the workflow — use the [Get workflow
        schema](/api-reference/workflows/get-workflow-schema) endpoint first to
        discover them.


        Some workflows generate an agreement from a template and require
        counterparty details, while others accept an uploaded document via the
        `file` field. The schema endpoint tells you exactly which fields and
        variables are needed.


        Requires the `write` scope.
      operationId: createRequest
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - workflow_id
                - requester_email
              properties:
                workflow_id:
                  type: string
                  description: The hash ID of the published workflow to use.
                requester_email:
                  type: string
                  format: email
                  description: >-
                    Email of an existing user in your company who is making the
                    request.
                counterparty_name:
                  type: string
                  description: >-
                    Name of the counterparty signer. Required by some workflow
                    types — check the workflow schema.
                counterparty_email:
                  type: string
                  format: email
                  description: >-
                    Email of the counterparty signer. Required by some workflow
                    types — check the workflow schema.
                counterparty_organization_name:
                  type: string
                  description: >-
                    Name of the counterparty's organization. Required by some
                    workflow types — check the workflow schema.
                file:
                  type: string
                  format: binary
                  description: >-
                    The document file to use. Required by workflows that accept
                    a third-party document — check the workflow schema.
                variables:
                  type: object
                  description: >-
                    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
      responses:
        '201':
          description: Request created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LegalRequest'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
      security:
        - bearerAuth:
            - write
components:
  schemas:
    LegalRequest:
      type: object
      properties:
        id:
          type: string
          description: Hash ID of the request.
          example: mN3kYq
        type:
          type: string
          example: legal_request
        attributes:
          type: object
          properties:
            name:
              type: string
              example: Vendor Agreement — Acme Corp
            description:
              type: string
              nullable: true
            status:
              type: string
              enum:
                - draft
                - ready_for_send
                - business_review
                - initial_review
                - ongoing_review
                - sent_for_signature
                - changes_proposed
                - signed
                - archived
                - declined
                - canceled
                - expired
              example: initial_review
    RFC9457Error:
      type: object
      description: >-
        Error responses follow [RFC
        9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.
      properties:
        type:
          type: string
          description: A machine-readable error type identifier.
          example: parameter_missing
        status:
          type: integer
          example: 400
        title:
          type: string
          example: Bad Request
        detail:
          type: string
          description: A human-readable explanation of the error.
          example: File or URL is required
        instance:
          type: string
          description: The request path that generated the error.
          example: /api/v1/repository_documents
        request_id:
          type: string
          description: A unique identifier for the request, useful for support.
  responses:
    BadRequest:
      description: The request is malformed or missing required parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RFC9457Error'
          example:
            type: parameter_missing
            status: 400
            title: Bad Request
            detail: File or URL is required
            instance: /api/v1/repository_documents
            request_id: abc-123
    Unauthorized:
      description: The access token is missing, invalid, expired, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RFC9457Error'
          examples:
            expired:
              summary: Token expired
              value:
                type: token_expired
                status: 401
                title: Token Expired
                detail: The access token has expired.
                instance: /api/v1/workflows
                request_id: abc-123
            revoked:
              summary: Token revoked
              value:
                type: token_revoked
                status: 401
                title: Token Revoked
                detail: The access token has been revoked.
                instance: /api/v1/workflows
                request_id: abc-123
            invalid:
              summary: Invalid token
              value:
                type: invalid_token
                status: 401
                title: Invalid Token
                detail: The access token is invalid.
                instance: /api/v1/workflows
                request_id: abc-123
    Forbidden:
      description: The access token does not have the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RFC9457Error'
          example:
            type: insufficient_scope
            status: 403
            title: Forbidden
            detail: The access token does not have the required scope.
            instance: /api/v1/repository_documents
            request_id: abc-123
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RFC9457Error'
          example:
            type: request_not_found
            status: 404
            title: Request not found
            detail: The request you are trying to access does not exist.
            instance: /api/v1/requests/abc123
            request_id: abc-123
    UnprocessableEntity:
      description: The request was well-formed but could not be processed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RFC9457Error'
          example:
            type: repository_document_creation_error
            status: 422
            title: Repository document creation failed
            detail: File type is not supported
            instance: /api/v1/repository_documents
            request_id: abc-123
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Obtain a Bearer token via the [Create access
        token](/api-reference/authentication/create-token) endpoint using the
        OAuth2 client credentials flow.

````