Rotate the connector token

⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/tunnels/{tunnel_id}/rotate_token

Issue a new connector token. The old token keeps working for grace_seconds so you can roll connectors one by one without an outage.

For how this fits into a full workflow, see MCP tunnels.

Headers

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.
syntic-betaYes, while in previewmcp-tunnels-2026-12-01. Without it the call fails with 400 beta_required. See Versioning.
Content-TypeYesapplication/json
Idempotency-KeyNoUp to 255 characters. Retrying with the same key within 24 hours returns the first result instead of acting twice. See Idempotency.

Path parameters

ParameterTypeDescription
tunnel_idstringThe tunnel id, starting with tnl_.

Body parameters

ParameterTypeRequiredNotes
grace_secondsintegerNo0 to 86,400. Default 3,600.

Response

200 OK, Content-Type: application/json

{
  "id": "tnl_01JCE4G6J8L0N2Q4S6U8",
  "type": "tunnel",
  "connector_token": "stn_live_2BvK…redacted",
  "previous_token_expires_at": "2026-11-05T10:15:00Z"
}

Examples

curl -sS "https://app.syntic.ai/v1/tunnels/tnl_01JCE4G6J8L0N2Q4S6U8/rotate_token" \
  -H "Authorization: Bearer $SYNTIC_API_KEY" \
  -H "syntic-beta: mcp-tunnels-2026-12-01" \
  -H "Idempotency-Key: 8d6f0c1e-4b2a-4a57-9f0e-2f1d3c4b5a69" \
  -H "Content-Type: application/json" \
  -d '{
      "grace_seconds": 900
    }'

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
400invalid_request_errorwrong_auth_modeThe tunnel uses mtls; issue a new certificate instead.
404not_found_errortunnel_not_foundNo tunnel with this id in the key’s workspace.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?