BentoSdk.Fields (BentoSDK v0.1.1)

View Source

Functions for managing fields in Bento.

The Fields API allows you to:

  • Get all fields in your account
  • Create new fields

Fields are simple named key-value pairs, think of them as form fields.

Summary

Functions

Create a new field in your account.

Get all fields in your account.

Functions

create(key)

Create a new field in your account.

Examples

BentoSdk.Fields.create("company")
{:ok, %{
  "id" => "1234",
  "type" => "fields",
  "attributes" => %{
    "key" => "company",
    "created_at" => "2024-08-06T05:44:04.444Z",
    "discarded_at" => nil
  }
}}

get()

Get all fields in your account.

Examples

BentoSdk.Fields.get()
{:ok, [
  %{
    "id" => "1234",
    "type" => "fields",
    "attributes" => %{
      "key" => "company",
      "created_at" => "2024-08-06T05:44:04.444Z",
      "discarded_at" => nil
    }
  }
]}