---
title: "Create a new link between transactions"
method: POST
path: "/v1/transaction-links"
tags: ["links"]
---

# Create a new link between transactions

`POST /v1/transaction-links`

## Request

- Base URL: `https://demo.firefly-iii.org/api`
- URL: `https://demo.firefly-iii.org/api/v1/transaction-links`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://demo.firefly-iii.org/oauth/authorize`
    - Token URL: `https://demo.firefly-iii.org/oauth/token`
  - HTTP bearer

Store a new link between two transactions. For this end point you need the journal_id from a transaction.

## Headers

- `X-Trace-Id` string, uuid

## Request body

- TransactionLinkStore
  - `link_type_id` string, string, required: The link type ID to use. You can also use the link_type_name field.
  - `link_type_name` string, string: The link type name to use. You can also use the link_type_id field.
  - `inward_id` string, string, required: The inward transaction transaction_journal_id for the link. This becomes the 'is paid by' transaction of the set.
  - `outward_id` string, string, required: The outward transaction transaction_journal_id for the link. This becomes the 'pays for' transaction of the set.
  - `notes` string, string, nullable: Optional. Some notes.

## Response `200`

New transaction link stored, result in response.

- TransactionLinkSingle
  - `data` TransactionLinkRead, required
    - `type` string, string, required: Immutable value
    - `id` string, string, required
    - `attributes` TransactionLink, required
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `link_type_id` string, string, required: The link type ID to use. You can also use the link_type_name field.
      - `link_type_name` string, string: The link type name to use. You can also use the link_type_id field.
      - `inward_id` string, string, required: The inward transaction transaction_journal_id for the link. This becomes the 'is paid by' transaction of the set.
      - `outward_id` string, string, required: The outward transaction transaction_journal_id for the link. This becomes the 'pays for' transaction of the set.
      - `notes` string, string, nullable: Optional. Some notes.
    - `links` ObjectLink, required
      - `0` object
        - `rel` string, string
        - `uri` string, string
      - `self` string, uri

## Other responses

- `400`: Bad request
- `401`: Unauthenticated
- `404`: Page not found
- `422`: Validation error. The body will have the exact details.
- `500`: Internal exception

---

[API](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0-beta-2.md) - [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0-beta-2/llms.txt) - [OpenAPI document](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0-beta-2/revisions/a5f6f8195556?raw)
