# How to Create a Service Account in Observe

**URL:** <https://community.observeinc.com/t/how-to-create-a-service-account-in-observe/219>\
**Category:** General / Other\
**Tags:** api, how-to\
**Created:** [September 18, 2025, 7:29pm UTC](https://community.observeinc.com/t/how-to-create-a-service-account-in-observe/219 "2025-09-18T19:29:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhil.dua](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.observeinc.com/nikhil.dua/32/10_2.png) [@nikhil.dua](https://community.observeinc.com/u/nikhil.dua)\
**Post date:** [September 18, 2025, 7:29pm UTC](https://community.observeinc.com/t/how-to-create-a-service-account-in-observe/219/1 "2025-09-18T19:29:03Z")

</div>

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**

 ![Screenshot 2025-09-18 at 12.05.55 PM](https://canada1.discourse-cdn.com/flex030/uploads/observe_test/original/1X/7b50080b2099e10318b8d2817720b65b6e2c967c.png)

 ![Screenshot 2025-09-18 at 12.06.20 PM](https://canada1.discourse-cdn.com/flex030/uploads/observe_test/original/1X/5f74914872ac3ae3a80c9351e4b03d3cea6df6ee.png)

* * *

## **Step 2: Create the Service Account**

Here’s a sample `curl` command to create a service account:

```bash
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 `label` as needed

* * *

## **Step 3: View Service Account**

Once created, you can manage the accounts under **Workspace settings \> Users**.

 ![Screenshot 2025-09-18 at 12.15.53 PM](https://canada1.discourse-cdn.com/flex030/uploads/observe_test/original/1X/e29c4ecfd8bcaa4f3598792d1b9e2a47ff78aba5.png)

To view using the API:

```auto
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:

```json
{"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,

```bash
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

```bash
{"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](https://developer.observeinc.com/#tag/serviceaccounts)

---

<div class="post-metadata">

**Author:** ![jwatte](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jwatte](https://community.observeinc.com/u/jwatte)\
**Post date:** [September 19, 2025, 5:17am UTC](https://community.observeinc.com/t/how-to-create-a-service-account-in-observe/219/2 "2025-09-19T05:17:57Z")

</div>

I can’t find “Authtokens” in my workspace settings; does this require a feature flag to enable?

---

<div class="post-metadata">

**Author:** ![nikhil.dua](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.observeinc.com/nikhil.dua/32/10_2.png) [@nikhil.dua](https://community.observeinc.com/u/nikhil.dua)\
**Post date:** [September 19, 2025, 4:44pm UTC](https://community.observeinc.com/t/how-to-create-a-service-account-in-observe/219/3 "2025-09-19T16:44:22Z")

</div>

I have updated the guide to also include “Authtokens” in private preview. Just enabled for your tenant!
