Skip to content
Skillv1.0.0

attio-hello-world

Make your first Attio API calls -- list objects, create a person, query companies, and read attributes. Use when starting a new Attio integration or learning the API. Trigger: "attio hello world", "at

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/attio-hello-world/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill attio-hello-world. Copyright stays with the author (MIT).

Attio Hello World

Overview

Five progressively deeper API calls that exercise the Attio object/record model. Every call targets https://api.attio.com/v2 and returns JSON.

Prerequisites

  • Completed attio-install-auth (valid ATTIO_API_KEY in env)
  • Scopes: object_configuration:read, record_permission:read, record_permission:read-write

Instructions

Step 1: List Workspace Objects

Every Attio workspace has system objects (people, companies) and optional objects (deals, users, workspaces). Custom objects can be created.

curl -s https://api.attio.com/v2/objects \
  -H "Authorization: Bearer ${ATTIO_API_KEY}" | jq '.data[] | {slug: .api_slug, singular: .singular_noun}'
{"slug": "people", "singular": "Person"}
{"slug": "companies", "singular": "Company"}
{"slug": "deals", "singular": "Deal"}

Step 2: List Attributes on an Object

Objects have attributes (fields). Use the slug from Step 1.

curl -s "https://api.attio.com/v2/objects/people/attributes" \
  -H "Authorization: Bearer ${ATTIO_API_KEY}" | jq '.data[] | {slug: .api_slug, type: .type}'

Common people attributes: name (personal-name), email_addresses (email-address), phone_numbers (phone-number), description (text), primary_location (location), company (record-reference).

Step 3: Create a Person Record

const person = await attioFetch<{ data: { id: { record_id: string } } }>({
  method: "POST",
  path: "/objects/people/records",
  body: {
    data: {
      values: {
        email_addresses: ["ada@example.com"],
        name: [
          {
            first_name: "Ada",
            last_name: "Lovelace",
            full_name: "Ada Lovelace",
          },
        ],
        description: ["First computer programmer"],
      },
    },
  },
});

console.log("Created person:", person.data.id.record_id);

Key detail: Values are keyed by attribute slug. Most attributes accept an array (Attio supports multiselect by default). String shortcuts work for emails and domains.

Step 4: Query Records with Filters

// List people whose email contains "example.com"
const results = await attioFetch<{
  data: Array<{ id: { record_id: string }; values: Record<string, any> }>;
}>({
  method: "POST",
  path: "/objects/people/records/query",
  body: {
    filter: {
      email_addresses: {
        email_address: { $contains: "example.com" },
      },
    },
    sorts: [
      {
        attribute: "created_at",
        field: "created_at",
        direction: "desc",
      },
    ],
    limit: 10,
  },
});

console.log(`Found ${results.data.length} people`);

Step 5: Create a Company and Link It

// Create company
const company = await attioFetch<{ data: { id: { record_id: string } } }>({
  method: "POST",
  path: "/objects/companies/records",
  body: {
    data: {
      values: {
        name: ["Acme Corp"],
        domains: ["acme.com"],
        description: ["Enterprise widget manufacturer"],
      },
    },
  },
});

// Update person to link to company via record-reference
await attioFetch({
  method: "PATCH",
  path: `/objects/people/records/${person.data.id.record_id}`,
  body: {
    data: {
      values: {
        company: [
          {
            target_object: "companies",
            target_record_id: company.data.id.record_id,
          },
        ],
      },
    },
  },
});

Attio Data Model Quick Reference

Workspace
 └── Objects (people, companies, deals, custom)
      ├── Attributes (name, email, phone, custom)
      └── Records (individual people, companies)
           └── Values (attribute data on each record)

 └── Lists (pipelines, boards, custom groupings)
      └── Entries (records added to a list with list-specific attributes)

Output

Following this guide produces the Attio integration outcome for its topic—configuration, validation evidence, operational recovery, or a documented migration result. Record command output and relevant identifiers so a failed step is traceable.

Examples

Start with the smallest applicable command or code example in the relevant section, using a dedicated test record or workspace and non-production credentials. Confirm the expected response or validation result before applying the pattern to production.

Error Handling

Error Status Cause Solution
not_found 404 Wrong object slug or record ID Verify slug with GET /v2/objects
validation_error 422 Invalid attribute value format Check attribute type in docs
insufficient_scopes 403 Token missing write scope Add record_permission:read-write
duplicate_record 409 Record with same unique field exists Use PUT (assert) instead

Resources

Next Steps

Proceed to attio-local-dev-loop for development workflow, or attio-core-workflow-a for record CRUD patterns.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-attio-hello-world/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-attio-hello-world.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-attio-hello-world",
  "kind": "skill",
  "name": "attio-hello-world",
  "description": "Make your first Attio API calls -- list objects, create a person, query companies, and read attributes. Use when starting a new Attio integration or learning the API. Trigger: \"attio hello world\", \"attio example\", \"first attio call\", \"attio quick start\", \"try attio API\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "general_chat"
    ],
    "tags": [
      "skill-md",
      "saas",
      "crm",
      "attio",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Make your first Attio API calls -- list objects, create a person, query companies, and read attributes. Use when starting a new Attio integration or learning the API. Trigger: \"attio hello world\", \"attio example\", \"first attio call\", \"attio quick start\", \"try attio API\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/attio-hello-world/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/attio-hello-world/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/attio-hello-world/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(curl:*),",
      "Bash(npx:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Attio Hello World\n\n## Overview\n\nFive progressively deeper API calls that exercise the Attio object/record model. Every call targets `https://api.attio.com/v2` and returns JSON.\n\n## Prerequisites\n\n- Completed `attio-install-auth` (valid `ATTIO_API_KEY` in env)\n- Scopes: `object_configuration:read`, `record_permission:read`, `record_permission:read-write`\n\n## Instructions\n\n### Step 1: List Workspace Objects\n\nEvery Attio workspace has system objects (people, companies) and optional objects (deals, users, workspaces). Custom objects can be created.\n\n```bash\ncurl -s https://api.attio.com/v2/objec",
  "cost": {
    "context_tokens": 1325
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-attio-hello-world/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.