Objects

December 13, 2025 ยท View on GitHub

Overview

Objects are the core data models inside of Attio. They contain standard objects, such as people, companies or deals, and custom objects that are specific to your use-case. See our data model guide for more information.

Available Operations

list

Lists all system-defined and user-defined objects in your workspace.

Required scopes: object_configuration:read.

Example Usage

import { Attio } from "attio-js";

const attio = new Attio({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const result = await attio.objects.list();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { AttioCore } from "attio-js/core.js";
import { objectsList } from "attio-js/funcs/objectsList.js";

// Use `AttioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const attio = new AttioCore({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const res = await objectsList(attio);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("objectsList failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetV2ObjectsResponse>

Errors

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

create

Creates a new custom object in your workspace.

Required scopes: object_configuration:read-write.

Example Usage

import { Attio } from "attio-js";

const attio = new Attio({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const result = await attio.objects.create({
    data: {
      apiSlug: "people",
      singularNoun: "Person",
      pluralNoun: "People",
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { AttioCore } from "attio-js/core.js";
import { objectsCreate } from "attio-js/funcs/objectsCreate.js";

// Use `AttioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const attio = new AttioCore({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const res = await objectsCreate(attio, {
    data: {
      apiSlug: "people",
      singularNoun: "Person",
      pluralNoun: "People",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("objectsCreate failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.PostV2ObjectsRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.PostV2ObjectsResponse>

Errors

Error TypeStatus CodeContent Type
errors.PostV2ObjectsSlugConflictError409application/json
errors.APIError4XX, 5XX*/*

get

Gets a single object by its object_id or slug.

Required scopes: object_configuration:read.

Example Usage

import { Attio } from "attio-js";

const attio = new Attio({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const result = await attio.objects.get({
    object: "people",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { AttioCore } from "attio-js/core.js";
import { objectsGet } from "attio-js/funcs/objectsGet.js";

// Use `AttioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const attio = new AttioCore({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const res = await objectsGet(attio, {
    object: "people",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("objectsGet failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.GetV2ObjectsObjectRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetV2ObjectsObjectResponse>

Errors

Error TypeStatus CodeContent Type
errors.GetV2ObjectsObjectNotFoundError404application/json
errors.APIError4XX, 5XX*/*

partialUpdate

Updates a single object. The object to be updated is identified by its object_id.

Required scopes: object_configuration:read-write.

Example Usage

import { Attio } from "attio-js";

const attio = new Attio({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const result = await attio.objects.partialUpdate({
    object: "people",
    requestBody: {
      data: {
        apiSlug: "people",
        singularNoun: "Person",
        pluralNoun: "People",
      },
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { AttioCore } from "attio-js/core.js";
import { objectsPartialUpdate } from "attio-js/funcs/objectsPartialUpdate.js";

// Use `AttioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const attio = new AttioCore({
  apiKey: process.env["ATTIO_API_KEY"] ?? "",
});

async function run() {
  const res = await objectsPartialUpdate(attio, {
    object: "people",
    requestBody: {
      data: {
        apiSlug: "people",
        singularNoun: "Person",
        pluralNoun: "People",
      },
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("objectsPartialUpdate failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.PatchV2ObjectsObjectRequest:heavy_check_mark:The request object to use for the request.
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.PatchV2ObjectsObjectResponse>

Errors

Error TypeStatus CodeContent Type
errors.PatchV2ObjectsObjectValidationTypeError400application/json
errors.GetV2ObjectsObjectNotFoundError404application/json
errors.PatchV2ObjectsObjectSlugConflictError409application/json
errors.APIError4XX, 5XX*/*