Learn how to connect and authenticate with the Well Core API using API keys.

Getting Started

To use the Well Core API, you need to create an API key for authentication. All API requests require a valid API key in the Authorization header.

Create your first API Key

Start by creating an API key to authenticate your requests

Authentication Methods

The Well Core API uses different authentication methods depending on the endpoint:
  • API Key Authentication: For most endpoints (companies, documents, emails, webhooks)
  • Firebase Authentication: For AI and contribution endpoints
  • Organization-scoped: Most resources are scoped to your organization

Quick Start Examples

// First, create an API key
const response = await fetch('https://api.well.com/v1/api-key', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_AUTH_TOKEN'
  },
  body: JSON.stringify({
    data: {
      type: 'api-key',
      attributes: {
        name: 'Production API Key',
        organisation: {
          id: 'your-org-uuid'
        }
      }
    }
  })
});

const { data } = await response.json();
const apiKey = data.attributes.value;

// Then use it for API calls
const companyResponse = await fetch('https://api.well.com/v1/companies', {
  headers: {
    'Authorization': `Bearer ${apiKey}`
  }
});

API Key Management

Response Format

All API responses follow the JSON:API specification:
{
  "data": {
    "type": "api_key",
    "attributes": {
      "id": "api-key-uuid",
      "value": "well_key_xxxxxxxxxxxx",
      "name": "Production API Key",
      "expiration_at": "2024-02-15T10:30:00Z"
    }
  }
}

Next Steps

  1. Create your first API key
  2. Explore the complete getting started guide