Nuntly.Namespaces (nuntly v0.1.0)

Copy Markdown View Source

Isolate inboxes by tenant, client, or agent using namespaces. Use an external ID to map namespaces to your own data model.

Summary

Functions

create_namespace(client, body, opts \\ [])

Create Namespace

Create a new namespace.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • body — application/json request body using CreateNamespaceRequest. Accepted fields:
    • "name" (string, required) — The display name of the namespace.
    • "externalId" (string, optional) — An optional external identifier for the namespace.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Namespaces.create_namespace(
  client,
  %{
    "name" => "name"
  }
)

delete_namespace(client, namespace_id, opts \\ [])

Delete Namespace

Soft-delete a namespace. Rejects if it has active inboxes.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • namespace_id — Required path parameter, string.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Namespaces.delete_namespace(client, "namespace-id")

list_namespace_inboxes(client, namespace_id, params \\ %{}, opts \\ [])

List Namespace Inboxes

List inboxes in a namespace.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • namespace_id — Required path parameter, string.
  • params — Optional map of query parameters:
    • "cursor" — Optional query parameter, string. Pagination cursor from a previous response
    • "limit" — Optional query parameter, integer. Maximum number of items to return Defaults to 30.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Namespaces.list_namespace_inboxes(
  client,
  "namespace-id",
  %{
    "cursor" => "cursor",
    "limit" => 30
  }
)

list_namespaces(client, params \\ %{}, opts \\ [])

List Namespaces

List all namespaces.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • params — Optional map of query parameters:
    • "cursor" — Optional query parameter, string. Pagination cursor from a previous response
    • "limit" — Optional query parameter, integer. Maximum number of items to return Defaults to 30.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Namespaces.list_namespaces(
  client,
  %{
    "cursor" => "cursor",
    "limit" => 30
  }
)

retrieve_namespace(client, namespace_id, opts \\ [])

Retrieve Namespace

Retrieve a namespace with inbox stats.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • namespace_id — Required path parameter, string.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Namespaces.retrieve_namespace(client, "namespace-id")

update_namespace(client, namespace_id, body, opts \\ [])

Update Namespace

Update a namespace.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • namespace_id — Required path parameter, string.
  • body — application/json request body using UpdateNamespaceRequest. Accepted fields:
    • "name" (string, optional) — The display name of the namespace.
    • "externalId" (string or nil, optional) — An optional external identifier for the namespace.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Namespaces.update_namespace(
  client,
  "namespace-id",
  %{
    "name" => "name"
  }
)