Skip to main content
All Forge product APIs use the same authentication pattern. Send your API key in the Authorization header as a bearer token.
Authorization: Bearer YOUR_API_KEY
API keys are product-specific and not interchangeable.A Mailforge API key only works with Mailforge APIs. A Salesforge API key only works with Salesforge APIs. You cannot use a Mailforge API key to access Salesforge or Primeforge APIs.

How authentication works across products

  1. Generate an API key for the specific Forge product you are integrating.
  2. Use that key in the Authorization header for that product API requests.
  3. Handle standard auth failures such as missing, invalid, or out-of-scope keys.

Request examples

Use placeholders so you can apply the same pattern to any Forge product.
curl -sS "$PRODUCT_API_BASE_URL/your-endpoint" \
  -H "Authorization: Bearer $PRODUCT_API_KEY"
const response = await fetch(`${process.env.PRODUCT_API_BASE_URL}/your-endpoint`, {
  headers: {
    Authorization: `Bearer ${process.env.PRODUCT_API_KEY}`
  }
});

console.log(await response.json());
package main

import (
  "net/http"
  "os"
)

func main() {
  req, _ := http.NewRequest(
    http.MethodGet,
    os.Getenv("PRODUCT_API_BASE_URL")+"/your-endpoint",
    nil,
  )
  req.Header.Set("Authorization", "Bearer "+os.Getenv("PRODUCT_API_KEY"))

  _, _ = http.DefaultClient.Do(req)
}

Common authentication errors

HTTP statusTypical reason
401Missing or invalid API key
403API key is valid but does not have access to the requested resource

Next steps