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
| Parameter | Type | Required | Description |
|---|---|---|---|
salesforce_record_id | string | Yes | The 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
| Field | Type | Description |
|---|---|---|
path | string | Path 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_id | string | The unique identifier of the corresponding Egnyte folder |
Example Response
{
"path": "Accounts/ABC",
"folder_id": "a74bb119-724a-4264-ad82-62226e2368ea"
}
Error Codes
| Status | Error | Description | Resolution |
|---|---|---|---|
| 400 | Bad Request | Invalid Salesforce record ID format | Ensure the record ID is exactly 18 characters |
| 401 | Unauthorized | Invalid or expired token | Refresh your OAuth token |
| 403 | Forbidden | Missing Egnyte.salesforce scope | Request a new token with the required scope |
| 404 | Not Found | No folder mapping exists for this Salesforce record | Verify the record ID and ensure a folder mapping has been created in Salesforce |
| 429 | Rate Limited | Too many requests | Implement 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.
| Field | Type | Description |
|---|---|---|
id | string | Synced project ID |
jobId | string | Synced project job ID |
folder | string | Egnyte folder path |
procoreFolderPaths | array | Procore folder paths included in the sync |
project | string | Procore project name |
procoreProjectId | number | Procore project ID |
serviceAccountName | string | Service account name |
syncType | string | Sync direction: "2-way sync" or "no sync" |
lastSuccessTime | string | Timestamp of last successful sync |
isHealthy | boolean | Whether the sync is currently healthy |
isHealthyNote | string | null | Error description if isHealthy is false; null otherwise |
skipped | array | Files skipped due to errors; empty array when isHealthy is true |
skipped items:
| Field | Type | Description |
|---|---|---|
path | string | Path of skipped file |
size | number | File size in bytes |
source | string | Source of the error |
errorCode | string | Error code |
version | string | File version |
ctime | number | Creation time |
checksum | string | File 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
| Field | Type | Required | Description |
|---|---|---|---|
folderPath | string | Yes | Egnyte folder path (e.g., /Shared/folder) |
companyId | string | Yes | Procore company ID |
procoreProjectId | string | Yes | Procore project ID to sync |
procoreFolderPaths | string | No | Comma-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
| Field | Type | Description |
|---|---|---|
id | string | Synced project ID (UUID) |
jobId | string | Synced project job ID (UUID) |
egnyteDomain | string | Egnyte domain |
egnyteFolderPath | string | Egnyte folder path |
procoreFolderPaths | array | Procore folder paths included in the sync |
procoreServiceAccountId | string | Procore service account ID |
procoreProjectId | number | Procore project ID |
procoreProjectName | string | Procore project name |
syncType | string | Sync direction: "2-way sync" or "no sync" |
companyId | number | Procore 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
| Parameter | Type | Required | Description |
|---|---|---|---|
syncId | string | Yes | UUID 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
| Parameter | Type | Required | Description |
|---|---|---|---|
syncId | string | Yes | UUID of the synced project |
Request Body
Content-Type: application/x-www-form-urlencoded
| Field | Type | Required | Description |
|---|---|---|---|
syncOption | string | Yes | New sync type: "2-way sync" or "no sync" |
procoreFolderPaths | string | No | Comma-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
| Parameter | Type | Required | Description |
|---|---|---|---|
syncId | string | Yes | UUID 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
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | string | Yes | Procore 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.
| Field | Type | Description |
|---|---|---|
id | number | Procore project ID |
name | string | Procore project name |
isSynced | boolean | Whether project is already synced with an Egnyte folder |
companyId | number | Procore company ID |
Example Response
[
{
"id": 54321,
"name": "My Procore Project",
"isSynced": false,
"companyId": 12345
}
]
Error Codes
| Status | Description | Resolution |
|---|---|---|
| 400 | Input Error — invalid or missing request parameters | Check required fields and parameter formats |
| 401 | Not Authorized — token expired, invalid, or missing (gateway_error_forbidden_not_authorized) | Refresh your OAuth token |
| 403 | Missing 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 |
| 404 | Not Found — sync or resource does not exist | Verify the syncId or companyId is correct |
| 500 | Unexpected Error | Retry the request; contact support if the issue persists |
Quota headers (returned with 403 quota_error on POST):
| Header | Description |
|---|---|
retry-after | Time until the next quota period starts, or the quota period length — in seconds |
quota-limit | Maximum number of requests allowed in the period |
quota-period | Quota period length in seconds |
quota-reset | Epoch timestamp (ms) when the quota resets |
Related Resources
- Authentication — How to obtain and refresh tokens
- OAuth Scopes — Required scopes for third-party integrations
- Egnyte for Salesforce Help Center — Setup and configuration guide
