Linkly Conversions API

Report purchases, signups and other conversions so they are attributed back to the link that drove them.

GitHub OpenAPI

Operations 2

GET /api/v1/conversions List conversions #
POST /api/v1/conversions Report a conversion #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/linklyhq-com:linklyhq-com-conversions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

linklyhq-com-conversions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Linkly URL Shortener Conversions API
  version: '1.3'
  description: 'The Linkly URL shortener API (also known as a link shortener API) lets you create and manage short links, track clicks, configure custom domains, and subscribe to webhooks — all programmatically.


    > **You don''t need to read this documentation to use the API.** The Linkly interface shows the exact API request inline whenever you create a link or pull analytics — just copy and paste it directly into your code or terminal.


    Looking for step-by-step guides, tutorials, and FAQs? The Linkly API documentation covers a broader range of topics. This page is the complete endpoint reference.


    ## Authentication


    All API requests require an API key. You can find your API key in your Linkly workspace settings.


    The recommended way is to pass it as a Bearer token in the `Authorization` header:


    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    You can also use HTTP Basic Auth, with your API key as the username and an empty password:


    ```

    Authorization: Basic base64(YOUR_API_KEY:)

    ```


    Or, for quick testing, pass it as the `api_key` query parameter. Prefer the header in production — query-string keys can leak into server logs, browser history, and `Referer` headers:


    ```

    GET https://api.linklyhq.com/api/v1/workspaces?api_key=YOUR_API_KEY

    ```


    A request with a missing or invalid API key returns `401`; a request for a workspace your key cannot access returns `404` (workspaces you don''t belong to are not distinguished from ones that don''t exist); plan- or permission-related failures return `403`. All errors share the JSON shape documented under **Errors** below.


    ## Base URL


    ```

    https://api.linklyhq.com/api/v1

    ```


    ## Workspaces


    Most endpoints are scoped to a **workspace**. Use `GET /workspaces` to list your available workspaces and retrieve their IDs.


    ## Rate Limits


    API requests are rate-limited per API key. When you exceed the limit, the API returns `429 Too Many Requests`. Check the response body for your current usage and limit.


    ## Errors


    Errors return the appropriate HTTP status code and a JSON body with a human-readable `error` message and a stable, machine-readable `code` you can branch on:


    ```json

    { "error": "Not authorized", "code": "unauthorized" }

    ```


    | Status | `code` | Meaning |

    | --- | --- | --- |

    | `400` | `bad_request` | Missing or malformed parameters. |

    | `401` | `unauthorized` | Missing or invalid API key. |

    | `403` | `forbidden` | Your plan or permissions don''t allow this action. |

    | `404` | `not_found` | The resource doesn''t exist, or your key can''t access it. |

    | `429` | `rate_limit_exceeded` | You''ve exceeded a rate or usage limit. |

    | `500` | `internal_error` | Something went wrong on our side. |


    Validation failures return `400` and may include field-level details (e.g. `{ "slug": ["is invalid"] }`) in place of the envelope above.'
  termsOfService: https://linklyhq.com/support/terms
  contact:
    name: Linkly Ltd
    email: support@linklyhq.com
    url: https://linklyhq.com/support
  license:
    name: Proprietary (Linkly Ltd)
    url: https://linklyhq.com/support/terms
  x-logo:
    url: https://linklyhq.com/brand/linkly-logo.svg
    altText: Linkly
    backgroundColor: '#FFFFFF'
servers:
- url: https://api.linklyhq.com
  description: Production
security:
- bearerAuth: []
- basicAuth: []
- apiKey: []
tags:
- name: Conversions
  description: Report purchases, signups and other conversions so they are attributed back to the link that drove them.
