Connectors

Create an API-key connector

Create a connector from a user-provided API key for providers that support key validation.

post/v1/oauth/connections/api_key

Request

  • Base URL: https://api.sprites.dev
  • URL: https://api.sprites.dev/v1/oauth/connections/api_key
  • Auth: HTTP bearer

Request body

api_keystring required

Provider API key. Stored encrypted and never returned by the API.

base_api_urlstring

Required for Upstash Redis: immutable HTTPS database REST URL. Not used by fixed-host providers.

providerstring required

API-key provider.

Example request

{
  "access_policy": {
    "allowed_endpoints": [
      "/chat.*"
    ],
    "blocked_endpoints": [
      "/admin.*"
    ],
    "name_prefix": "prod-",
    "sprite_labels": [
      "api-access"
    ]
  },
  "api_key": "sk-or-...",
  "base_api_url": "https://your-database.upstash.io",
  "provider": "openrouter"
}

Response

Created

Example response

{
  "connection": {
    "access_policy": {
      "allowed_endpoints": [
        "/chat.*"
      ],
      "blocked_endpoints": [
        "/admin.*"
      ],
      "name_prefix": "prod-",
      "sprite_labels": [
        "api-access"
      ]
    },
    "connection_type": "oauth",
    "id": "conn_abc123",
    "inserted_at": "2026-04-28T12:00:00Z",
    "notes": [
      {
        "title": null,
        "body": "Full-access key."
      }
    ],
    "provider": "slack",
    "provider_account_id": "T12345",
    "provider_account_name": "Example Workspace",
    "provider_info": {
      "team_domain": "example"
    },
    "scopes": "chat:write,channels:read",
    "token_expires_at": "2026-04-29T12:00:00Z",
    "updated_at": "2026-04-29T12:00:00Z",
    "usage_snippet": "curl https://api.sprites.dev/v1/gateway/slack/conn_abc123/auth.test",
    "user_id": "user_abc123"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.