Endpoints
Use the links endpoints to list, create, update and delete the workspace's short links. The response shape is on the Link object page, and clicks over time are in link analytics.
Links need a plan that includes Links; otherwise every Links endpoint returns 403 with the code COMMERCIAL_ENTITLEMENT_REQUIRED. Reading needs the key's Links · View permission, creating and editing Links · Create and edit, and deleting Links · Delete.
GET /links
List the workspace's links, newest first.
Query parameters
| Field | Type | Description |
|---|---|---|
| limit | number | Page size. Defaults to 20 and cannot exceed 100. |
| cursor | string | Pagination cursor returned by a previous list response. |
| search | string | Optional. Matches the short link, title, destination or description, ignoring case. |
| label | string | Optional. Only links with this label ID. |
Example request
curl --request GET \
--url 'https://api.feedhive.com/links?limit=20' \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'Response body
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request succeeded. |
| data.items | Link[] | Links on this page. |
| data.total | number | Links matching the search and label across every page. |
| data.has_more | boolean | Whether another page is available. |
| data.next_cursor | string | null | Cursor for the next page, or null when there are no more results. It only continues the same search and label. |
GET /links/:id
Fetch one link.
Path parameters
| Field | Type | Description |
|---|---|---|
| id | string | Link identifier. |
Example request
curl --request GET \
--url 'https://api.feedhive.com/links/3fbbb9dd-dcfa-4eb4-8a07-ceaae129fc5e' \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'Response body
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request succeeded. |
| data | Link | The link. |
Returns 404 with "Link not found" when the link isn't in the workspace.
POST /links
Create a short link.
Request body
| Field | Type | Description |
|---|---|---|
| destination_url | string | Required. Where the link redirects: an http or https URL without credentials, up to 2,048 characters. |
| title | string | Required. The link's name in FeedHive, 1–200 characters. |
| slug | string | Optional. 3–80 letters, numbers, hyphens or underscores. Needs your own link domain; leave it out for a generated one. |
| domain | string | Optional. One of your link domains. Defaults to the workspace's link domain, or FeedHive's. |
| description | string | null | Optional, up to 500 characters. |
| preview_image_url | string | null | Optional. Image URL shown when the link is shared. |
| preview_media_id | string | null | Optional. ID of an uploaded image from the Media API. Use this or preview_image_url, not both. |
| utm_source | string | null | Optional, up to 200 characters. The same goes for utm_medium, utm_campaign, utm_term and utm_content. |
| labels | string[] | Optional. Label IDs from the Labels API. |
Unknown fields return 400. A slug that's already taken on that domain returns 409 with the code SLUG_UNAVAILABLE, and an unknown label, image or domain returns 422.
Example request
curl --request POST \
--url 'https://api.feedhive.com/links' \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"destination_url": "https://fernwaycoffee.com/spring", "title": "Spring menu"}'Response body
Returns 201 with the new link.
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request succeeded. |
| data | Link | The created link. |
PATCH /links/:id
Change the fields you send. Every later click follows the change.
Path parameters
| Field | Type | Description |
|---|---|---|
| id | string | Link identifier. |
Request body
| Field | Type | Description |
|---|---|---|
| destination_url | string | Optional. Where the link redirects: an http or https URL without credentials, up to 2,048 characters. |
| title | string | Optional. The link's name in FeedHive, 1–200 characters. |
| slug | string | Optional. 3–80 letters, numbers, hyphens or underscores. Needs your own link domain; leave it out for a generated one. |
| domain | string | Optional. One of your link domains. Defaults to the workspace's link domain, or FeedHive's. |
| description | string | null | Optional, up to 500 characters. |
| preview_image_url | string | null | Optional. Image URL shown when the link is shared. |
| preview_media_id | string | null | Optional. ID of an uploaded image from the Media API. Use this or preview_image_url, not both. |
| utm_source | string | null | Optional, up to 200 characters. The same goes for utm_medium, utm_campaign, utm_term and utm_content. |
| labels | string[] | Optional. Replaces the link's labels. |
| disabled | boolean | Optional. true pauses the link so it stops redirecting; false turns it back on. |
Example request
curl --request PATCH \
--url 'https://api.feedhive.com/links/3fbbb9dd-dcfa-4eb4-8a07-ceaae129fc5e' \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"utm_campaign": "spring-2027"}'Response body
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request succeeded. |
| data | Link | The updated link. |
DELETE /links/:id
Delete a link. It stops redirecting.
Path parameters
| Field | Type | Description |
|---|---|---|
| id | string | Link identifier. |
Example request
curl --request DELETE \
--url 'https://api.feedhive.com/links/3fbbb9dd-dcfa-4eb4-8a07-ceaae129fc5e' \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'Response body
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request succeeded. |
| data | Link | The deleted link. |