---
updatedAt: 2026-05-14T14:32:15.000Z
agentTools:
  projectIndex: https://docs.oysterhr.com/v0.1/llms.txt
---

# Create a document request for an engagement

Creates a self-service document request for an engagement with a given engagement ID and document request type. startDate, endDate, destinationCountry, and passportNumber are required when document type is employment_verification_visa.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Endpoints",
    "version": "v0.1"
  },
  "components": {
    "securitySchemes": {
      "bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "documentRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "EMPLOYMENT_VERIFICATION_VISA",
              "EMPLOYMENT_VERIFICATION_MORTGAGE",
              "PAST_EMPLOYMENT_VERIFICATION",
              "PAST_EMPLOYMENT_VERIFICATION_WITH_SALARY"
            ]
          },
          "url": {
            "type": "string",
            "nullable": true,
            "format": "uri"
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "REQUESTED",
              "READY"
            ]
          },
          "payload": {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date"
              },
              "endDate": {
                "type": "string",
                "format": "date"
              },
              "destinationCountry": {
                "type": "string"
              },
              "passportNumber": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "url",
          "contentType",
          "status",
          "payload"
        ]
      }
    }
  },
  "paths": {
    "/v0.1/engagements/{id}/document_requests/{document_request_type}": {
      "post": {
        "summary": "Create a document request for an engagement",
        "tags": [
          "Engagements"
        ],
        "description": "Creates a self-service document request for an engagement with a given engagement ID and document request type. startDate, endDate, destinationCountry, and passportNumber are required when document type is employment_verification_visa.",
        "security": [
          {
            "bearer_auth": [
              "manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Engagement ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_request_type",
            "in": "path",
            "description": "Document request type, one of: employment_verification_visa, employment_verification_mortgage, past_employment_verification_with_salary.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully creates a document request",
            "content": {
              "application/json": {
                "examples": {
                  "Successfully creates a document request": {
                    "value": {
                      "data": {
                        "id": "Aa2fc3a8",
                        "type": "EMPLOYMENT_VERIFICATION_MORTGAGE",
                        "url": null,
                        "contentType": null,
                        "status": "REQUESTED",
                        "payload": {}
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/documentRequest"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "examples": {
                  "Bad request": {
                    "value": {
                      "errors": [
                        {
                          "field": "startDate",
                          "message": "Start date is missing"
                        },
                        {
                          "field": "endDate",
                          "message": "End date is missing"
                        },
                        {
                          "field": "destinationCountry",
                          "message": "Destination country is missing"
                        },
                        {
                          "field": "passportNumber",
                          "message": "Passport number is missing"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Operation cannot be performed",
            "content": {
              "application/json": {
                "examples": {
                  "Operation cannot be performed": {
                    "value": {
                      "errors": [
                        {
                          "message": "Self service request of the document is not supported for this engagement. Please contact Support."
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "destinationCountry": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "passportNumber": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.oysterhr.com",
      "description": "Production server"
    },
    {
      "url": "https://api-sandbox.oysterhr.com",
      "description": "Sandbox server"
    }
  ]
}
```