Testing the API with Your Organization
This guide explains how to use the API playground with your organization’s custom domain.Using the Playground
The Nudj API supports multiple environments. When testing your API calls:1. Select Your Server
At the top of any API endpoint page, you’ll see a server dropdown with these options:- Development Server - For testing (
nudjdev.nudj.cx
) - Staging Server - Pre-production testing (
nudjstaging.nudj.cx
) - Production Server - Your organization’s subdomain (
{subdomain}.nudj.cx
) - Local Development - Your local instance (
localhost:3000
)
For Custom Domains: Select the server closest to your environment, then modify the generated cURL command with your actual domain.
2. Add Your Authentication Token
In the x-api-token field, enter your API token:- Get your token from Developer Settings
- The token will be automatically added to all requests
- Format: Just paste the token directly
3. Test Your Request
- Fill in any required parameters
- Click Send to execute the request
- View the response in the playground
Testing with Custom Domains
Since each organization has its own domain (e.g.,acme-corp.nudj.cx
), follow these steps:
1
Use the Playground
Configure your request using the Development Server
2
Copy the cURL Command
Click the copy button to get the generated command
3
Replace the Domain
In your terminal, replace the domain:
Alternative Testing Methods
Using Postman
- Import our OpenAPI specification
- Set your base URL to your organization’s domain
- Add your API token to the collection headers as
x-api-token
Using Code
Authentication Methods
The Nudj API uses token-based authentication:API Token Header
x-api-token
without the prefix by default.
Troubleshooting
401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
- Confirm you’re using the correct API path (
/api/v2/
) - Verify your organization’s domain is correct
- Check the endpoint exists for your API type (admin/integration/analytics)
CORS Errors
CORS Errors
- The playground uses a proxy to avoid CORS issues
- For direct browser requests, ensure your domain is whitelisted
- Consider using server-side requests instead