# Rebrandly

> Create, update and delete branded short links, and list links and domains.

App · 9 actions. Web page: https://docs.lodol.com/docs/integrations/rebrandly

## Actions

### Count links

Count your short links, all of them or those matching a filter.

**Inputs**

- Domain (`domain_id`, text): Only links on this branded domain.
- Favourite (`favourite`, true/false): Only favorite links when on, only the others when off. Leave empty for all.

**Outputs**

- `data` (object): The response from Rebrandly.

**Example output**

```json
{
  "data": {
    "count": 1
  }
}
```

### Create a short link

Create a branded short link to a web address.

**Inputs**

- Destination (`destination`, text, required): The web address the short link sends people to.
- Domain (`domain_id`, text): The branded domain for the link. Leave empty to use rebrand.ly.
- Slashtag (`slashtag`, text): The part after the domain, such as spring-sale. Letters, digits, - and _. Leave empty for a random one.
- Title (`title`, text): A title to remember the link by.

**Outputs**

- `data` (object): The response from Rebrandly.

**Example output**

```json
{
  "data": {
    "clicks": 1,
    "createdAt": "example",
    "destination": "example",
    "domain": {
      "fullName": "example",
      "id": "example",
      "ref": "example"
    },
    "favourite": true,
    "forwardParameters": true,
    "id": "example",
    "lastClickAt": "example",
    "shortUrl": "example",
    "slashtag": "example",
    "status": "example",
    "title": "example",
    "updatedAt": "example"
  }
}
```

### Delete a link

Delete a short link. It stops redirecting at once.

**Inputs**

- Link (`link_id`, text, required): The link's ID, as a list or create step returns it.

**Outputs**

- `data` (object): The response from Rebrandly.

**Example output**

```json
{
  "data": {
    "clicks": 1,
    "createdAt": "example",
    "destination": "example",
    "domain": {
      "fullName": "example",
      "id": "example",
      "ref": "example"
    },
    "favourite": true,
    "forwardParameters": true,
    "id": "example",
    "lastClickAt": "example",
    "shortUrl": "example",
    "slashtag": "example",
    "status": "example",
    "title": "example",
    "updatedAt": "example"
  }
}
```

### Get a link

Get a short link's destination, title, domain and click count.

**Inputs**

- Link (`link_id`, text, required): The link's ID, as a list or create step returns it.

**Outputs**

- `data` (object): The response from Rebrandly.

**Example output**

```json
{
  "data": {
    "clicks": 1,
    "createdAt": "example",
    "destination": "example",
    "domain": {
      "fullName": "example",
      "id": "example",
      "ref": "example"
    },
    "favourite": true,
    "forwardParameters": true,
    "id": "example",
    "lastClickAt": "example",
    "shortUrl": "example",
    "slashtag": "example",
    "status": "example",
    "title": "example",
    "updatedAt": "example"
  }
}
```

### Get the account

Get the connected account's details and plan usage.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Rebrandly.

**Example output**

```json
{
  "data": {
    "avatarUrl": "example",
    "createdAt": "example",
    "email": "example",
    "fullName": "example",
    "id": "example",
    "subscription": {
      "category": "example",
      "createdAt": "example",
      "limits": {
        "domains": {
          "max": 1,
          "used": 1
        },
        "links": {
          "max": 1,
          "used": 1
        },
        "scripts": {
          "max": 1,
          "used": 1
        },
        "tags": {
          "max": 1,
          "used": 1
        },
        "teammates": {
          "max": 1,
          "used": 1
        },
        "workspaces": {
          "max": 1,
          "used": 1
        }
      }
    },
    "username": "example"
  }
}
```

### List domains

List the branded domains you can use for short links.

**Inputs**

- Active (`active`, true/false): Only domains that can be used for new links when on.
- Type (`type`, text): Only your own domains (user) or Rebrandly's (service). One of: `user`, `service`.
- Order by (`order_by`, text): What to sort by. Default is creation time. One of: `createdAt`, `updatedAt`, `fullName`.
- Order dir (`order_dir`, text): Descending or ascending. Default is descending. One of: `desc`, `asc`.
- Limit (`limit`, number): How many domains to return, up to 25. Default is 25. From 1 to 25.
- Last (`last`, text): For the next page: the ID of the last domain of the previous page.

**Outputs**

- `data` (list): The response from Rebrandly.

**Example output**

```json
{
  "data": [
    {
      "active": true,
      "createdAt": "example",
      "fullName": "example",
      "id": "example",
      "topLevelDomain": "example",
      "type": "example",
      "updatedAt": "example"
    }
  ]
}
```

### List links

List short links, one page at a time, newest first unless you choose otherwise.

**Inputs**

- Domain (`domain_id`, text): Only links on this branded domain.
- Slashtag (`slashtag`, text): Only the link with this slashtag. Needs a domain.
- Favourite (`favourite`, true/false): Only favorite links when on, only the others when off. Leave empty for all.
- Order by (`order_by`, text): What to sort by. Default is creation time. One of: `createdAt`, `updatedAt`.
- Order dir (`order_dir`, text): Newest or oldest first. Default is newest first. One of: `desc`, `asc`.
- Limit (`limit`, number): How many links to return, up to 25. Default is 25. From 1 to 25.
- Last (`last`, text): For the next page: the ID of the last link of the previous page.

**Outputs**

- `data` (list): The response from Rebrandly.

**Example output**

```json
{
  "data": [
    {
      "clicks": 1,
      "createdAt": "example",
      "destination": "example",
      "domain": {
        "fullName": "example",
        "id": "example",
        "ref": "example"
      },
      "favourite": true,
      "forwardParameters": true,
      "id": "example",
      "lastClickAt": "example",
      "shortUrl": "example",
      "slashtag": "example",
      "status": "example",
      "title": "example",
      "updatedAt": "example"
    }
  ]
}
```

### List workspaces

List the workspaces the account can reach, with each one's ID.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Rebrandly.

**Example output**

```json
{
  "data": [
    {
      "createdAt": "example",
      "default": true,
      "id": "example",
      "name": "example",
      "role": "example",
      "type": "example"
    }
  ]
}
```

### Update a link

Replace a link's destination, title and favorite flag.

**Inputs**

- Link (`link_id`, text, required): The link's ID, as a list or create step returns it.
- Destination (`destination`, text): The new address the short link sends people to. Leave empty to keep it.
- Title (`title`, text): The new title. Leave empty to keep it.
- Favourite (`favourite`, true/false): Mark the link as a favorite, or not. Leave empty to keep it as it is.

**Outputs**

- `data` (object): The response from Rebrandly.

**Example output**

```json
{
  "data": {
    "clicks": 1,
    "createdAt": "example",
    "destination": "example",
    "domain": {
      "fullName": "example",
      "id": "example",
      "ref": "example"
    },
    "favourite": true,
    "forwardParameters": true,
    "id": "example",
    "lastClickAt": "example",
    "shortUrl": "example",
    "slashtag": "example",
    "status": "example",
    "title": "example",
    "updatedAt": "example"
  }
}
```
