Functions for managing Attio objects.
Objects are the core data models in Attio. Standard objects (people, companies,
deals) are provided by the workspace; custom objects can be created via create/2.
Requires the object_configuration:read scope for read operations and
object_configuration:read-write for mutations.
Summary
Functions
Creates a new custom object.
Gets a single object by its ID or slug.
Lists all objects in the workspace.
Lists saved views for an object.
Updates an object's configuration.
Functions
@spec create(Attio.Client.t(), map()) :: {:ok, map()} | {:error, term()}
Creates a new custom object.
Required attributes
"api_slug"- URL-safe identifier (e.g."my_object")"singular_noun"- Display name for a single record (e.g."Deal")"plural_noun"- Display name for multiple records (e.g."Deals")
@spec get(Attio.Client.t(), String.t()) :: {:ok, map()} | {:error, term()}
Gets a single object by its ID or slug.
Example
Attio.Objects.get(client, "people")
Attio.Objects.get(client, "97052eb9-e65e-443f-a297-f2d9a4a7f795")
@spec list(Attio.Client.t()) :: {:ok, map()} | {:error, term()}
Lists all objects in the workspace.
@spec list_views(Attio.Client.t(), String.t()) :: {:ok, map()} | {:error, term()}
Lists saved views for an object.
@spec update(Attio.Client.t(), String.t(), map()) :: {:ok, map()} | {:error, term()}
Updates an object's configuration.