Pools

sfp server API reference for Pools: 22 endpoints.

GET/sfp/api/pools/configs

Retrieve all pool configurations (both sandbox and scratch org pools), optionally filtered by repository and/or pool type

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier?string

Repository identifier in format org/repo or org/project/repo

poolType?string

Filter by pool type (SANDBOX or SCRATCH_ORG)

Value in

  • "SANDBOX"
  • "SCRATCH_ORG"
hasAssignmentRules?boolean

Filter by assignment rules: true = only pools with rules, false = only pools without rules (no branchPattern or domainPatterns)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/pools/configs"
[  {    "repositoryIdentifier": "flxbl-io/sf-core",    "name": "Development Pool",    "poolTag": "dev-pool",    "branchPattern": "feature/*",    "devHubUsername": "sandbox-manager@example.com",    "sandboxDefinition": {      "autoActivate": true,      "licenseType": "Developer",      "description": "Dev sandbox for feature development",      "sandboxName": [        "DEV",        "QA"      ]    },    "sourceSandboxName": "TEMPLATE_SB",    "daysToKeepUnassignedAvailable": 30,    "isActive": true,    "additionalConfig": {},    "lastMonitoredAt": "2025-01-01T12:00:00Z",    "currentProvisionRunId": "run-123456",    "currentMonitorRunId": "mon-123456",    "defaultExpirationHours": 168,    "extendedExpirationHours": 336,    "averageOrgCreationTime": 45,    "lastProvisionedAt": "2025-01-01T12:00:00Z",    "minAvailableInstances": 3,    "maxTotalInstances": 10,    "refreshOrDeleteStrategy": "DELETE_EXPIRED",    "refreshStrategy": "ALWAYS",    "refreshIntervalHours": 24,    "minActiveInstances": 3,    "maxActiveInstances": 10,    "minRetentionDays": 7,    "returnToPoolOnUnassign": false,    "metadata": {      "environment": "dev",      "team": "platform",      "region": "us-west"    },    "monitoringCronPattern": "*/30 * * * *",    "poolStatus": "ACTIVE",    "cleanupJobId": "string"  }]
POST/sfp/api/pools/configs

Create a new configuration for a sandbox or scratch org pool. Use poolType=SCRATCH_ORG for scratch org pools.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

poolType?string

Pool type: SANDBOX (default) or SCRATCH_ORG

Value in

  • "SANDBOX"
  • "SCRATCH_ORG"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/configs" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core",    "name": "Development Pool",    "poolTag": "dev-pool",    "devHubUsername": "sandbox-manager@example.com",    "minAvailableInstances": 3,    "maxTotalInstances": 10,    "daysToKeepUnassignedAvailable": 30,    "refreshOrDeleteStrategy": "DELETE_EXPIRED",    "isActive": true  }'
Empty
GET/sfp/api/pools/configs/{poolTag}

Retrieve a specific pool configuration (sandbox or scratch org) by tag and repository

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

The tag of the pool to retrieve

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

poolType?string

Pool type hint for faster lookup (SANDBOX or SCRATCH_ORG). If not specified, both types are checked

Value in

  • "SANDBOX"
  • "SCRATCH_ORG"

Response Body

application/json

