Third-Party Integrations

The Egnyte Public API provides endpoints for managing integrations with third-party applications, including Salesforce and Procore.


Egnyte for Salesforce

The Salesforce API allows you to retrieve Egnyte folder mappings for Salesforce records using the Salesforce record ID. This is useful for customers using the Egnyte for Salesforce integration to programmatically access linked folders.

Note: This API requires the Egnyte.salesforce OAuth scope. See OAuth Scopes for details.

Base URL

https://{domain}.egnyte.com/pubapi/v1/sfdc

Authentication

All requests require an OAuth 2.0 Bearer token in the Authorization header:

Authorization: Bearer {access_token}

See Authentication for details on obtaining a token.


Get Folder Mapping for Salesforce Record

Retrieves the Egnyte folder path and folder ID associated with a Salesforce record.

Request

GET /pubapi/v1/sfdc/foldermap/{salesforce_record_id}

Path Parameters

ParameterTypeRequiredDescription
salesforce_record_idstringYesThe 18-character Salesforce record ID

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/sfdc/foldermap/001d000000HcByGAAV" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK

FieldTypeDescription
pathstringPath to the corresponding Egnyte folder. If the path does not start with /, it is relative to /Shared/Salesforce.com (e.g., Accounts/ABC resolves to /Shared/Salesforce.com/Accounts/ABC)
folder_idstringThe unique identifier of the corresponding Egnyte folder

Example Response

{
  "path": "Accounts/ABC",
  "folder_id": "a74bb119-724a-4264-ad82-62226e2368ea"
}

Error Codes

StatusErrorDescriptionResolution
400Bad RequestInvalid Salesforce record ID formatEnsure the record ID is exactly 18 characters
401UnauthorizedInvalid or expired tokenRefresh your OAuth token
403ForbiddenMissing Egnyte.salesforce scopeRequest a new token with the required scope
404Not FoundNo folder mapping exists for this Salesforce recordVerify the record ID and ensure a folder mapping has been created in Salesforce
429Rate LimitedToo many requestsImplement exponential backoff; check Retry-After header

Egnyte for Procore Integration

The Egnyte Procore API lets you manage syncs between Egnyte folders and Procore projects — list, create, update, and remove syncs, and list available Procore projects.

Note: To use these API endpoints, Egnyte's DMSA key must be verified once per company. Complete this one-time setup by creating a sync through the Egnyte Web UI before making API calls.

Note: All Procore endpoints require the Egnyte.integrations OAuth scope. Creating a sync additionally requires Egnyte.launchwebsession. See OAuth Scopes for details.

Base URL

https://{domain}.egnyte.com/pubapi/v1/procore

Authentication

All requests require an OAuth 2.0 Bearer token in the Authorization header:

Authorization: Bearer {access_token}

See Authentication for details on obtaining a token.


List Synced Projects

Retrieves all synced projects for the authenticated domain.

Request

GET /pubapi/v1/procore/sync

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/procore/sync" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK — Array of synced project objects.

FieldTypeDescription
idstringSynced project ID
jobIdstringSynced project job ID
folderstringEgnyte folder path
procoreFolderPathsarrayProcore folder paths included in the sync
projectstringProcore project name
procoreProjectIdnumberProcore project ID
serviceAccountNamestringService account name
syncTypestringSync direction: "2-way sync" or "no sync"
lastSuccessTimestringTimestamp of last successful sync
isHealthybooleanWhether the sync is currently healthy
isHealthyNotestring | nullError description if isHealthy is false; null otherwise
skippedarrayFiles skipped due to errors; empty array when isHealthy is true

skipped items:

FieldTypeDescription
pathstringPath of skipped file
sizenumberFile size in bytes
sourcestringSource of the error
errorCodestringError code
versionstringFile version
ctimenumberCreation time
checksumstringFile checksum

Example Response

[
  {
    "id": "11111111-2222-3333-4444-555555555555",
    "jobId": "11111111-2222-3333-4444-555555555555",
    "folder": "/Shared/test",
    "procoreFolderPaths": [],
    "project": "My Procore Project",
    "procoreProjectId": 54321,
    "serviceAccountName": "serviceAccountName",
    "syncType": "2-way sync",
    "lastSuccessTime": "2024-01-15T10:00:00Z",
    "isHealthy": true,
    "isHealthyNote": null,
    "skipped": []
  }
]

Create Sync Project

Creates a sync between an Egnyte folder and a Procore project.

Request

POST /pubapi/v1/procore/sync

Request Body

Content-Type: application/x-www-form-urlencoded

