About the GraphQL schema
The docs on the sidebar are auto-generated from the Luxor graphql schema and all calls are validated and executed against the schema.
- Allowed operations: queries and mutations.
- Schema-defined types: scalars, objects, enums, interfaces, unions, and input objects.
The GraphQL endpoint
A GraphQL API has a single endpoint, so no matter what operation you perform the endpoint will remain constant
https://api.luxor.tech/graphql
API Keys
You can generate your API keys on your account via Profile Settings > Api Keys > Generate New Key
Communicating with the API
The API uses a Relay (opens in a new tab) compatible spec but you can use it with cURL, any HTTP-speaking library or the Fetch API (opens in a new tab)
Available API Clients
- Python Allows you to interact with the API either as a library or directly from command line.
Curl
For any operation you would provide a JSON encoded body whether you're doing a query
or a mutation
using the HTTP method POST
Example of query using cURL
curl \
-X POST \
-H "Content-Type: application/json" \
-H "x-lux-api-key: YOUR_API_KEY" \
--data '{"query": "{currentProfile {email}}"}' \
https://api.luxor.tech/graphql
Fetch API
const response = await fetch('https://api.luxor.tech/graphql', {
method: 'POST',
headers: {
'x-lux-api-key': 'YOUR_API_KEY'
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: text,
variables,
}),
});