curl -X GET "https://example.com/sfp/api/pools/configs/string?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "repositoryIdentifier": "flxbl-io/sf-core",  "name": "Development Pool",  "poolTag": "dev-pool",  "branchPattern": "feature/*",  "devHubUsername": "sandbox-manager@example.com",  "sandboxDefinition": {    "autoActivate": true,    "licenseType": "Developer",    "description": "Dev sandbox for feature development",    "sandboxName": [      "DEV",      "QA"    ]  },  "sourceSandboxName": "TEMPLATE_SB",  "daysToKeepUnassignedAvailable": 30,  "isActive": true,  "additionalConfig": {},  "lastMonitoredAt": "2025-01-01T12:00:00Z",  "currentProvisionRunId": "run-123456",  "currentMonitorRunId": "mon-123456",  "defaultExpirationHours": 168,  "extendedExpirationHours": 336,  "averageOrgCreationTime": 45,  "lastProvisionedAt": "2025-01-01T12:00:00Z",  "minAvailableInstances": 3,  "maxTotalInstances": 10,  "refreshOrDeleteStrategy": "DELETE_EXPIRED",  "refreshStrategy": "ALWAYS",  "refreshIntervalHours": 24,  "minActiveInstances": 3,  "maxActiveInstances": 10,  "minRetentionDays": 7,  "returnToPoolOnUnassign": false,  "metadata": {    "environment": "dev",    "team": "platform",    "region": "us-west"  },  "monitoringCronPattern": "*/30 * * * *",  "poolStatus": "ACTIVE",  "cleanupJobId": "string"}
PATCH/sfp/api/pools/configs/{poolTag}

Update an existing configuration for a sandbox or scratch org pool

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

The tag of the pool to update

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

poolType?string

Pool type hint for routing (SANDBOX or SCRATCH_ORG)

Value in

  • "SANDBOX"
  • "SCRATCH_ORG"

Response Body

application/json

curl -X PATCH "https://example.com/sfp/api/pools/configs/string?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
DELETE/sfp/api/pools/configs/{poolTag}

Delete an existing pool configuration. For sandbox pools, deletes the configuration and all sandboxes. For scratch org pools, deletes all scratch orgs in the pool from Salesforce.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

The tag of the pool to delete

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Response Body

application/json

curl -X DELETE "https://example.com/sfp/api/pools/configs/string?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
GET/sfp/api/pools/configs/{poolTag}/provisioning-origin

Resolve what a pool provisions its instances from: a scratch org pool returns its base snapshot (read from the snapshot key in the scratch def file) or scratchDefinition when built fresh; a sandbox pool returns its source sandbox or production license.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

The tag of the pool

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

poolType?string

Pool type hint for faster lookup. If not specified, both types are checked

Value in

  • "SANDBOX"
  • "SCRATCH_ORG"

Response Body

curl -X GET "https://example.com/sfp/api/pools/configs/string/provisioning-origin?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
GET/sfp/api/pools/collisions

Report pool tags claimed by more than one pool type in a repository. A tag is unique only within a pool type, so a sandbox pool and a scratch org pool can share one — in which case tag-only lookups resolve to the sandbox pool and the other becomes unreachable. Read-only; never repairs.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Response Body

curl -X GET "https://example.com/sfp/api/pools/collisions?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
GET/sfp/api/pools/status

Retrieve current status of pools (sandbox or scratch org) and their instances. Supports filtering by status, pool type, and entity assignment.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier?string

Repository identifier in format org/repo or org/project/repo

poolTag?string

Optional. If provided, returns detailed status for the specified pool.

instanceStatus?string

Optional. Filter instances by status (used with poolTag).

Value in

  • "REQUESTED"
  • "PROVISIONING"
  • "ACTIVATING"
  • "AVAILABLE"
  • "ASSIGNED"
  • "EXPIRED"
  • "FLAGGED_FOR_REFRESH"
  • "REFRESHING"
  • "DELETING"
  • "ORPHANED"
  • "ERROR"
  • "UNKNOWN"
assignmentId?string

Optional. Filter by assignment UUID (sandbox pools only).

poolType?string

Optional. Pool type hint for faster lookup (SANDBOX or SCRATCH_ORG).

Value in

  • "SANDBOX"
  • "SCRATCH_ORG"
refresh?boolean

Optional. Force refresh of cached data for scratch org pools.

Response Body

application/json

curl -X GET "https://example.com/sfp/api/pools/status"
Empty
POST/sfp/api/pools/cleanup-zombies

Identify and optionally cleanup sandbox instances that exist in the database but not in Salesforce

Authorization

