eavz

Connections

Manage integration connections and credentials.

Connections

Connections store authentication credentials for third-party integrations. Each connection is tied to a specific integration (e.g., Slack, Gmail) and can be scoped to an organization, workspace, or individual user.

List Connections

GET/api/v1/connections

List all connections in your organization, or fetch a single connection by ID.

Query Parameters

FieldTypeRequiredDescription
idstring (uuid)NoFetch a specific connection by ID

Response (list)

json
{
  "connections": [
    {
      "id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
      "externalId": "slack-main",
      "displayName": "Slack (Main Workspace)",
      "integrationName": "slack",
      "type": "PLATFORM_OAUTH2",
      "status": "ACTIVE",
      "scope": "ORGANIZATION",
      "workspaceId": null,
      "endUserId": null,
      "createdAt": "2025-01-15T10:30:00.000Z",
      "updatedAt": "2025-01-15T10:30:00.000Z"
    }
  ],
  "total": 1
}

Response (single, with ?id=...)

json
{
  "connection": {
    "id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
    "externalId": "slack-main",
    "displayName": "Slack (Main Workspace)",
    "integrationName": "slack",
    "type": "PLATFORM_OAUTH2",
    "status": "ACTIVE",
    "scope": "ORGANIZATION",
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}

Example

bash
curl https://api.weavz.io/api/v1/connections \
  -H "Authorization: Bearer wvz_your_api_key"

Create Connection

POST/api/v1/connections

Create a new connection with stored credentials.

Request Body

FieldTypeRequiredDescription
typestringYesOne of: SECRET_TEXT, BASIC_AUTH, CUSTOM_AUTH, OAUTH2, PLATFORM_OAUTH2
externalIdstringYesUnique external identifier for this connection
displayNamestringYesHuman-readable name
integrationNamestringYesIntegration name (e.g., slack, gmail)
workspaceIdstring (uuid)NoAssociate with a workspace
endUserIdstringNoYour end-user's identifier for per-user connection resolution
scopestringNoORGANIZATION, WORKSPACE, or USER

Type-Specific Fields

For SECRET_TEXT:

FieldTypeRequiredDescription
secretTextstringYesThe secret value (API key, token, etc.)

For BASIC_AUTH:

FieldTypeRequiredDescription
usernamestringYesUsername
passwordstringYesPassword

For CUSTOM_AUTH:

FieldTypeRequiredDescription
propsobjectYesCustom authentication properties

For OAUTH2 / PLATFORM_OAUTH2:

FieldTypeRequiredDescription
accessTokenstringYesOAuth access token
refreshTokenstringNoOAuth refresh token
tokenTypestringNoToken type (e.g., Bearer)
expiresInintegerNoToken expiry in seconds
scope_oauthstringNoOAuth scopes granted
dataobjectNoAdditional OAuth data

Response (201)

json
{
  "connection": {
    "id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
    "externalId": "openai-prod",
    "displayName": "OpenAI Production",
    "integrationName": "openai",
    "type": "SECRET_TEXT",
    "status": "ACTIVE",
    "scope": "ORGANIZATION",
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}

Example

bash
curl -X POST https://api.weavz.io/api/v1/connections \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "SECRET_TEXT",
    "externalId": "openai-prod",
    "displayName": "OpenAI Production",
    "integrationName": "openai",
    "secretText": "sk-..."
  }'

Errors

StatusCodeDescription
400VALIDATION_ERRORMissing or invalid fields
403QUOTA_EXCEEDEDConnection limit reached
409DUPLICATEConnection with this externalId already exists

Delete Connection

DELETE/api/v1/connections/:id

Delete a connection.

Path Parameters

FieldTypeDescription
idstring (uuid)Connection ID

Response

json
{
  "deleted": true,
  "id": "c1d2e3f4-5678-90ab-cdef-1234567890ab"
}

Example

bash
curl -X DELETE https://api.weavz.io/api/v1/connections/c1d2e3f4-5678-90ab-cdef-1234567890ab \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
404NOT_FOUNDConnection not found

Resolve Connection

POST/api/v1/connections/resolve

Find a connection by integration name and optional scoping parameters. This is useful when you know the integration and external ID but not the connection's internal UUID.

Request Body

FieldTypeRequiredDescription
integrationNamestringYesIntegration name
externalIdstringNoExternal identifier
workspaceIdstring (uuid)YesWorkspace scope
endUserIdstringNoYour end-user's identifier for per-user connection resolution

Response

json
{
  "connection": {
    "id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
    "externalId": "slack-main",
    "displayName": "Slack (Main Workspace)",
    "integrationName": "slack",
    "type": "PLATFORM_OAUTH2",
    "status": "ACTIVE",
    "scope": "ORGANIZATION",
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}

Example

bash
curl -X POST https://api.weavz.io/api/v1/connections/resolve \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "externalId": "slack-main",
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'

Errors

StatusCodeDescription
400VALIDATION_ERRORMissing integration name
404CONNECTION_NOT_FOUNDNo matching connection found