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
/api/v1/connectionsList all connections in your organization, or fetch a single connection by ID.
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | No | Fetch a specific connection by ID |
Response (list)
{
"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=...)
{
"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
curl https://api.weavz.io/api/v1/connections \
-H "Authorization: Bearer wvz_your_api_key"Create Connection
/api/v1/connectionsCreate a new connection with stored credentials.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | One of: SECRET_TEXT, BASIC_AUTH, CUSTOM_AUTH, OAUTH2, PLATFORM_OAUTH2 |
externalId | string | Yes | Unique external identifier for this connection |
displayName | string | Yes | Human-readable name |
integrationName | string | Yes | Integration name (e.g., slack, gmail) |
workspaceId | string (uuid) | No | Associate with a workspace |
endUserId | string | No | Your end-user's identifier for per-user connection resolution |
scope | string | No | ORGANIZATION, WORKSPACE, or USER |
Type-Specific Fields
For SECRET_TEXT:
| Field | Type | Required | Description |
|---|---|---|---|
secretText | string | Yes | The secret value (API key, token, etc.) |
For BASIC_AUTH:
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Username |
password | string | Yes | Password |
For CUSTOM_AUTH:
| Field | Type | Required | Description |
|---|---|---|---|
props | object | Yes | Custom authentication properties |
For OAUTH2 / PLATFORM_OAUTH2:
| Field | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | OAuth access token |
refreshToken | string | No | OAuth refresh token |
tokenType | string | No | Token type (e.g., Bearer) |
expiresIn | integer | No | Token expiry in seconds |
scope_oauth | string | No | OAuth scopes granted |
data | object | No | Additional OAuth data |
Response (201)
{
"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
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
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Missing or invalid fields |
403 | QUOTA_EXCEEDED | Connection limit reached |
409 | DUPLICATE | Connection with this externalId already exists |
Delete Connection
/api/v1/connections/:idDelete a connection.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Connection ID |
Response
{
"deleted": true,
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab"
}Example
curl -X DELETE https://api.weavz.io/api/v1/connections/c1d2e3f4-5678-90ab-cdef-1234567890ab \
-H "Authorization: Bearer wvz_your_api_key"Errors
| Status | Code | Description |
|---|---|---|
404 | NOT_FOUND | Connection not found |
Resolve Connection
/api/v1/connections/resolveFind 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
| Field | Type | Required | Description |
|---|---|---|---|
integrationName | string | Yes | Integration name |
externalId | string | No | External identifier |
workspaceId | string (uuid) | Yes | Workspace scope |
endUserId | string | No | Your end-user's identifier for per-user connection resolution |
Response
{
"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
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
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Missing integration name |
404 | CONNECTION_NOT_FOUND | No matching connection found |