access-token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/cleanup-zombies" \  -H "Content-Type: application/json" \  -d '{    "devHubUsername": "devhub_main_org"  }'
Empty
GET/sfp/api/pools/mode

Returns whether the system is using mock or real Salesforce sandbox service. All authenticated users can view the service mode.

Authorization

access-token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/sfp/api/pools/mode"
{  "mode": "mock",  "description": "string",  "mockModeEnvVar": "string"}
GET/sfp/api/pools/monitoring-jobs

Retrieve information about all repository-specific pool monitoring jobs. All authenticated users can view monitoring job status.

Authorization

access-token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/sfp/api/pools/monitoring-jobs"
{  "totalJobs": 3,  "jobs": [    {      "jobName": "pool-monitor-flxbl-io-sf-core-dev",      "repositoryIdentifier": "flxbl-io/sf-core",      "poolTag": "dev",      "poolType": "SANDBOX",      "taskType": "monitor-pool",      "description": "Sandbox pool monitoring — flxbl-io/sf-core/dev",      "pattern": "*/30 * * * *",      "enabled": true,      "nextRun": "2024-01-01T12:30:00Z",      "lastRun": "2024-01-01T12:00:00Z",      "running": false,      "lastRunUrl": "https://sfp.example.com/workflows/runs/550e8400-e29b-41d4-a716-446655440000?repo=flxbl-io%2Fsf-core",      "lastRunExecutionId": "550e8400-e29b-41d4-a716-446655440000"    }  ]}
POST/sfp/api/pools/monitoring-jobs/{jobName}/pause

Disables a pool monitoring cron schedule without deleting it.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

jobName*string

The monitoring job name (cron name)

Response Body

curl -X POST "https://example.com/sfp/api/pools/monitoring-jobs/string/pause"
Empty
POST/sfp/api/pools/monitoring-jobs/{jobName}/resume

Re-enables a previously paused pool monitoring cron schedule.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

jobName*string

The monitoring job name (cron name)

Response Body

curl -X POST "https://example.com/sfp/api/pools/monitoring-jobs/string/resume"
Empty
GET/sfp/api/pools/{poolTag}/instances

Get a list of all instances in a specific pool (sandbox or scratch org)

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Pool tag to get instances for (works with both sandbox and scratch org pools)

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

poolType?string

Optional pool type hint for faster lookup (SANDBOX or SCRATCH_ORG). If not specified, the pool type is auto-detected

Value in

  • "SANDBOX"
  • "SCRATCH_ORG"
refresh?boolean

Optional. Force refresh of cached data for scratch org pools (ignored for sandbox pools).

Response Body

application/json

curl -X GET "https://example.com/sfp/api/pools/core_dev or ci/instances?repositoryIdentifier=flxbl-io%2Fsf-core"
[  {}]
DELETE/sfp/api/pools/{poolTag}/instances

Dispatches the cleanup Hatchet workflow with skipFinalize=true — drops all instances but preserves the pool configuration. Pass poolTag=all to drain every active pool in the repository.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Pool tag to drain, or "all" to drain every active pool

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Response Body

curl -X DELETE "https://example.com/sfp/api/pools/core_dev/instances?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
POST/sfp/api/pools/{poolTag}/fetch

Assign an available sandbox from the pool using a unique assignment ID. If a sandbox is already assigned to the provided assignment ID, it will be reused.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Pool tag to fetch sandbox from

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Request Body

application/json

Assignment configuration

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/core_dev/fetch?repositoryIdentifier=flxbl-io%2Fsf-core" \  -H "Content-Type: application/json" \  -d '{}'
Empty
POST/sfp/api/pools/{poolTag}/unassign

Release an assigned instance (sandbox or scratch org) and return it to the available pool. Provide either instanceId for direct unassignment, or assignmentId to find and unassign the instance. The user must own the instance or have Owner role.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Pool tag where the instance belongs (works with both sandbox and scratch org pools)

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Request Body

application/json

