Quickstart

1. Grab an API key

Visit exayard.com/settings/profile/security and create a key scoped to what you need (e.g. read:projects + write:estimates).

2. Call /v1/me to get your organization ID

curl https://api.exayard.com/v1/me \
  -H "Authorization: Bearer sk_live_..."

The response's memberships[].orgId values are your organization IDs. Every org-scoped endpoint takes one as organizationId — it's a 32-character ID like js79m7b3kfqd3vqzwx0kpcnryx7h2k4e, not your organization's name.

Or use the TypeScript SDK:

import { Exayard } from '@exayard/sdk'

const exa = new Exayard({ apiKey: process.env.EXAYARD_API_KEY! })
const me = await exa.me.get()

Or the CLI:

exayard login --api-key sk_live_...
exayard projects:list --org js79m7b3kfqd3vqzwx0kpcnryx7h2k4e

3. Handle errors

Every non-2xx response is RFC 9457 application/problem+json. The SDK turns it into a typed ExayardError:

import { Exayard, ExayardError } from '@exayard/sdk'

try {
  await exa.projects.create({ organizationId: 'js79m7b3kfqd3vqzwx0kpcnryx7h2k4e', name: 'Demo' })
} catch (err) {
  if (err instanceof ExayardError && err.isRateLimited()) {
    // Honor RateLimit-Policy reset before retrying
  }
  if (err instanceof ExayardError && err.isInsufficientScope()) {
    console.error('Need scope:', err.param)
  }
  throw err
}

4. Subscribe to webhooks

Register an endpoint once, then verify deliveries on your side. See Subscribe to webhooks for the full flow.