Before you start
Create a Server integration key with account:read in Project Settings → API keys. Set DATUMFORMS_API_KEY in your environment using your normal secret-management workflow. Run server examples on your machine or server, with Node.js 18+ or Python 3.10+.
Code example
cURL
curl --fail-with-body --get 'https://app.datumforms.com/api/developer-api' \
-H "Authorization: Bearer $DATUMFORMS_API_KEY" \
--data-urlencode 'operation=account.get'
JavaScript
const response = await fetch('https://app.datumforms.com/api/developer-api?operation=account.get', {
headers: { Authorization: 'Bearer ' + process.env.DATUMFORMS_API_KEY }
});
const result = await response.json();
if (!response.ok || result.success === false) throw Error(result.message || response.status);
console.log(result.account.id, result.account.name);
Save as quickstart.mjs and run node quickstart.mjs.
Python
import json, os, urllib.request
request = urllib.request.Request(
'https://app.datumforms.com/api/developer-api?operation=account.get',
headers={'Authorization': 'Bearer ' + os.environ['DATUMFORMS_API_KEY']})
with urllib.request.urlopen(request, timeout=60) as response:
result = json.load(response)
print(result['account']['id'], result['account']['name'])
Save as quickstart.py and run python3 quickstart.py.
Check the result
The JSON contains success: true and account with id, name, type and plan_type. Keep the project ID for operations that require an explicit project. A group ID, form ID and survey ID identify different resources.
Reuse the clients
Download client.mjs or client.py for the longer recipes. Put each recipe beside its client. Set a durable DATUMFORMS_RUN_ID for a write job and retain it when retrying that same job.
Troubleshooting
For 401, check the secret, expiry and revocation. For 403, check account:read; a reporting key may intentionally lack that permission. Handle errors and retries or create and publish a survey.