Simulate a source connection

POST/sources

Creates a simulated source connection for a child in the hosted sandbox. This does not establish a generally available production integration; provisioned beta connections require a separate design-partner agreement.

Auth:Bearer

Request body

child_id

uuidrequired
family_id

uuidrequired
source

Source slug (e.g., 'bark', 'qustodio')

stringrequired
credentials

Source credentials (for managed sources)

object
auto_sync

Enable automatic sync on policy changes

boolean

Response

id

Unique identifier for this resource.

uuid
child_id

Identifier of the child this resource belongs to.

uuid
family_id

Identifier of the family this resource belongs to.

uuid
source_slug

Stable slug identifying the source platform (e.g. `nextdns`).

string
display_name

Human-readable name of the source platform.

string
api_tier

One of: managed, guided.

managed | guided
status

Current lifecycle state of the resource.

pending | connected | syncing | error | disconnected
auto_sync

Whether sandbox policy changes automatically schedule a simulated source-sync job.

boolean
capabilities

Rule categories represented by this source fixture or scoped for design-partner adapter evaluation.

object[]
config

Category-specific configuration object for this rule.

object
last_sync_at

RFC 3339 timestamp.

datetime
last_sync_status

Outcome of the most recent sync (e.g. `success`, `error`).

stringnull
sync_version

Monotonic counter incremented on each successful sync.

integer
error_message

Human-readable error detail when the operation failed; null on success.

stringnull
created_at

RFC 3339 timestamp of when the resource was created.

datetime
updated_at

RFC 3339 timestamp of the resource's most recent update.

datetime
Request
bash
curl -sS -X POST "https://phosra-api-sandbox-production.up.railway.app/api/v1/sources" \
  -H "Authorization: Bearer $PHOSRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "child_id": "a11ce0fa-0000-4000-8000-0000000000a1",
  "family_id": "f0000000-0000-4000-8000-0000000000f1",
  "source": "fire_tablet",
  "auto_sync": true
}'
Response
json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "child_id": "550e8400-e29b-41d4-a716-446655440000",
  "family_id": "550e8400-e29b-41d4-a716-446655440000",
  "source_slug": "string",
  "display_name": "string",
  "api_tier": "managed",
  "status": "pending",
  "auto_sync": true,
  "capabilities": [
    {
      "category": "rating_age_gate",
      "support_level": "full",
      "read_write": "push_only",
      "notes": "string"
    }
  ],
  "config": {},
  "last_sync_at": null,
  "last_sync_status": null,
  "sync_version": 0,
  "error_message": null,
  "created_at": "2025-01-15T09:30:00Z",
  "updated_at": "2025-01-15T09:30:00Z"
}