paths:
  /api/v1/conversions:
    get:
      callbacks: {}
      deprecated: false
      description: List the workspace's conversions, most recent first.
      operationId: listConversions
      parameters:
      - description: Maximum conversions to return (1–1000, default 100)
        example: 100
        in: query
        name: limit
        required: false
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  conversions:
                    items:
                      properties:
                        amount_cents:
                          example: 4999
                          type:
                          - integer
                          - 'null'
                        click_id:
                          example: 01KYPGEEPJSPR3S564QRBDGA1W
                          type:
                          - string
                          - 'null'
                        country:
                          example: US
                          type:
                          - string
                          - 'null'
                        currency:
                          example: USD
                          type:
                          - string
                          - 'null'
                        event_id:
                          example: shopify-1234
                          type:
                          - string
                          - 'null'
                        event_name:
                          example: purchase
                          type: string
                        event_type:
                          example: sale
                          type: string
                        external_id:
                          example: customer-42
                          type:
                          - string
                          - 'null'
                        id:
                          description: ULID. Sorts chronologically, so ids are ordered by creation.
                          example: 01KYPH20SEJY4HQSCPMWW60QE0
                          type: string
                        inserted_at:
                          format: date-time
                          type: string
                        ip_source:
                          description: Whose address was recorded. `server` means the connecting address belonged to your backend or a platform relay, so it is excluded from geographic reporting. The address itself is never returned.
                          enum:
                          - visitor
                          - server
                          - unknown
                          example: visitor
                          type: string
                        link_id:
                          description: The attributed link, or null if the conversion could not be attributed.
                          example: 41657524
                          type:
                          - integer
                          - 'null'
                        metadata:
                          type:
                          - object
                          - 'null'
                        occurred_at:
                          format: date-time
                          type: string
                        source:
                          description: Which integration reported it.
                          example: api
                          type: string
                      title: Conversion
                      type: object
                    type: array
                title: ConversionList
                type: object
              example:
                conversions:
                - id: 01KYPH20SEJY4HQSCPMWW60QE0
                  event_id: shopify-1234
                  event_name: purchase
                  event_type: sale
                  amount_cents: 4999
                  currency: USD
                  country: US
                  external_id: customer-42
                  link_id: 41657524
                  click_id: 01KYPGEEPJSPR3S564QRBDGA1W
                  occurred_at: '2026-07-29T10:30:00Z'
                  source: api
          description: Conversion list
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unauthorized
      security:
      - apiKey: []
      summary: List conversions
      tags:
      - Conversions
      x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
    post:
      callbacks: {}
      deprecated: false
      description: 'Report a conversion — a purchase, signup, or custom event that happened on your site after someone clicked a Linkly link.


        Pass the `linkly_cid` your landing page captured to attribute the conversion to the originating link. A missing or unrecognised `linkly_cid` is not an error: the conversion is recorded unattributed rather than dropped.


        ### Leads and sales


        Set `event_type` to `lead` for signups, trials and demo requests, `sale` when money changes hands, or `custom` for anything else. The type drives the clicks → leads → sales funnel.


        Send `external_id` — your own customer identifier — on every event. A `lead` reported with both an `linkly_cid` and an `external_id` ties that customer to the link, and later events for the same `external_id` inherit the attribution automatically. This is what makes server-side sales attributable: the purchase usually arrives from a billing webhook that never saw the `linkly_cid`. Attribution is first-touch, so a customer who later arrives via a different link keeps the credit on their original one.


        Supply `event_id` to make the call idempotent. Reporting the same `event_id` twice returns `200` with the original conversion instead of creating a duplicate, so a retrying client is safe.'
      operationId: createConversion
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              description: A conversion to record
              properties:
                amount_cents:
                  description: Value in the smallest currency unit. May be negative to record a refund or chargeback, which nets against earlier revenue.
                  example: 4999
                  type: integer
                country:
                  description: Two-letter country code for the conversion. Inferred for browser-side calls; supply it explicitly from a server-side integration, where the connecting address is your own infrastructure rather than the customer's.
                  example: US
                  type: string
                currency:
                  description: ISO 4217 currency code. Defaults to USD.
                  example: USD
                  type: string
                event_id:
                  description: Your identifier for this event. Used as an idempotency key — reporting the same value twice will not create a second conversion. Applies to any event type, not just purchases.
                  example: shopify-1234
                  type: string
                event_name:
                  description: What happened, e.g. `purchase`, `signup`, `trial_started`
                  example: purchase
                  type: string
                event_type:
                  description: Coarse type driving the funnel. `lead` establishes customer identity, `sale` records revenue. Defaults to `custom`.
                  enum:
                  - lead
                  - sale
                  - custom
                  example: sale
                  type: string
                external_id:
                  description: 'Your identifier for the customer. Send it on every event: it is what links a later server-side sale back to the click that produced the signup.'
                  example: customer-42
                  type: string
                linkly_cid:
                  description: The attribution token captured from the landing page URL. Omit if unavailable — the conversion is then recorded without a link attribution.
                  example: 2on1Y.01KYPGEEPJSPR3S564QRBDGA1W
                  type: string
                metadata:
                  description: Arbitrary JSON, up to 10,000 bytes encoded.
                  example:
                    sku: ABC-123
                  type: object
                occurred_at:
                  description: When the conversion happened. Defaults to now.
                  example: '2026-07-29T10:30:00Z'
                  format: date-time
                  type: string
                visitor_ip:
                  description: The end customer's IP, when your server has it. Omit unless you do — for server-side calls Linkly otherwise records the connecting address as your server, not the customer, and excludes it from geographic reporting. Sending this asserts you have a lawful basis to share it. Never returned by the API.
                  example: 203.0.113.42
                  type: string
              required:
              - event_name
              title: ConversionCreateRequest
              type: object
            example:
              event_name: purchase
              event_type: sale
              event_id: shopify-1234
              amount_cents: 4999
              currency: USD
              external_id: customer-42
              linkly_cid: 2on1Y.01KYPGEEPJSPR3S564QRBDGA1W
        description: Conversion
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  amount_cents:
                    example: 4999
                    type:
                    - integer
                    - 'null'
                  click_id:
                    example: 01KYPGEEPJSPR3S564QRBDGA1W
                    type:
                    - string
                    - 'null'
                  country:
                    example: US
                    type:
                    - string
                    - 'null'
                  currency:
                    example: USD
                    type:
                    - string
                    - 'null'
                  event_id:
                    example: shopify-1234
                    type:
                    - string
                    - 'null'
                  event_name:
                    example: purchase
                    type: string
                  event_type:
                    example: sale
                    type: string
                  external_id:
                    example: customer-42
                    type:
                    - string
                    - 'null'
                  id:
                    description: ULID. Sorts chronologically, so ids are ordered by creation.
                    example: 01KYPH20SEJY4HQSCPMWW60QE0
                    type: string
                  inserted_at:
                    format: date-time
                    type: string
                  ip_source:
                    description: Whose address was recorded. `server` means the connecting address belonged to your backend or a platform relay, so it is excluded from geographic reporting. The address itself is never returned.
                    enum:
                    - visitor
                    - server
                    - unknown
                    example: visitor
                    type: string
                  link_id:
                    description: The attributed link, or null if the conversion could not be attributed.
                    example: 41657524
                    type:
                    - integer
                    - 'null'
                  metadata:
                    type:
                    - object
                    - 'null'
                  occurred_at:
                    format: date-time
                    type: string
                  source:
                    description: Which integration reported it.
                    example: api
                    type: string
                title: Conversion
                type: object
              example:
                id: 01KYPH20SEJY4HQSCPMWW60QE0
                event_id: shopify-1234
                event_name: purchase
                event_type: sale
                amount_cents: 4999
                currency: USD
                link_id: 41657524
                click_id: 01KYPGEEPJSPR3S564QRBDGA1W
                source: api
          description: Already recorded — the existing conversion for this event_id
        '201':
          content:
            application/json:
              schema:
                properties:
                  amount_cents:
                    example: 4999
                    type:
                    - integer
                    - 'null'
                  click_id:
                    example: 01KYPGEEPJSPR3S564QRBDGA1W
                    type:
                    - string
                    - 'null'
                  country:
                    example: US
                    type:
                    - string
                    - 'null'
                  currency:
                    example: USD
                    type:
                    - string
                    - 'null'
                  event_id:
                    example: shopify-1234
                    type:
                    - string
                    - 'null'
                  event_name:
                    example: purchase
                    type: string
                  event_type:
                    example: sale
                    type: string
                  external_id:
                    example: customer-42
                    type:
                    - string
                    - 'null'
                  id:
                    description: ULID. Sorts chronologically, so ids are ordered by creation.
                    example: 01KYPH20SEJY4HQSCPMWW60QE0
                    type: string
                  inserted_at:
                    format: date-time
                    type: string
                  ip_source:
                    description: Whose address was recorded. `server` means the connecting address belonged to your backend or a platform relay, so it is excluded from geographic reporting. The address itself is never returned.
                    enum:
                    - visitor
                    - server
                    - unknown
                    example: visitor
                    type: string
                  link_id:
                    description: The attributed link, or null if the conversion could not be attributed.
                    example: 41657524
                    type:
                    - integer
                    - 'null'
                  metadata:
                    type:
                    - object
                    - 'null'
                  occurred_at:
                    format: date-time
                    type: string
                  source:
                    description: Which integration reported it.
                    example: api
                    type: string
                title: Conversion
                type: object
              example:
                id: 01KYPH20SEJY4HQSCPMWW60QE0
                event_id: shopify-1234
                event_name: purchase
                event_type: sale
                amount_cents: 4999
                currency: USD
                link_id: 41657524
                click_id: 01KYPGEEPJSPR3S564QRBDGA1W
                source: api
          description: Conversion recorded
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Invalid parameters
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Not available on your plan
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Validation failed
      security:
      - apiKey: []
      summary: Report a conversion
      tags:
      - Conversions
      x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
