Authentication

Every /api/v1/ request carries an API key and secret, as two headers:

api-key: fob_mdm_xxxxxxxxxxxxxxxxxx
api-secret: xxxxxxxxxxxxxxxxxxxxxxxx

Not an Authorization: Bearer header: two separate headers, both required.

Example Request

curl -X GET "https://mdm.finopsbricks.com/api/v1/objects" \
  -H "api-key: $MDM_API_KEY" \
  -H "api-secret: $MDM_API_SECRET"

With the CLI or the client

fob-mdm sends these headers for you. It keeps the key and secret in a profile, which you create once with fob-mdm config profiles add <name>; it asks for both and checks the key before saving. It doesn't read them from environment variables. The JavaScript client takes them as arguments: fobMdm({ api_key, api_secret }).

Creating a key

Create keys under Settings → API Keys in your organization. A key belongs to one organization, and every request it makes sees only that organization's objects and records. Ids from another organization answer 404.

Permissions

A key has a scope per resource and action. GET needs read, POST needs create, PUT needs edit and DELETE needs delete.

ResourceCovers
objectsObjects
fieldsFields
recordsRecords: records, their values and history
integrationsIntegrations: connected apps, pulling their records and the record links
conformanceConformance contracts, reconcile, states, enforce and confirm
tagsTags

Two presets are offered when you create a key:

  • Full Access: every action on every resource. For importers and agents that write.
  • Read Only: read on every resource. For reporting and review.

Choose Custom to tick individual permissions.

Who made a change

Changes made with a key are recorded with the actor api_key:<id>, in a record's history and in the organization's Activity feed, which also shows the key's name.

Failures

StatusCodeMeaning
401UNAUTHORIZEDA header is missing, the key or secret is wrong, or the key has expired
403FORBIDDENThe key lacks the permission, e.g. API key lacks records:edit permission

See Errors for the full list.

Using an AI agent? Give it the raw Markdown of this page, or the docs index.