Sending GET request to this url, returns collection of TAGS resources.

You can narrow down list of resources by passing proper query parameters (list of which you can find below in request params section). You can basically search by:

  • name,
  • createdAt

`createdAt` field have it's own subfields: `from` and `to`. You can specify only one of them or both. Date format must be send in Y-m-d format.
If you use more than one of above fields we will combine them using AND logic.

You can specify which page of results you want and how many results per page should be there. You can also specify sort-order using one or more of allowed fields (listed below in request params section).

Last but not least you can even specify which fields from resource you want to get. If you pass param `fields` with list of fields (separated by comma [,]) we will return list of resources with only those fields (we will always add resource id to ensure that you can use that data later on).

Returns status code

200

Request url

/tags

Request params

Field nameField typeField description
queryhashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
name*
createdAt[from]Y-m-d
createdAt[to]Y-m-d
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
sorthashEnable sorting using specified field (set as a key) and order (set as a value). You can specify multiple fields to sort by.
KeyPossible values if fixed
createdAtasc,desc
pageintegerSpecify which page of results return.
perPageintegerSpecify how many results per page should be returned

Example Response

[
    {
        "tagId": "B",
        "name": "Red",
        "href": "http://api.getresponse.com/v3/tags/B"
    }
]

Sending GET request to this url, returns single TAG resource. You must specify tagId in the request URL.

The only query parameter you can specify is `fields` which allows you to narrow down list of fields that will be return in resource body (we will always add resource id to ensure that you can use that data later on). You can specify which field to return by passing them as a list separated by comma [,]

 

Returns status code

200

Request url

/tags/V?fields=name

Request params

Field nameField typeField description
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma

Example Response

{
    "tagId": "V",
    "createdAt": "2015-09-14T09:19:35+0000",
    "name": "Red"
}

Sending POST request to this url, you will create new TAG resource.

In order to create new TAG, you need to send TAG resource in BODY of the request (remember that you need to serialize body into JSON string)

Returns status code

201

Example Request Body

{
    "name": "foo"
}

Body params

Field nameField typeField description
name (required)stringName of the tag

Example Response

{
    "tagId": "p5ed",
    "name": "foo",
    "color": "",
    "createdAt": "2017-03-28T01:22:50+0000"
}

Possible Errors


Sending POST request to this url allows to change property of an tag. You need to attach TAG resource in the request body. You can send only those field that should be changed.

Returns status code

200

Example Request Body

{
    "name": "Blue"
}

Body params

Field nameField typeField description
namestringName of the tag (length 2-255)

Example Response

{
    "tagId": "V",
    "href": "https://api.getresponse.com/v3/tags/V",
    "name": "Blue"
}

Possible Errors


Returns status code

204