API Reference

GraphQL

GraphQL is a query language for APIs. GraphQL provides a complete and understandable description of the data in an API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

Learn more about GraphQL

Access

To access the Edgewise API, you'll need an access token, which you can generate from your profile (Account > API Access Tokens). Make sure to write down the access token when it is created, as we do not store it, and you will not be able to retrieve it again.

Authentication

All requests go to a single API endpoint: https://api.edgewise.io/graphql

You need to include the Authorization header, with a Bearer [your access token] value.

Usage

To use the GraphQL API, you can send a POST request to the API endpoint with a JSON body containing the query. All requests must be made over HTTPS using POST.

Here are some examples:

# curl: example using viewer query

curl -X POST https://api.edgewise.io/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer [your access token]" \
  -d '{"query": "query Viewer { viewer { id fullName } }"}'
// javascript: example using Leads query with variables

const query = `
  query Leads($filters: LeadsFilter, $first: Int) {
    leads(filter: $filters, first: $first) {
      id
      name
      email
      phone
      status
    }
  }
`

const variables = {
  filters: {
    status: ['NEW'],
  },
  first: 10,
}

fetch('https://api.edgewise.io/graphql', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [your access token]'
  },
  body: JSON.stringify({ query, variables }),
})
  .then(async (response) => {
    const responseJson = await response.json()
  })

Queries

appointmentAppointment

Get an appointment by ID.

buyerBuyer

Get a Buyer by ID.

customExportCustomExport

Get a custom export by ID.

customReportCustomReport

Get a custom report by ID.

eventEvent

Get an event by ID.

leadLead

Get a Lead by ID.

nearestCityNearestCity

Uses the IP address of the viewer to determine the closest city Edgewise operates in.

organizationOrganization

Get an organization by ID. Slug can be used as ID.

organizationIntegrationOrganizationIntegration

Get an organization integration by ID.

organizationIntegrationApps[IntegrationApp]

List all available organization integration apps.

projectProject

Get a Project by ID. The project's slug can be used as the ID.

projects[Project]

Returns all affiliated projects. Default is to sort by last updated.

publicProjectProject

DEPRECATED. Use project query.

publicProjects[Project]

Returns public projects. Default is to return all projects, sorted by Edgewise Index. You can filter by city, as well as change the sort order. Some fields are permission restricted, and will return null if you (the viewer) do not have permission.

recentlySoldUnits[Unit]

Returns last 50 sold units.

reservationReservation

Get a reservation by ID.

unitUnit

Get a Unit by ID.

userUser

Get a User by ID. The User's slug can be used as the ID.

userIntegrationApps[IntegrationApp]

List all available user integration apps.

viewerUser

The user associated with the authentication token.

Mutations

contactEdgewiseBoolean

Contact Edgewise.

contactOrganizationOrganization

Contact an organization. Messages are forwarded via email.

contactProjectProjectContactMessage

Contact a project's sales office. This will create a lead, or merge (based on the email address).

convertLeadBuyer

Convert a lead into a buyer.

createAccessTokenAccessToken

Create a long-lived API access token.

createAccountUser

Create a new user account.

createAgreementAgreement

Create a lead or buyer agreement.

createAppointmentAppointment

Create a lead or buyer appointment.

createBuyerBuyer

Create a buyer.

createContactContact

Create a lead or buyer contact.

createDepositDeposit

Create a lead or buyer deposit.

createFloorPlanFloorPlan

Create a project floor plan.

createLeadLead

Create a project lead. Note: this will not notify the sales team.

createLeadNoteLeadNote

Create a lead note. This will not notify anyone subscribed to lead note notifications.

createLeadSourceLeadSource

Create a project lead source.

createLeasePermitLeasePermit

Create a project lease permit.

createLotLot

Create a project lot.

createNegotiationNegotiation

Create the unit negotiation. Buyers cannot place an offer without having a base negotiation to assign to.

createOfferOffer

Create a negotiation offer / counter-offer.

createOfferResponseOfferResponse

Accept or reject a negotiation offer. Responses are final.

createOpenHouseOpenHouse

Create a project open house.

createOrganizationOrganization

Create an organization.

createOrganizationInviteOrganizationInvite

Create an organization invite.

createOrganizationPaymentsRepresentativeOrganizationPaymentsRepresentative

Create an organization respresentative. Necessary for enabling payments.

createPersonalizationPersonalization

Create a new personalization. Personalizations are option and upgrade selections for a unit.

createPersonalizationCreditPersonalizationCredit

Create a personalization credit (eg. "Construction delay"). For percentages (eg. "10% off"), use a personalization discount.

createPersonalizationDiscountPersonalizationDiscount

Create a personalization discount (eg. "10% off"). For dollar amounts (eg. "Construction delay"), use a personalization credit.

createPhoneCallPhoneCall

Create a lead or buyer phone call.

createProjectProject

Create a new project.

createProjectCollectionProjectCollection

Create a project collection.

createProjectTestimonialProjectTestimonial

Create a project open house.

createPromotionPromotion

Create a project promotion.

createReservationReservation

Create a reservation. This does not charge the user.

createSpecCategorySpecCategory

Create a spec category (eg. "Kitchen").

createSpecElementSpecElement

Create a spec element (eg. "Appliances").

createSpecOptionSpecOption

Create a spec option (eg. "Standard" or "Upgrades").

createStripeCardStripeCard

