To create a service account in Observe via curl, you need to use the Observe API and create an Authtoken via the UI. Here’s how you can do it:
Service Accounts and Authtokens (via UI) are currently in private preview. Please open a support request to have this feature enabled in your tenant before following the instructions
Prerequisites
-
Admin privileges in your Observe organization.
-
Your Observe domain (e.g.,
yourdomain.observeinc.com). -
An API token with admin rights (you can generate this from the Observe UI under your user profile > Authtokens).
Step 1: Prepare Your API Token
You’ll need to use a Bearer token for authentication.
If you don’t have one, generate it in the Observe UI:
Workspace settings > Authtokens > Create API Token
Step 2: Create the Service Account
Here’s a sample curl command to create a service account:
curl -X POST "https://<yourtenant>.observeinc.com/v1/service-accounts" \
-H "Authorization: Bearer <yourtenant> <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"label":"Test Account"}'
-
Replace
<yourtenant>with your Observe tenant -
Replace
<YOUR_API_TOKEN>with your API token. -
Adjust the
labelas needed
Step 3: View Service Account
Once created, you can manage the accounts under Workspace settings > Users.
To view using the API:
curl https://<yourtenant>.observeinc.com/v1/service-accounts/<service_account_id> \
-H 'Authorization: Bearer <yourtenant> <API_TOKEN>'
where <service_account_id> is 49955 in the example with response:
{"id":"49955","label":"Test Account","description":"","createdBy":{"id":"42438"},"createdAt":"2025-09-18T18:53:04Z","updatedBy":{"id":"42438"},"updatedAt":"2025-09-18T18:53:04Z","disabled":false}
Step 4: Create service account token
You can create API tokens for service accounts and use them for bearer authentication to interact with the Observe APIs.
To create a new token for the service account with expiration of 24 hours,
curl https://<yourtenant>.observeinc.com/v1/service-accounts/<service_account_id>/api-tokens \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <yourtenant> <API_TOKEN>' \
-d '{"label":"app-automation", "lifetimeHours":24}'
with example response
{"id":"id-ABCDfghi-J","label":"app-automation","description":"","expiration":"2025-09-19T19:24:52Z","createdBy":{"id":"42438"},"createdAt":"2025-09-18T19:24:52Z","updatedBy":{"id":"42438"},"updatedAt":"2025-09-18T19:24:52Z","disabled":false,"secret":"<SERVICE_ACCOUNT_SECRET>"}
The full developer documentation can be found in the Observe API Reference


