Skip to main content
POST
/
link
/
token
/
create
Create a Link Token for running a Link session
curl --request POST \
  --url https://sandbox.deck.co/api/v1/link/token/create \
  --header 'Content-Type: application/json' \
  --header 'x-deck-client-id: <api-key>' \
  --header 'x-deck-secret: <api-key>' \
  --data '{
  "language": "EN",
  "countries": [
    "<string>"
  ],
  "customization_name": "<string>",
  "source_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "source_types": [
    "<string>"
  ],
  "beta_source_status": "LiveAndBeta",
  "update": {
    "access_token": "<string>",
    "mode": "UpdateCredentials"
  },
  "webhook_url": "<string>",
  "auto_refresh": true,
  "parsing_method": "PdfOnly",
  "latest_invoice_only": true
}'
{
  "link_token": "<string>"
}

Authorizations

x-deck-client-id
string
header
required

Enter your client id

x-deck-secret
string
header
required

Enter your secret

Body

language
enum<string>

The language that Link should be displayed in.

Available options:
EN,
ES,
FR,
DE,
IT,
PT,
NL,
PL,
SV,
DA,
NO,
ET,
LT,
LV,
RO
countries
string[] | null

Specify an array of Datadeck-supported country codes using the ISO-3166-1 alpha-2 country code standard. Sources from all listed countries will be shown.

customization_name
string | null

The name of the customization from Deck dashboard to be applied to this Widget session. If not specified, the default customization will be used. Values provided in this payload override the dashboard customization settings.

source_ids
string<uuid>[] | null

You can specify exactly the sources to be shown in Link by providing a list of source ids.

source_types
string[] | null

You can limit the sources to be shown in Link by specifying which source types to be shown in Link.

beta_source_status
enum<string>

To control which sources to be shown regarding their beta status

Available options:
LiveAndBeta,
OnlyLive,
OnlyBeta
update
object

Used for launching Link in update or refresh mode

webhook_url
string | null

The webhook URL to receive update events.

auto_refresh
boolean | null

If true, the Link session will automatically refresh the data.

parsing_method
enum<string>

Choose the type of parsing needed for the connection

Available options:
PdfOnly,
Basic,
FullSustainability,
None
latest_invoice_only
boolean | null

Specifies whether to collect only the latest invoice data or all available invoices

Response

OK

The link_token, must be provided when calling Link endpoints, for identifying the Link session.

Minimum length: 1
I