> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/l/lucid.md).

# Lucid

|                          |                               |
| ------------------------ | ----------------------------- |
| Category                 | Collaboration / diagramming   |
| Asset types              | Users                         |
| Authentication           | API key (Bearer)              |
| Direction                | OctoXLabs → Lucid (read only) |
| Supported Lucid versions | Not specified                 |
| Available since          | Not specified                 |

Lucid is a visual collaboration suite. OctoXLabs reads the users of your Lucid account and adds them to the user inventory.

## Use cases

* **Find Lucid users with no directory account.** List Lucid users that are not found in Active Directory. How accounts are matched depends on your user merge settings.

```
Adapters = lucid AND NOT Adapters = active-directory
```

* **List Lucid users by email domain.** Find accounts with an address outside your domain.

```
Adapters = lucid AND NOT Email ~ <your domain>
```

## Before you begin

### Network

| Source              | Destination                     | Port | Protocol |
| ------------------- | ------------------------------- | ---- | -------- |
| OctoXLabs connector | api.lucid.co (Domain parameter) | 443  | HTTPS    |

The connector always uses HTTPS. If a proxy is set, requests go through it.

### Required permissions

| Scope or role                                 | Permission | Needed for    |
| --------------------------------------------- | ---------- | ------------- |
| A permission that grants read access to users | Read       | Listing users |

The baseline says at least one permission that grants access to read users must be assigned to the API token.

## Create credentials in Lucid

{% stepper %}
{% step %}

### Open the developer portal

Navigate to the **API Keys** section of the developer portal.
{% endstep %}

{% step %}

### Create a key

Click **Create API Key** and enter the details for the new key.
{% endstep %}

{% step %}

### Generate

Click **Generate API key**.
{% endstep %}

{% step %}

### Copy the key

Save the key securely. After you leave the screen you cannot view it again.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter | Required | Type    | Default      | Description                                                                                                                                    |
| --------- | -------- | ------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Domain    | No       | String  | api.lucid.co | Domain of the Lucid API, without a scheme. The baseline shows the default as `https://api.lucid.co`, but the connector adds `https://` itself. |
| API Token | Yes      | String  | None         | Lucid API key.                                                                                                                                 |
| Proxy     | No       | String  | None         | Proxy address, used as `http://<value>` for HTTP and HTTPS.                                                                                    |
| Timeout   | No       | Integer | 30           | Seconds to wait for an API response.                                                                                                           |

## What the connection test does

The test requests one user (`pageSize` 1). It passes when the response body is not empty.

## API endpoints called

| Method | Path   | Purpose                                                                                                        |
| ------ | ------ | -------------------------------------------------------------------------------------------------------------- |
| GET    | /users | Lists users, 200 per page, following the `Link` header with `rel="next"`. The `Lucid-Api-Version` header is 1. |

When the API answers 429, the connector waits 60 seconds and retries, up to 5 attempts.

## Fields fetched

| Lucid field        | OctoXLabs field            |
| ------------------ | -------------------------- |
| email              | Email (primary identifier) |
| name               | DisplayName                |
| First word of name | FirstName                  |
| Rest of name       | LastName                   |

## Troubleshooting

| Error message                                                                   | Cause                                                                                   | Fix                                                                                            |
| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Failed to complete request to {url} after {n} retries. Last status code: {code} | The API kept answering with an error or 429.                                            | Run discovery again later and check the token.                                                 |
| Status Code: `, followed by URL, Method and the response body`                  | The API answered with a status other than 200. This is the shared REST connector error. | Read the status code and body in the message, then check the credentials, permissions and URL. |

## Change history
