Executive Summary
PyjamaHR offers API access for customers on custom or enterprise plans, enabling seamless integration between your website or career page and the PyjamaHR platform. This article provides a step-by-step guide to generating API keys (tokens), authenticating API requests, and best practices for secure, reliable integrations—based entirely on real customer scenarios and questions.
Detailed Overview
What is PyjamaHR API Access?
PyjamaHR’s API allows you to:
- Fetch job listings from your PyjamaHR account to display on your custom career page.
- Customize the look and feel of your job listings to match your website.
- Automate the flow of candidate applications from your website into PyjamaHR (for supported endpoints).
Who can use the API?
- API access is available only for customers on custom or enterprise plans (minimum user and billing requirements apply).
- API endpoints are primarily for fetching job listings and, in some cases, posting candidate applications (see plan details).
Why use the API?
- Maintain full control over your career page design and user experience.
- Integrate PyjamaHR with your existing website, automation tools (like n8n), or custom workflows.
- Ensure all candidate data is centralized in PyjamaHR for streamlined hiring.
Integration with Other Features
- The API works alongside the standard PyjamaHR career page and iframe integrations, but is best for advanced customizations.
- API tokens are required for all authenticated requests.
Step-by-Step Guide: Generating API Keys and Authenticating Requests
Prerequisites
You must be on a custom or enterprise plan with API access enabled.
Only Admin users can request/generate API tokens.
Have your developer or technical team ready to implement the integration.
1. Request API Access
If you’re not sure if your plan includes API access:
- Contact PyjamaHR Support or your Account Manager.
- Example from customer:
“I was told that there is API, but not sure if my plans have it.”
If you’re on a custom/enterprise plan:
- Confirm with support that API access is enabled for your account.
2. Obtain Your API Key (Token)
API keys (tokens) are not self-generated in the UI. They are provided by PyjamaHR Support.
How to request your API token:
1. Contact PyjamaHR Support via chat or email.
2. Specify your use case (e.g., “I want to fetch job listings for my website”).
3. Support will provide you with:
- The API documentation link (e.g., PyjamaHR API Docs)
- Your unique API token (example: 81ee3eba0ddabf93b7cf91727ee929db4194fa44
)
Best Practice:
Share the token securely with your developer. Do not post it publicly.
3. Authenticate Your API Requests
All API requests require the token for authentication.
How to use the token:
- Include the token in the request header as follows:
Authorization: Token <your_token_here>
Example cURL request:
curl -X GET "https://api.pyjamahr.com/jobs" \ -H "Authorization: Token 81ee3eba0ddabf93b7cf91727ee929db4194fa44"
Where to find endpoints and parameters:
- Refer to the API documentation for details on available endpoints, required parameters, and response formats.
4. Implement and Test Your Integration
Use the provided API documentation to fetch jobs or perform supported actions.
Test your integration in a development environment before going live.
If you need to customize the display (e.g., apply custom CSS), fetch the job data via API and render it on your site as needed.
5. Rotate or Revoke API Keys (If Needed)
If your token is compromised, contact PyjamaHR Support immediately to revoke and reissue a new token.
There is currently no self-service token management in the UI.
Advanced Usage & Best Practices
Power User Tips
Custom Career Page: Use the API to fetch job listings and render them with your own HTML/CSS for a fully branded experience.
Automation: Integrate with tools like n8n to automate workflows (e.g., trigger actions when new jobs are posted).
Security: Store your API token securely (use environment variables, not hard-coded in codebases).
Token Sharing: Only share tokens with trusted developers. Rotate tokens if staff changes.
Do’s and Don’ts
Do:
- Always use HTTPS for API requests.
- Limit the scope of API tokens (if possible in future updates).
- Test API responses for edge cases (e.g., no jobs available).
Don’t:
- Don’t expose your API token in client-side code or public repositories.
- Don’t share your token with third parties you don’t trust.
Troubleshooting & Common Issues
Common Problems and Solutions
1. “Where do I find my API key?”
- API keys are not self-generated; request from PyjamaHR Support.
2. “My API requests return 401 Unauthorized.”
- Check that you’re using the correct token and including it in the Authorization
header.
- Ensure there are no extra spaces or typos.
3. “I want to post jobs via API, but only see endpoints for fetching jobs.”
- Currently, only certain endpoints are available. Posting jobs via API may require a higher-tier plan or is not supported for all customers.
4. “My token was leaked or is no longer working.”
- Contact support to revoke and reissue your token.
5. “I want to customize the job listing display.”
- Fetch jobs via API and render them on your site with your own CSS/HTML.
6. “I can’t find documentation for the API.”
- Use the link provided by support (e.g., PyjamaHR API Docs).
7. “I want to automate candidate application flow from my website to PyjamaHR.”
- This is supported only for certain endpoints and plans. Discuss your use case with support.
Comprehensive FAQ
1. How do I get an API key for PyjamaHR?
Contact PyjamaHR Support; tokens are not self-generated.
2. Is API access available on all plans?
No, only on custom or enterprise plans.
3. Can I use the API to post jobs or only fetch them?
Most customers use the API to fetch jobs. Posting jobs via API is available only on select plans.
4. How do I authenticate API requests?
Include your token in the Authorization: Token <your_token>
header.
5. Can I revoke or rotate my API token?
Yes, but only via support.
6. Is there a UI for managing API tokens?
Not currently; all token management is via support.
7. Can I use the API to automate candidate applications from my website?
This is possible for some endpoints and plans; check with support.
8. What if my developer leaves—how do I secure my integration?
Contact support to revoke the old token and issue a new one.
9. Can I apply custom CSS to the job listings?
Yes, fetch jobs via API and render with your own CSS.
10. What if I see “Unauthorized” errors?
Double-check your token and header formatting.
11. Where is the API documentation?
Support will provide the link (e.g., PyjamaHR API Docs).
12. Can I use the API to push jobs from my website into PyjamaHR?
No, the API is primarily for fetching jobs from PyjamaHR, not for creating jobs from your website.
Related Features & Next Steps
Career Page Integration: Use iframe or API for custom career page setups.
LinkedIn Integration: Control where the “Apply” button redirects (see [Apply Connect] and [Easy Apply] settings).
Automation Tools: Integrate with n8n or similar platforms for workflow automation.
Security: Regularly review who has access to your API token.
Recommended Next Steps:
- Review your plan to confirm API access.
- Contact support to request your API token.
- Share the API documentation with your developer.
- Set up a test integration and validate API responses.
- Explore additional help articles on career page customization and integrations.
Need more help?
If you encounter issues not covered here, contact PyjamaHR Support for personalized assistance.
Related Articles:
- How to Integrate Your Career Page with PyjamaHR (iframe & API)
- Customizing Your Job Listings with PyjamaHR API
- Managing API Security and Access in PyjamaHR
This article is based on real customer conversations and reflects the latest available workflows and best practices as of June 2024.