> For the complete documentation index, see [llms.txt](https://docs.erathos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.erathos.com/connectors/apis/nuvia-api.md).

# Nuvia API

## Using the Erathos platform

When selecting Nuvia API as a new connector on the Erathos platform, you will need to name your connection and fill in the following form:

* **Token** — your Nuvia API bearer token used to authenticate API requests

With this connection created you can seamlessly move your Nuvia API data to your BigQuery, Redshift or Postgres data warehouse.

### How to find my token?

To obtain your Nuvia API token, log in to your Nuvia account and navigate to **Settings → Integrations → API Keys**. If you don't already have an API key, create a new one by clicking the appropriate button and copying the generated value.

Paste the token into the **Token** field on the Erathos platform connection form.

Click **Save and close** to complete setup. Your Nuvia API connection is now ready to sync data to your data warehouse.

## Endpoints and fields

### agents

Sync type availability: Full-refresh

| Field       | Type      |
| ----------- | --------- |
| id          | integer   |
| name        | text      |
| description | text      |
| model       | text      |
| status      | text      |
| createdAt   | timestamp |
| updatedAt   | timestamp |

### campaigns

Sync type availability: Full-refresh

Parent of [campaign\_enrollments](#campaign_enrollments)

| Field     | Type      |
| --------- | --------- |
| id        | integer   |
| name      | text      |
| status    | text      |
| type      | text      |
| createdAt | timestamp |
| updatedAt | timestamp |

### campaign\_enrollments

Sync type availability: Full-refresh

Child of [campaigns](#campaigns)

| Field      | Type      |
| ---------- | --------- |
| id         | integer   |
| campaignId | integer   |
| contactId  | integer   |
| status     | text      |
| createdAt  | timestamp |
| updatedAt  | timestamp |

### contacts

Sync type availability: Full-refresh

| Field     | Type      |
| --------- | --------- |
| id        | integer   |
| name      | text      |
| email     | text      |
| phone     | text      |
| status    | text      |
| createdAt | timestamp |
| updatedAt | timestamp |

### conversations

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `createdAt`

Parent of [messages](#messages)

| Field     | Type      | Cursor |
| --------- | --------- | ------ |
| id        | integer   |        |
| subject   | text      |        |
| status    | text      |        |
| agentId   | integer   |        |
| contactId | integer   |        |
| createdAt | timestamp | ✓      |
| updatedAt | timestamp |        |

### inboxes

Sync type availability: Full-refresh

| Field     | Type      |
| --------- | --------- |
| id        | integer   |
| name      | text      |
| email     | text      |
| type      | text      |
| createdAt | timestamp |
| updatedAt | timestamp |

### knowledge

Sync type availability: Full-refresh

| Field     | Type      |
| --------- | --------- |
| id        | integer   |
| title     | text      |
| type      | text      |
| status    | text      |
| createdAt | timestamp |
| updatedAt | timestamp |

### messages

Sync type availability: Full-refresh

Child of [conversations](#conversations)

| Field          | Type      |
| -------------- | --------- |
| id             | integer   |
| conversationId | integer   |
| content        | text      |
| type           | text      |
| sender         | text      |
| createdAt      | timestamp |
| updatedAt      | timestamp |

### tables

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `updatedAt`

Parent of [table\_rows](#table_rows)

| Field       | Type      | Cursor |
| ----------- | --------- | ------ |
| id          | integer   |        |
| name        | text      |        |
| description | text      |        |
| createdAt   | timestamp |        |
| updatedAt   | timestamp | ✓      |

### table\_rows

Sync type availability: Full-refresh

Child of [tables](#tables)

| Field     | Type      |
| --------- | --------- |
| id        | integer   |
| tableId   | integer   |
| data      | json      |
| createdAt | timestamp |
| updatedAt | timestamp |

## Entity Relationships

```mermaid
erDiagram
    campaigns ||--o{ campaign_enrollments : "id = campaignId"
    contacts ||--o{ campaign_enrollments : "id = contactId"
    conversations ||--o{ messages : "id = conversationId"
    agents ||--o{ conversations : "id = agentId"
    contacts ||--o{ conversations : "id = contactId"
    tables ||--o{ table_rows : "id = tableId"

    agents {
        integer id PK
        text name
        text description
        text model
        text status
        timestamp createdAt
        timestamp updatedAt
    }

    campaigns {
        integer id PK
        text name
        text status
        text type
        timestamp createdAt
        timestamp updatedAt
    }

    campaign_enrollments {
        integer id PK
        integer campaignId
        integer contactId
        text status
        timestamp createdAt
        timestamp updatedAt
    }

    contacts {
        integer id PK
        text name
        text email
        text phone
        text status
        timestamp createdAt
        timestamp updatedAt
    }

    conversations {
        integer id PK
        text subject
        text status
        integer agentId
        integer contactId
        timestamp createdAt
        timestamp updatedAt
    }

    inboxes {
        integer id PK
        text name
        text email
        text type
        timestamp createdAt
        timestamp updatedAt
    }

    knowledge {
        integer id PK
        text title
        text type
        text status
        timestamp createdAt
        timestamp updatedAt
    }

    messages {
        integer id PK
        integer conversationId
        text content
        text type
        text sender
        timestamp createdAt
        timestamp updatedAt
    }

    tables {
        integer id PK
        text name
        text description
        timestamp createdAt
        timestamp updatedAt
    }

    table_rows {
        integer id PK
        integer tableId
        json data
        timestamp createdAt
        timestamp updatedAt
    }
```