Unassignment details: either sandboxId OR assignmentId

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/core_dev or ci/unassign?repositoryIdentifier=flxbl-io%2Fsf-core" \  -H "Content-Type: application/json" \  -d '{}'
Empty
POST/sfp/api/pools/{poolTag}/instances/{instanceName}/users

Dispatch durable user provisioning for an existing pool sandbox through Hatchet.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Sandbox pool tag

instanceName*string

Sandbox instance name

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/core_dev/instances/dev1/users?repositoryIdentifier=flxbl-io%2Fsf-core" \  -H "Content-Type: application/json" \  -d '{    "sandboxName": "dev1",    "users": [      {        "email": "developer@example.com",        "accessLevel": "developer",        "sendPasswordReset": true      }    ]  }'
{  "taskExecutionId": "string",  "taskType": "provision-pool-users",  "status": "running",  "triggeredAt": "string"}
POST/sfp/api/pools/{poolTag}/regenerate-auth-url

Regenerate and persist a fresh SFDX auth URL for a sandbox pool instance. Owners and application tokens may regenerate any sandbox in the pool; members may regenerate only their own assigned sandbox.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Sandbox pool tag where the instance belongs

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Request Body

application/json

Regeneration target: provide exactly one of sandboxId, sandboxName, or assignmentId

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/core_dev/regenerate-auth-url?repositoryIdentifier=flxbl-io%2Fsf-core" \  -H "Content-Type: application/json" \  -d '{}'
{  "status": "auth_url_regenerated",  "message": "SFDX auth URL for sandbox dev1 has been regenerated.",  "timestamp": "2026-07-07T08:00:00.000Z",  "details": {    "sandboxId": "sb-123456",    "sandboxName": "dev1",    "poolTag": "core_dev",    "assignmentId": "550e8400-e29b-41d4-a716-446655440000",    "instanceUrl": "https://dev1.sandbox.salesforce.com",    "sfdxAuthUrl": "force://PlatformCLI::refresh-token@dev1.sandbox.salesforce.com",    "regeneratedAt": "2026-07-07T08:00:00.000Z"  }}
POST/sfp/api/pools/{poolTag}/extend

Extend the expiration time of a sandbox identified by its assignment ID. You can specify custom extension hours in the request body, otherwise it defaults to the pool configuration.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Pool tag where the sandbox belongs

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Request Body

application/json

Assignment details to extend sandbox for

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/core_dev/extend?repositoryIdentifier=flxbl-io%2Fsf-core" \  -H "Content-Type: application/json" \  -d '{    "assignmentId": "550e8400-e29b-41d4-a716-446655440000"  }'
Empty
POST/sfp/api/pools/{poolTag}/replenish

Triggers the pool replenishment Hatchet workflow asynchronously. For sandbox pools fires the monitoring flow (reconciliation + lifecycle + quota). For scratch org pools fires the provisioning flow. Pass poolTag=all to replenish all active pools in the repository.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Pool tag to replenish, or "all" to target all active pools

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

Response Body

application/json

curl -X POST "https://example.com/sfp/api/pools/core_dev/replenish?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
DELETE/sfp/api/pools/{poolTag}/instances/{instanceName}

Delete an org instance from the pool. For scratch orgs, deletes from DevHub and removes from tracking. For sandboxes, deletes from Salesforce and removes from database. ERROR status instances are always cleaned up from the database.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

poolTag*string

Pool tag where the instance belongs

instanceName*string

Name/username of the org instance to delete

Query Parameters

repositoryIdentifier*string

Repository identifier in format org/repo or org/project/repo

force?boolean

Delete an immortal instance. Note this does NOT bypass Salesforce's per-licence refresh interval — that is enforced by Salesforce. Inside it, the instance is taken out of the pool and marked DELETING for automatic retry, and the response reports deletionType=deferred.

Response Body

curl -X DELETE "https://example.com/sfp/api/pools/core_dev/instances/test-abc@example.com?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty