Link

Create Short Link URL

Changed on

Create a short URL for the Link onboarding flow as an alternative to the full Link URL with all its query parameters.

The response contains a durable id, an 8-character code, and the full url to share with your user. Short links are valid for 1 year from creation.

Store the id if you may need to delete the short link later. The public code / url alone cannot be used to revoke a link.

Identical request bodies are de-duplicated automatically. Calling this endpoint a second time with the same parameters returns the original short link (including its id) with an Idempotent-Replayed: true response header.

post/link/short

Request

  • Base URL
    https://api.withterminal.com/tsp/v1
  • URL
    https://api.withterminal.com/tsp/v1/link/short
  • Auth
    HTTP bearer

Request body

providerstring

Every provider has a unique code to identify it across Terminal's system. You can find each provider's code under provider details.

providerHintsProviderCode[]

An optional list of provider codes to hoist to the top of the Link provider list.

externalIdstring

An optional ID from your system that can be used to reference connections.

namestring

An optional human-readable name to associate with the resulting connection.

tagsstring[]

An optional list of tags from your system that can be used to reference connections.

redirectUrlstring uri

URL to redirect your user to after they complete the Link flow.

syncMode'automatic' | 'manual'

Enum values:

  • automatic: Terminal will keep this connections data up to date
  • manual: Terminal will only sync data upon request
templatestring ulid

Unique identifier for the Link Template.

Example request

{
  "provider": "geotab",
  "providerHints": [
    "geotab"
  ],
  "externalId": "fleet_456",
  "tags": [
    "Tag Name"
  ],
  "redirectUrl": "https://app.acme.com/telematics-success",
  "backfill": {
    "startFrom": "2021-01-06T03:24:53.000Z"
  },
  "template": "ltp_01HXQ4YK8V2X0X0X0X0X0X0X0X"
}

Response

OK

idstring ulid required

Unique identifier for a short link. Returned on create and required to delete the short link.

codestring required

8-character code that is associated with the original Link parameters. Used in the shared URL; cannot be used to delete the short link.

urlstring uri required

Full short URL to share with your user.

expiresAtstring date-time required

Example response

{
  "id": "slk_01JB7K3N2QZP7TVR4FX8SDWFH9",
  "code": "az9qtk2d",
  "url": "https://term.new/az9qtk2d",
  "expiresAt": "2021-01-06T03:24:53.000Z"
}

Changes

    • warning

      added the new provider_timeout enum value to the response property for the response status