Authentication and Headers
Using API Credentials
To interact with the magicplan REST API, you must include both an API Key and a Customer ID in the request headers of every API call. These credentials ensure that requests are authorized and associated with the correct magicplan account.
Unlike many APIs that use a bearer token format, the magicplan API requires two dedicated headers:
-
customer: YourCustomer ID -
key: YourAPI Key
Example Request
curl --location "https://cloud.magicplan.app/api/v2/workspace" \
--header "customer: YOUR_CUSTOMER_ID" \
--header "key: YOUR_API_KEY"
Replace YOUR_CUSTOMER_ID and YOUR_API_KEY with the actual values you obtained during the Generating API Credentials step.
Notes & Best Practices:
-
Use HTTPS: Always send requests over HTTPS to protect your credentials during transmission.
-
Security of Credentials:
-
Never commit your
API Keyto public repositories or share it openly. -
If you suspect that your credentials have been compromised, rotate your
API Keyimmediately from the magicplan Cloud dashboard.
-
-
Testing Connectivity:
The
/workspaceendpoint is a good starting point to confirm that your headers are correct. A200 OKresponse with workspace details indicates that your credentials and request format are correct. -
Next Steps:
After confirming successful authentication, proceed to:
-
The API Reference for detailed endpoint specifications.