Tag
Tags are a way to organize your subscribers. You can create, update, and delete tags via the API. You can also list all tags for a given newsletter.
Tags don't have any strict functionality on their own, but you can send emails to subscribers with a given tag (or to all subscribers without a given tag.)
Basic tag
{"color": "string","creation_date": "2019-08-24T14:15:22Z","description": "string","id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","name": "string"}
field | type | description |
---|---|---|
id | string | |
name | string | |
color | string | |
description | string | |
secondary_id | integer | |
creation_date | string |
Create Tag
$ curl -X POST https://api.buttondown.email/v1/tags
Parameters
parameter | type | description | optional |
---|---|---|---|
name | string | ||
color | string | ||
description | string |
Responses
Status | Description | Sample Response |
---|---|---|
201 | Created |
|
400 | Bad Request |
|
403 | Forbidden |
|
List Tags
$ curl -X GET https://api.buttondown.email/v1/tags
Responses
Status | Description | Sample Response |
---|---|---|
200 | OK |
|
403 | Forbidden |
|
Retrieve Tag
$ curl -X GET https://api.buttondown.email/v1/tags/{pk}
Responses
Status | Description | Sample Response |
---|---|---|
200 | OK |
|
403 | Forbidden |
|
Update Tag
$ curl -X PATCH https://api.buttondown.email/v1/tags/{pk}
Parameters
parameter | type | description | optional |
---|---|---|---|
name | string | ||
color | string | ||
description | string | ||
secondary_id | integer |
Responses
Status | Description | Sample Response |
---|---|---|
200 | OK |
|
400 | Bad Request |
|
Error codes
type | identifier | description |
---|---|---|
Name already exists | name_already_exists | The name of the tag already exists |
Delete Tag
$ curl -X DELETE https://api.buttondown.email/v1/tags/{pk}
Responses
Status | Description | Sample Response |
---|---|---|
204 | No Content |
|
403 | Forbidden |
|
404 | Not Found |
|