engagementCreate mutation. This allows you to submit
a new real estate legal file to Ownright for either a purchase or refinance transaction.
Understanding @oneOf
The EngagementCreateInput uses the @oneOf directive, which means you must provide
exactly one of the type-specific inputs:
purchase— for a purchase engagementrefinance— for a refinance engagement
Steps to create an engagement
1
Choose the engagement type
Decide whether you’re creating a purchase or refinance engagement. This
determines which input field you’ll use:
Both input types share the same set of fields:
clients, closingDate, owner,
newMortgageFileIds, newMortgageNumber, notes, and propertyAddress.2
Gather the required information
Before constructing the mutation, make sure you have:
- Owner — A
TeamMemberGIDfor the team member who will own this engagement. See Lender and team members for how to fetch these. - At least one client — Each client needs a
firstName,lastName, andemail. Phone number and middle name are optional. - Closing date — The expected closing date in ISO 8601 format (e.g.,
2025-09-15). - Mortgage files (if any) — Upload documents first using the
staged file upload flow, then pass the
resulting
FileRecordGIDvalues.
3
Construct and send the mutation
Here’s a complete example for creating a purchase engagement:Variables:
Request
Variables
To create a refinance engagement instead, use the
refinance key in the input
with a RefinanceEngagementCreateInput. The fields are identical.4
Handle the response
On success, the response includes the newly created engagement:If something goes wrong, check the
Successful response
userErrors array:Error response
Error codes
TheengagementCreate mutation can return the following error codes:
Tips
- Always fetch your team members first so you have valid
TeamMemberGIDvalues to assign as owners. - If you need to attach mortgage documents, complete the file upload
flow before calling
engagementCreate. - The
newMortgageFileIdsarray can be empty if you don’t have documents to attach at creation time. - New engagements always start in the Received state.
Next steps
Searching engagements
Filter, sort, and paginate through your engagements.
File uploads
Learn the staged upload flow for attaching mortgage documents.