# Link

`Link` is a preconfigured and hosted workflow that enables your customers to effortlessly complete a onboarding process within a matter of minutes by utilizing the provided link.

{% hint style="info" %}
Each newly generated link causes the previous one to expire.
{% endhint %}

## Generate link with the onboarding workflow

> Differences between versions: version 1 relies on caseId and is scheduled for deprecation, whereas version 2 uses recordId (this field is optional) and is recommended moving forward.

```json
{"openapi":"3.0.3","info":{"title":"TransactionLink API","version":"1.0.0"},"tags":[{"name":"Link","description":"The link object represents a one-time link to the workflow for a specific case."}],"servers":[{"url":"https://api.transactionlink.io","description":"Production environment"}],"paths":{"/link":{"post":{"tags":["Link"],"summary":"Generate link with the onboarding workflow","description":"Differences between versions: version 1 relies on caseId and is scheduled for deprecation, whereas version 2 uses recordId (this field is optional) and is recommended moving forward.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCaseWorkflowTokenDto"}},"application/json;version=2":{"schema":{"$ref":"#/components/schemas/CreateLinkDto"}}}},"responses":{"201":{"description":"Link has been generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowLinkDto"}},"application/json;version=2":{"schema":{"$ref":"#/components/schemas/WorkflowLinkDto"}}}},"400":{"description":"Request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Case or Record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CreateCaseWorkflowTokenDto":{"type":"object","required":["caseId","workflowDefinitionId"],"properties":{"caseId":{"type":"string","format":"uuid","description":"Case identifier for which we want to initiate the workflow"},"workflowDefinitionId":{"type":"string","description":"ID of the workflow definition"},"parametersId":{"type":"string","description":"ID of the parameters used in the workflow"}}},"CreateLinkDto":{"type":"object","required":["workflowDefinitionId"],"properties":{"workflowDefinitionId":{"type":"string","format":"uuid","description":"ID of the workflow definition"},"parametersId":{"type":"string","format":"uuid","description":"ID of the parameters used in workflow"},"recordId":{"type":"string","format":"uuid","description":"Record identifier for which we want to initiate the workflow"}}},"WorkflowLinkDto":{"type":"object","required":["link"],"properties":{"link":{"type":"string","description":"Generated link to the workflow."}}},"ErrorResponse":{"type":"object","required":["fingerprint","errors"],"properties":{"fingerprint":{"type":"string","description":"error id"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"}}}}}}}}}
```

## Generate link with the onboarding workflow

> Differences between versions: version 1 relies on caseId and is scheduled for deprecation, whereas version 2 uses recordId (this field is optional) and is recommended moving forward.

```json
{"openapi":"3.0.3","info":{"title":"TransactionLink API","version":"1.0.0"},"tags":[{"name":"Link","description":"The link object represents a one-time link to the workflow for a specific case."}],"servers":[{"url":"https://api.transactionlink.io","description":"Production environment"}],"paths":{"/link/send":{"post":{"tags":["Link"],"summary":"Generate link with the onboarding workflow","description":"Differences between versions: version 1 relies on caseId and is scheduled for deprecation, whereas version 2 uses recordId (this field is optional) and is recommended moving forward.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCaseWorkflowTokenDto"}},"application/json;version=2":{"schema":{"$ref":"#/components/schemas/SendLinkDto"}}}},"responses":{"201":{"description":"Link has been generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowLinkDto"}},"application/json;version=2":{"schema":{"$ref":"#/components/schemas/WorkflowLinkDto"}}}},"400":{"description":"Request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Case or Record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CreateCaseWorkflowTokenDto":{"type":"object","required":["caseId","workflowDefinitionId"],"properties":{"caseId":{"type":"string","format":"uuid","description":"Case identifier for which we want to initiate the workflow"},"workflowDefinitionId":{"type":"string","description":"ID of the workflow definition"},"parametersId":{"type":"string","description":"ID of the parameters used in the workflow"}}},"SendLinkDto":{"type":"object","required":["workflowDefinitionId","personalization"],"properties":{"workflowDefinitionId":{"type":"string","format":"uuid","description":"ID of the workflow definition"},"parametersId":{"type":"string","format":"uuid","description":"ID of the parameters used in workflow"},"recordId":{"type":"string","format":"uuid","description":"Record identifier for which we want to initiate the workflow"},"email":{"type":"string","format":"email","description":"E-mail address to which the link can be sent"},"personalization":{"type":"object","required":["locale","subject"],"properties":{"locale":{"type":"string","enum":["pl","fr","uk","en"],"description":"Language used in the message"},"subject":{"type":"string","minLength":1,"maxLength":78,"description":"Message subject"},"brandName":{"type":"string","minLength":1,"maxLength":100,"description":"Custom brand name in the email"}}}}},"WorkflowLinkDto":{"type":"object","required":["link"],"properties":{"link":{"type":"string","description":"Generated link to the workflow."}}},"ErrorResponse":{"type":"object","required":["fingerprint","errors"],"properties":{"fingerprint":{"type":"string","description":"error id"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"}}}}}}}}}
```

## Delete link

> Delete link

```json
{"openapi":"3.0.3","info":{"title":"TransactionLink API","version":"1.0.0"},"tags":[{"name":"Link","description":"The link object represents a one-time link to the workflow for a specific case."}],"servers":[{"url":"https://api.transactionlink.io","description":"Production environment"}],"paths":{"/link/{caseId}":{"delete":{"tags":["Link"],"summary":"Delete link","description":"Delete link","parameters":[{"in":"path","name":"caseId","schema":{"type":"string","format":"uuid"},"required":true,"description":"UUID of the case to delete"}],"responses":{"204":{"description":"Link has been deleted."},"404":{"description":"Case not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","required":["fingerprint","errors"],"properties":{"fingerprint":{"type":"string","description":"error id"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.transactionlink.io/docs/v1/transactionlink-api/api-reference/link.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