components:
  schemas:
    ApiError:
      description: Response schema for API error
      example:
        error: Something went wrong
      properties:
        error:
          type: string
      title: ApiError
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <API key>. Find the key under Workspace settings > API in app.linklyhq.com.'
      x-linkly-preferred: true
    basicAuth:
      type: http
      scheme: basic
      description: API key as the username, empty password.
    apiKey:
      type: apiKey
      in: query
      name: api_key
      description: Query-string fallback for quick tests only.
externalDocs:
  description: Linkly API guides and tutorials
  url: https://linklyhq.com/support/short-link-creation-api
x-tagGroups:
- name: Links & Domains
  tags:
  - Links
  - Domains
  - Workspaces
- name: Webhooks
  tags:
  - Webhooks
- name: Reports
  tags:
  - Clicks
x-ipaas:
  vendor: Linkly Ltd
  website: https://linklyhq.com
  support: support@linklyhq.com
  brandColor: '#009EFF'
  logoSvg: https://linklyhq.com/brand/linkly-logo.svg
  iconSvg: https://linklyhq.com/brand/linkly-icon.svg
  iconPng512: https://linklyhq.com/brand/linkly-icon.png
  authTest: GET /api/v1/workspaces (200 with a JSON array proves the key)
  existingIntegrations:
  - Zapier
  - Make
  - Pipedream
  - n8n
  - Microsoft Power Automate (independent publisher, in review)
  - MCP server
  - Claude and ChatGPT connectors
  suggestedTriggers:
  - name: New Click
    type: webhook
    subscribe: POST /api/v1/workspace/{workspace_id}/webhooks
    unsubscribe: DELETE /api/v1/workspace/{workspace_id}/webhooks/{hook_id}
    filter: event == "click"
  - name: New Click on Link
    type: webhook
    subscribe: POST /api/v1/link/{link_id}/webhooks
    unsubscribe: DELETE /api/v1/link/{link_id}/webhooks/{hook_id}
    filter: event == "click"
  - name: New Link
    type: webhook
    subscribe: POST /api/v1/workspace/{workspace_id}/webhooks
    filter: event == "link.created"
  - name: New Link (polling)
    type: polling
    endpoint: GET /api/v1/workspace/{workspace_id}/list_links?sort_by=id&sort_dir=desc&page_size=50
    dedupe: links[].id
  suggestedActions:
  - createOrUpdateLink
  - getWorkspaceLink
  - listLinks
  - deleteLink
  - getClicks
  - getClickCounters
  - listDomains
  - createConversion
  - listWorkspaces