Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Cardly

Scalekit connector
Open markdown

The Cardly connector lets your AI agent act in each user's Cardly account. Each user connects their own Cardly API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 47 tools.

Tools
47
What they doRead · write · destructive
26 · 12 · 926 read12 write9 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Cardly connection

    In AgentKit > Connections, create a Cardly connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'cardly'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Cardly:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'cardly_account_balance_get',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Cardly credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • cardly_account_balance_getGet the Cardly organisation's current credit and gift credit balance.Read-only

    Get Account Balance

    Get the Cardly organisation's current credit and gift credit balance. Returns the organisation's current balances. Use List Credit History for the transactions behind it.

    Inputs

    This tool takes no inputs.

  • cardly_art_getGet one piece of artwork by ID.Read-only

    Get Artwork

    Get one piece of artwork by ID. Returns its name, description, media and pages. Use List Artwork to find IDs.

    Inputs

    idstringrequired
    Cardly unique ID (UUID) of the record. Example: fd7368b0-ad4d-11ea-9da9-04d4c4254e1b.
  • cardly_art_listList the card artwork available to the organisation, optionally only its own.Read-only

    List Artwork

    List the card artwork available to the organisation, optionally only its own. Returns artwork with id, slug, name, media size and page previews. Use the id or slug in Generate Preview or Place Order.

    Inputs

    limitinteger
    Maximum number of records to return. Example: 25.
    offsetinteger
    Number of records to skip, for paging. Example: 0.
    own_onlyboolean
    If set to a truthy value, results will contain only artwork that belongs to your organisation and no shared or freely available artwork. Defaults to false, showing all artwork. Example: true.
  • cardly_contact_findFind a contact in a list by email address or external ID.Read-only

    Find Contact

    Find a contact in a list by email address or external ID. Returns the matching contact. Use List Contacts to browse the list.

    Inputs

    list_idstringrequired
    Cardly ID of the contact list. Get it from List Contact Lists. Example: a3b1c2d4-5e6f-11ee-8c99-0242ac120002.
    querystringrequired
    An email address or external identifier to locate a contact by within the given list. Example: thor@avengers.com.
  • cardly_contact_getGet one contact in a list by Cardly's contact ID.Read-only

    Get Contact

    Get one contact in a list by Cardly's contact ID. Returns the contact's name, email, address and custom fields. Use Find Contact to look up by email or external ID.

    Inputs

    idstringrequired
    Cardly unique ID (UUID) of the record. Example: fd7368b0-ad4d-11ea-9da9-04d4c4254e1b.
    list_idstringrequired
    Cardly ID of the contact list. Get it from List Contact Lists. Example: a3b1c2d4-5e6f-11ee-8c99-0242ac120002.
  • cardly_contact_list_getGet one contact list by ID.Read-only

    Get Contact List

    Get one contact list by ID. Returns its name, description and custom fields. Use List Contact Lists to find IDs.

    Inputs

    idstringrequired
    Cardly unique ID (UUID) of the record. Example: fd7368b0-ad4d-11ea-9da9-04d4c4254e1b.
  • cardly_contact_lists_listList the organisation's active contact lists.Read-only

    List Contact Lists

    List the organisation's active contact lists. Returns lists with id, name, description and custom fields. Use List Contacts for the contacts in a list.

    Inputs

    This tool takes no inputs.

  • cardly_contacts_listList the active contacts in a contact list.Read-only

    List Contacts

    List the active contacts in a contact list. Returns contacts with id, external ID, name, email, address and custom fields. Use Find Contact to look one up by email or external ID.

    Inputs

    list_idstringrequired
    Cardly ID of the contact list. Get it from List Contact Lists. Example: a3b1c2d4-5e6f-11ee-8c99-0242ac120002.