Tines Stories
  1. API
  2. Admin
  3. Story sync destinations
  1. API
  2. Admin
  3. Story sync destinations

Story sync destinations: Create

Last updated

Description

Create a new sync destination and subscribe it to one or more stories. Source stories must use change control. See Story syncing for an overview of the product workflow.

The optional sync_mode determines what each delivery changes on the destination:

  • live_readonly replaces the destination live story. This is the default.
  • draft_editable provisions a blank live story and an editable draft on the first delivery. Later deliveries create new drafts without changing the live story or earlier drafts.

Draft syncing must be enabled for the source tenant, and the destination tenant must support change control.

Request

HTTP Method: POST

Body parameter Description
destination_tenant_url Base URL of the destination tenant. Use the current tenant's URL for same-tenant sync.
destination_tenant_api_key Optional Tines API key used to publish to the destination tenant. Required only when syncing to a remote tenant.
destination_team_id ID of the team on the destination tenant that will own the synced stories.
team_id ID of the team on the current tenant creating the sync.
story_ids Array of story IDs (from the current tenant) to sync.
manual_sync_only Optional When true, stories are only synced on manual trigger.
sync_mode Optional live_readonly (default) or draft_editable. Immutable. To change it, delete and recreate; use keep_stories: true to preserve live_readonly content.

Remote destination API keys require both STORY_CREATE and STORY_UPDATE on the destination team.

Sync to a remote tenant

Remote destinations must support draft syncing; older versions may replace the live story. This example sets sync_mode to draft_editable.

curl -X POST \
  --proto '=https' --tlsv1.2 \
  https://<tenant-domain>/api/v1/admin/sync_destinations \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
    "destination_tenant_url": "https://remote-tenant.tines.com",
    "destination_tenant_api_key": "<<CREDENTIAL.remote_tenant_api_key>>",
    "destination_team_id": 42,
    "team_id": 7,
    "story_ids": [9981, 9982],
    "manual_sync_only": false,
    "sync_mode": "draft_editable"
  }'

Sync within the same tenant

When syncing to a different team on the same tenant, set destination_tenant_url to your own tenant URL and omit destination_tenant_api_key.

curl -X POST \
  --proto '=https' --tlsv1.2 \
  https://<tenant-domain>/api/v1/admin/sync_destinations \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
    "destination_tenant_url": "https://<tenant-domain>",
    "destination_team_id": 42,
    "team_id": 7,
    "story_ids": [9981, 9982],
    "manual_sync_only": false
  }'

Response

Returns the newly‑created sync destination object, with a 201 Created status.

Field description

Parameter Description
id Sync destination ID.
destination_tenant_url Base URL of the destination tenant (e.g. https://).
destination_team_id ID of the destination team receiving the synced stories.
manual_sync_only Whether the sync destination only syncs on manual trigger.
sync_mode Whether source updates replace the live destination story (live_readonly) or create an editable draft (draft_editable).
origin_team_id ID of the team on the current tenant where the sync destination was created.
subscriptions Array of subscription objects (one per story).
subscriptions[].story.id ID of the story.
subscriptions[].story.name Name of the story.
subscriptions[].status Sync status. One of synced, failed, or requires_sync.
subscriptions[].error_message Error details if status is failed; null otherwise.

Sample response

{
  "sync_destination": {
    "id": 24,
    "destination_tenant_url": "https://<tenant-domain>",
    "destination_team_id": 42,
    "manual_sync_only": false,
    "sync_mode": "draft_editable",
    "origin_team_id": 7,
    "subscriptions": [
      {
        "story": { "id": 9981, "name": "High‑Priority Alerts" },
        "status": "synced",
        "error_message": null
      },
      {
        "story": { "id": 9982, "name": "Change Control Requests" },
        "status": "synced",
        "error_message": null
      }
    ]
  }
}
Was this helpful?