Create a Stripe card.

createStripeChargeStripeCharge

Create a Stripe charge. Currently, a user can only charge themselves.

Use createPaymentIntent instead.

createTaskTask

Create a new task.

createTrackerTracker

Create a tracker.

createUnitUnit

Create a project unit.

createUserOtpBoolean

Create a one-time-password (OTP) that can be used for reseting a user's password. This will send an email with a unique token that the user can use to create a new password. For security reasons, this always returns true.

createWebhookWebhook

Create an organization webhook.

deleteElevationImageDeleteElevationImagePayload

Delete a floor plan elevation image.

deleteFloorPlanDeleteFloorPlanPayload

Delete a project floor plan.

deleteLeadSourceDeleteLeadSourcePayload

Delete a project lead source.

deleteLeasePermitDeleteLeasePermitPayload

Delete a project lease permit.

deleteLotDeleteLotPayload

Delete a project lot.

deleteOpenHouseDeleteOpenHousePayload

Delete a project open house.

deleteOrganizationAvatarDeleteOrganizationAvatarPayload

Delete an Organization's avatar image. You must have the OWNER role on the Organization.

deleteProjectAvatarDeleteProjectAvatarPayload

Delete a Project's avatar image.

deletePromotionDeletePromotionPayload

Delete a project promotion.

deleteSitePlanDeleteSitePlanPayload

Delete a project's site plan.

deleteUnitDeleteUnitPayload

Delete a project unit.

deleteWebhookDeleteWebhookPayload

Delete an organization webhook.

exportPlansExport

Use exportFloorPlans instead.

importBuyersImportBuyersPayload

Import project buyers via CSV.

importUnitsImportUnitsPayload

Import project units via CSV.

inviteBuyerBoolean

Invite a buyer to Edgewise.

loginAuthentication

Swap username and password for an authentication token. Note: token expires after 30 days. If you need a longer expiration (eg. for long-running API access), create an AccessToken (which has the benefit of being revokable).

removeOrganizationMemberRemoveOrganizationMemberPayload

Remove a member from an Organization. You must have the OWNER role on the Organization.

resetPasswordUser

Reset a user's password. Requires a one-time-password token.

updateAppointmentAppointment

Update an appointment.

updateBuyerBuyer

Update a buyer.

updateContactContact

Update an contact.

updateCustomExportCustomExport

Update a custom export.

updateElevationImageFloorPlanElevationImage

Update a floor plan elevation image.

updateFloorPlanFloorPlan

Update a project floor plan.

updateFloorPlanImageFloorPlanImage

Update a floor plan image.

updateLeadLead

Update a lead.

updateLeadSourceLeadSource

Update a project lead source.

updateLeasePermitLeasePermit

Update a project lease permit.

updateLotLot

Update a project lot.

updateLotImageLotImage

Update a lot image.

updateNegotiationNegotiation

Update a negotiation. Note: the negotiation status will be automatically set for accepted, rejected, and expired offers.

updateOpenHouseOpenHouse

Update a project open house.

updateOrganizationOrganization

Update an organization.

updateOrganizationMemberRoleOrganizationUserConnection

Update a member's role. You must have the OWNER role on the Organization to modify another member's role.

updateOrganizationNotificationsUserOrganizationConnection

Update your notifications for organizations for which you are a member.

updatePasswordUser

Update the currently authenticated user's password.

updatePhoneCallPhoneCall

Update an phone call.

updateProjectProject

Update a project.

updateProjectCollectionProjectCollection

Update a project collection.

updateProjectTestimonialProjectTestimonial

Update a project testimonial.

updatePromotionPromotion

Update a project promotion.

updateReservationReservation

Update a reservation. If the status is changed to REFUNDED, then the buyer assignment is removed, and the associated lot or unit will be marked as AVAILABLE at the originally listed price. Note: marking a reservation as REFUNDED does not automatically refund associated charges. Charges can be refunded using refundStripeCharge.

updateSalesOfficeSalesOffice

Update a project's sales office.

updateTaskTask

Update a task.

updateUnitUnit

Update a project unit.

updateUnitImageUnitImage

Update a unit image.

updateUnits[Unit]

Update many project units.

updateUserUser

Update a user. Users can only update themselves.

uploadElevationImageFloorPlanElevationImage

Upload a floor plan elevation image. File size max is 5MB.

uploadFloorPlanDocumentFloorPlanDocument

Upload a floor plan document. File size max is 50MB.

uploadFloorPlanDrawingFloorPlanDrawing

Upload a floor plan drawing. File size max is 5MB.

uploadFloorPlanImageFloorPlanImage

Upload a floor plan image. File size max is 5MB.

uploadLotImageLotImage

Upload a lot image. File size max is 5MB.

uploadOrganizationAvatarOrganizationAvatar

Upload an Organization's avatar image. File size max is 5MB. You must have the OWNER role on the Organization.

uploadProjectAvatarProjectAvatar

Upload a Project's avatar image. File size max is 5MB.

uploadProjectDocumentProjectDocument

Upload a project document. File size max is 50MB.

uploadProjectImageProjectImage

Upload a project image. File size max is 5MB.

uploadReservationDocumentReservationDocument

Upload a reservation document. File size max is 50MB.

uploadSitePlanSitePlan

Upload a project's site plan. File size max is 5MB.

uploadUnitImageUnitImage

Upload a unit image. File size max is 5MB.