Skip to main content
import {ATTIO_API_TOKEN} from "attio/server"
A token for your app to call the Attio REST API. The token can be passed to the REST API in the Authorization header. When you use this token, the REST API will be called on behalf of your app, so what the API will allow you to do depends on the scopes granted to your app.

Example: List all objects

import {ATTIO_API_TOKEN} from "attio/server"

...

const response = await fetch("https://api.attio.com/v2/objects", {
    headers: {
      "Authorization": `Bearer ${ATTIO_API_TOKEN}`,
      "Content-Type": "application/json"
    }
})

const data = await response.json()

data.forEach(object => {
  // do something with each object
})
I