Linkly Domains API

Manage the custom (branded) domains that short links can use.

GitHub OpenAPI

Operations 5

POST /api/v1/domains Add a custom domain #
GET /api/v1/workspace/{workspace_id}/domains List custom domains #
POST /api/v1/workspace/{workspace_id}/domains Add a custom domain (workspace-scoped) #
DELETE /api/v1/workspace/{workspace_id}/domains/{domain_id} Delete a custom domain #
PATCH /api/v1/workspace/{workspace_id}/domains/{id}/favicon Set a domain favicon #

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-domains-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-domains-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Linkly URL Shortener Domains 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: Domains
  description: Manage the custom (branded) domains that short links can use.
paths:
  /api/v1/domains:
    post:
      callbacks: {}
      deprecated: false
      description: Add a new custom domain to your workspace. You must configure a CNAME DNS record pointing to domains.linklyhq.com before adding the domain.
      operationId: createDomain
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              description: POST body for creating a Domain
              properties:
                name:
                  description: name
                  type: string
                workspace_id:
                  description: Workspace ID
                  type: integer
              required:
              - workspace_id
              title: DomainCreateRequest
              type: object
            example:
              workspace_id: 42
              name: go.yourcompany.com
        description: Parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Domain'
              example:
                name: go.yourcompany.com
                workspace_id: 42
          description: Domain
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Error
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Not Found
      security:
      - apiKey: []
      summary: Add a custom domain
      tags:
      - Domains
      x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
  /api/v1/workspace/{workspace_id}/domains:
    get:
      callbacks: {}
      deprecated: false
      description: Get all custom domains configured for a workspace. These domains can be used when creating short links.
      operationId: listDomains
      parameters:
      - description: The id of the Workspace
        example: '42'
        in: path
        name: workspace_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                description: List of custom domains configured for a workspace.
                example:
                  domains:
                  - name: go.yourcompany.com
                  - name: links.example.com
                properties:
                  domains:
                    items:
                      description: A custom domain in a workspace.
                      properties:
                        name:
                          type:
                          - string
                          - 'null'
                      title: DomainListItem
                      type: object
                    type: array
                title: DomainListResponse
                type: object
              example:
              - id: 7
                name: go.yourcompany.com
          description: Domain
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Error
      security:
      - apiKey: []
      summary: List custom domains
      tags:
      - Domains
      x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
    post:
      callbacks: {}
      deprecated: false
      description: Add a new custom domain to a specific workspace. You must configure a CNAME DNS record pointing to domains.linklyhq.com before adding the domain.
      operationId: createDomainInWorkspace
      parameters:
      - description: The id of the Workspace
        example: '42'
        in: path
        name: workspace_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  description: Domain name (e.g., links.example.com)
                  type: string
              required:
              - name
              title: CreateDomainRequest
              type: object
            example:
              name: go.yourcompany.com
        description: Parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Domain'
              example:
                name: go.yourcompany.com
                workspace_id: 42
          description: Domain
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Error
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden
      security:
      - apiKey: []
      summary: Add a custom domain (workspace-scoped)
      tags:
      - Domains
      x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
  /api/v1/workspace/{workspace_id}/domains/{domain_id}:
    delete:
      callbacks: {}
      deprecated: false
      description: Remove a custom domain from your workspace. Links using this domain will no longer work.
      operationId: deleteDomain
      parameters:
      - description: The id of the Workspace
        example: '42'
        in: path
        name: workspace_id
        required: true
        schema:
          type: string
      - description: The id of the Domain
        example: '103'
        in: path
        name: domain_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                example: Domain deleted.
                type: string
              example: Domain deleted.
          description: DomainDeleted
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Error
      security:
      - apiKey: []
      summary: Delete a custom domain
      tags:
      - Domains
      x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
  /api/v1/workspace/{workspace_id}/domains/{id}/favicon:
    patch:
      callbacks: {}
      deprecated: false
      description: Update the favicon URL for a custom domain.
      operationId: updateDomainFavicon
      parameters:
      - description: The id of the Workspace
        example: '42'
        in: path
        name: workspace_id
        required: true
        schema:
          type: string
      - description: The id of the Domain
        example: '103'
        in: path
        name: id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                favicon_url:
                  description: URL to favicon image
                  format: uri
                  type: string
              title: UpdateFaviconRequest
              type: object
            example:
              favicon_url: https://www.example.com/favicon.ico
        description: Parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  favicon_url:
                    type:
                    - string
                    - 'null'
                  id:
                    type: integer
                  name:
                    type: string
                type: object
              example:
                id: 7
                name: go.yourcompany.com
                favicon_url: https://www.example.com/favicon.ico
          description: Domain
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Error
      security:
      - apiKey: []
      summary: Set a domain favicon
      tags:
      - Domains
      x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
components:
  schemas:
    Domain:
      description: Response schema for a domain
      example:
        name: null
        workspace_id: 42
      properties:
        name:
          type:
          - string
          - 'null'
        workspace_id:
          type:
          - integer
          - 'null'
      title: Domain
      type: object
    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