BentoSdk.Tags (BentoSDK v0.1.1)

View Source

Functions for managing tags in Bento.

The Tags API allows you to:

  • Get all tags in your account
  • Create new tags

Tags are a simple named data point you can use to tag subscribers.

Summary

Functions

Create a new tag in your account.

Get all tags in your account.

Functions

create(name)

Create a new tag in your account.

Examples

BentoSdk.Tags.create("new_tag")
{:ok, %{
  "id" => "1234",
  "type" => "tags",
  "attributes" => %{
    "name" => "new_tag",
    "created_at" => "2024-08-06T05:44:04.444Z",
    "discarded_at" => nil
  }
}}

get()

Get all tags in your account.

Examples

BentoSdk.Tags.get()
{:ok, [
  %{
    "id" => "1234",
    "type" => "tags",
    "attributes" => %{
      "name" => "example_tag",
      "created_at" => "2024-08-06T05:44:04.444Z",
      "discarded_at" => nil
    }
  }
]}