FieldTypeRequiredDescription
folderPathstringYesEgnyte folder path (e.g., /Shared/folder)
companyIdstringYesProcore company ID
procoreProjectIdstringYesProcore project ID to sync
procoreFolderPathsstringNoComma-separated Procore folder paths to sync (e.g., /01 Design Files,/03 Safety/01 Inbound). If omitted, the entire project is synced.

Example Request

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/procore/sync" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d 'folderPath=/Shared/test&companyId=12345&procoreProjectId=54321'

Response

201 Created

FieldTypeDescription
idstringSynced project ID (UUID)
jobIdstringSynced project job ID (UUID)
egnyteDomainstringEgnyte domain
egnyteFolderPathstringEgnyte folder path
procoreFolderPathsarrayProcore folder paths included in the sync
procoreServiceAccountIdstringProcore service account ID
procoreProjectIdnumberProcore project ID
procoreProjectNamestringProcore project name
syncTypestringSync direction: "2-way sync" or "no sync"
companyIdnumberProcore company ID

Example Response

{
  "id": "11111111-2222-3333-4444-555555555555",
  "jobId": "11111111-2222-3333-4444-555555555555",
  "egnyteDomain": "yourdomain.egnyte.com",
  "egnyteFolderPath": "/Shared/test",
  "procoreFolderPaths": [],
  "procoreServiceAccountId": "procoreServiceAccountId",
  "procoreProjectId": 54321,
  "procoreProjectName": "procoreProjectName",
  "syncType": "2-way sync",
  "companyId": 12345
}

Get Synced Project Details

Retrieves details for a specific synced project.

Request

GET /pubapi/v1/procore/sync/{syncId}

Path Parameters

ParameterTypeRequiredDescription
syncIdstringYesUUID of the synced project (e.g., 11111111-2222-3333-4444-555555555555)

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/procore/sync/11111111-2222-3333-4444-555555555555" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK — Returns a single SyncedProject object with the same fields as listed in List Synced Projects.


Update Sync Option

Updates the sync option for an existing synced project.

Request

PATCH /pubapi/v1/procore/sync/{syncId}

Path Parameters

ParameterTypeRequiredDescription
syncIdstringYesUUID of the synced project

Request Body

Content-Type: application/x-www-form-urlencoded

FieldTypeRequiredDescription
syncOptionstringYesNew sync type: "2-way sync" or "no sync"
procoreFolderPathsstringNoComma-separated Procore folder paths. If omitted, the entire project is synced.

Example Request

curl -i -X PATCH "https://{domain}.egnyte.com/pubapi/v1/procore/sync/11111111-2222-3333-4444-555555555555" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d 'syncOption=no+sync'

Response

200 OK — Returns the updated sync object with the same fields as Create Sync Project.


Remove Sync Project

Removes the sync between an Egnyte folder and a Procore project.

Request

DELETE /pubapi/v1/procore/sync/{syncId}

Path Parameters

ParameterTypeRequiredDescription
syncIdstringYesUUID of the synced project

Example Request

curl -i -X DELETE "https://{domain}.egnyte.com/pubapi/v1/procore/sync/11111111-2222-3333-4444-555555555555" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

204 No Content — Sync successfully removed. No response body.


List Procore Projects

Lists all Procore projects for a given company account.

Request

GET /pubapi/v1/procore/company/{companyId}/projects

Path Parameters

ParameterTypeRequiredDescription
companyIdstringYesProcore company ID

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/procore/company/12345/projects" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK — Array of Procore project objects.

FieldTypeDescription
idnumberProcore project ID
namestringProcore project name
isSyncedbooleanWhether project is already synced with an Egnyte folder
companyIdnumberProcore company ID

Example Response

[
  {
    "id": 54321,
    "name": "My Procore Project",
    "isSynced": false,
    "companyId": 12345
  }
]

Error Codes

StatusDescriptionResolution
400Input Error — invalid or missing request parametersCheck required fields and parameter formats
401Not Authorized — token expired, invalid, or missing (gateway_error_forbidden_not_authorized)Refresh your OAuth token
403Missing Scope — missing_scope_error; or Quota Error — quota_error (POST only)Request a token with Egnyte.integrations (and Egnyte.launchwebsession for POST); or wait for quota reset
404Not Found — sync or resource does not existVerify the syncId or companyId is correct
500Unexpected ErrorRetry the request; contact support if the issue persists

Quota headers (returned with 403 quota_error on POST):

HeaderDescription
retry-afterTime until the next quota period starts, or the quota period length — in seconds
quota-limitMaximum number of requests allowed in the period
quota-periodQuota period length in seconds
quota-resetEpoch timestamp (ms) when the quota resets