Tags

Tags are a short descriptive piece of text that can be used to group similar calls together.

Contents

Listing All Tags

Returns a paginated list of all tags for the given company.

API Endpoint

Method URL
GET /v1/companies/{company_id}/tags.json

Request Parameters

Name Type Required? Description
per_page number optional How many tags to return for this request (default 100, maximum 250).
Example: 25
page number optional Page number that should be returned for this request (the first page is 1).
Example: 3

Response Fields

Name Type Description
id number Unique identifier for the tag.
Example: 123618124
name string The text describing the tag.
Example: “New Business”

Example

curl -H "Authorization: Token token=abc1234" \
  https://api.callrail.com/v1/companies/291571/tags.json?per_page=2&page=1
  "page": 1,
  "per_page": 2,
  "total_pages": 2,
  "total_records": 4,
  "tags": [
    {
      "id": 1,
      "name": "New Customer"
    },
    {
      "id": 2,
      "name": "Support Call"
    }
  ]
}

Retrieving a Single Tag

Returns a single Tag object.

API Endpoint

Method URL
GET /v1/companies/{company_id}/tags/{tag_id}.json

Request Parameters

None

Response Fields

Name Type Description
id number Unique identifier for the tag.
Example: 123618124
name string The text describing the tag.
Example: “New Business”

Example

curl -H "Authorization: Token token=abc1234" \
  https://api.callrail.com/v1/companies/291571/tags/1.json
{
  "id": 1,
  "name": "New Customer"
}

Creating a Tag

Creates a new Tag object.

API Endpoint

Method URL
POST /v1/companies/{company_id}/tags.json

Request Body

Name Type Required? Description
name string required The new tag name to create.
Example: “Customer Support”

Response Fields

Name Type Description
id number Unique identifier for the tag.
Example: 123618124
name string The text describing the tag.
Example: “New Business”

Example

curl -H "Authorization: Token token=abc1234" \
     -H "Content-Type: application/json"     \
     -d '{"name": "Support Call"}' \
  https://api.callrail.com/v1/companies/527915/tags.json
{
  "id": 5,
  "name": "Support Call"
}

Renaming a Tag

Change the name associated with a tag. All calls that are tagged with the tag will be updated.

API Endpoint

Method URL
PUT /v1/companies/{company_id}/tags/{tag_id}.json

Request Body

Name Type Required? Description
name string required The new text for the tag.
Example: “Customer Support”

Response Fields

None. On success, response will be 204 NO CONTENT.

Example

curl -H "Authorization: Token token=abc1234" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Name"} \
  https://api.callrail.com/v1/companies/291571/tags/5.json
< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< Connection: close
<
* Closing connection 0

Deleting a Tag

Removes a Tag. Any calls with this tag will now be Uncategorized.

API Endpoint

Method URL
DELETE /v1/companies/{company_id}/tags/{tag_id}.json

Request Parameters

None.

Response Fields

None. On success, response will be 204 NO CONTENT.

Example

curl -H "Authorization: Token token=abc1234" \
  -X DELETE \
  -v \
  https://api.callrail.com/v1/companies/291571/tags/5.json
< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< Connection: close
<
* Closing connection 0

Tagging a Call

See Adding Tags or a Note to a Call.