Skip to main content

Overview

This recipe walks you through finding your credentials in the Aptly UI and making a live API call to confirm everything is working.

What you need

  • An Aptly account with at least one board
  • Node.js 18 or later installed, or a terminal with cURL

Step 1: Get your API key and board ID

  1. Open the board you want to connect to
  2. Click Card Sources in the board toolbar
  3. Select API
  4. Toggle the switch to enable the REST API
  5. Copy your API Key and note the board ID in the POST URL
The POST URL looks like this: https://app.getaptly.com/api/aptlet/YOUR_BOARD_ID The board ID is the last segment of that URL.

Step 2: Fetch the board schema

Before posting any data, fetch the schema to see what fields are available on the board.
curl "https://app.getaptly.com/api/schema/YOUR_BOARD_ID" \
  -H "x-token: YOUR_API_KEY"
A successful response looks like this:
{
  "fields": [
    { "uuid": "abc123", "name": "Name", "type": "text" },
    { "uuid": "def456", "name": "Stage", "type": "select" },
    { "uuid": "ghi789", "name": "Email", "type": "email" }
  ]
}

Step 3: Post a test card

Now post a card using field names from the schema you just retrieved.
const response = await fetch(
  "https://app.getaptly.com/api/aptlet/YOUR_BOARD_ID",
  {
    method: "POST",
    headers: {
      "x-token": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      Name: "Test Card",
      Stage: "New",
    }),
  }
);

const data = await response.json();
console.log("Created card ID:", data._id);
A successful response returns the new card’s ID:
{ "_id": "JShpBxEFgRmZnivTf" }

Step 4: Confirm the card exists

Retrieve the card you just created using the ID from the previous step.
const cardId = "JShpBxEFgRmZnivTf";

const response = await fetch(
  `https://app.getaptly.com/api/card/${cardId}`,
  {
    headers: { "x-token": "YOUR_API_KEY" },
  }
);

const card = await response.json();
console.log(card);
If you see your card data returned, you are fully set up and ready to integrate.

Next steps