Infa External API
The Infa External API provides access to your design system data, allowing you to integrate Infa with third-party tools and services. This feature is available on all paid Infa plans (Pro, Team and Enterprise).
Overview
We at Infa designed this API for external integrations like Figma plugins, Coda packs, and custom applications. The API provides read-only access to your design system components, boards, and related data.
Base URL: https://api.infa.ai/rest/v1/rpc/
Authentication
API Key Requirements
The Infa External API requires two headers for authentication:
x-api-key
- Your personal API key (generate from your profile page)apikey
- Fixed value for all requests
Required Headers
x-api-key: your_personal_api_key_here
apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxjaHdvdnh4YmdjZHljYXFtZnRqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTcxMDczNDksImV4cCI6MjAzMjY4MzM0OX0.0EIrHDQZMihWRsQ8ke1uoP4e0seFBJxuxLqc0jIhQGA
Content-Type: application/json
Important Notes:
- Replace
your_personal_api_key_here
with your actual API key from your profile - Use the
apikey
value exactly as shown above (same for everyone) - API keys currently provide read-only access to your account data
Generating API Keys
- Navigate to your Profile page
- Go to the "Personal Access Tokens" section
- Click "Generate New Token"
- Copy and securely store your API key
Note: We are working on write permissions as well. The generated API key has limited access to specific API endpoints. If you would like additional integrations or want to test more features with us, please reach out to us.
Available Endpoints
User Information
Get Current User (me
)
Retrieve information about the authenticated user.
Endpoint: GET /rest/v1/rpc/me
Response:
[
{
"id": "user_uuid",
"full_name": "John Doe",
"email": "john@example.com",
"profile_picture": "https://example.com/avatar.jpg"
}
]
Example Usage:
const response = await fetch("https://api.infa.ai/rest/v1/rpc/me", {
method: "GET",
headers: {
"x-api-key": "your_personal_api_key_here",
apikey: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxjaHdvdnh4YmdjZHljYXFtZnRqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTcxMDczNDksImV4cCI6MjAzMjY4MzM0OX0.0EIrHDQZMihWRsQ8ke1uoP4e0seFBJxuxLqc0jIhQGA",
"Content-Type": "application/json",
},
});
const user = await response.json();
Boards
Get All Boards (get_boards
)
Retrieve all boards accessible to the authenticated user.
Endpoint: GET /rest/v1/rpc/get_boards
Response:
[
{
"board_id": "board_uuid",
"title": "Design System Components",
"type": "cloud",
"description": "Main design system board",
"domain": "example.com",
"created_at": "2024-01-15T10:30:00Z"
}
]
Example Usage:
const response = await fetch("https://api.infa.ai/rest/v1/rpc/get_boards", {
method: "GET",
headers: {
"x-api-key": "your_personal_api_key_here",
apikey: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxjaHdvdnh4YmdjZHljYXFtZnRqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTcxMDczNDksImV4cCI6MjAzMjY4MzM0OX0.0EIrHDQZMihWRsQ8ke1uoP4e0seFBJxuxLqc0jIhQGA",
"Content-Type": "application/json",
},
});
const boards = await response.json();
Main Components
Get Main Components (get_main_components
)
Retrieve main components, optionally filtered by board.
Endpoint: GET /rest/v1/rpc/get_main_components
Parameters:
p_board_id
(optional): Filter components by specific board ID
Response:
[
{
"main_component_id": "component_uuid",
"board_id": "board_uuid",
"title": "Button Component",
"description": "Primary button component with various states",
"created_at": "2024-01-15T10:30:00Z"
}
]
Example Usage:
// Get all components
const response = await fetch(
"https://api.infa.ai/rest/v1/rpc/get_main_components",
{
method: "GET",
headers: {
"x-api-key": "your_personal_api_key_here",
apikey: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxjaHdvdnh4YmdjZHljYXFtZnRqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTcxMDczNDksImV4cCI6MjAzMjY4MzM0OX0.0EIrHDQZMihWRsQ8ke1uoP4e0seFBJxuxLqc0jIhQGA",
"Content-Type": "application/json",
},
}
);
// Get components for specific board
const responseFiltered = await fetch(
"https://api.infa.ai/rest/v1/rpc/get_main_components?p_board_id=board_uuid",
{
method: "GET",
headers: {
"x-api-key": "your_personal_api_key_here",
apikey: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxjaHdvdnh4YmdjZHljYXFtZnRqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTcxMDczNDksImV4cCI6MjAzMjY4MzM0OX0.0EIrHDQZMihWRsQ8ke1uoP4e0seFBJxuxLqc0jIhQGA",
"Content-Type": "application/json",
},
}
);
Component Views
Get Component Views (get_component_views
)
Retrieve component views (screenshots and code examples), optionally filtered by board.
Endpoint: GET /rest/v1/rpc/get_component_views
Parameters:
p_board_id
(optional): Filter views by specific board ID
Response:
[
{
"component_view_id": "view_uuid",
"main_component_id": "component_uuid",
"title": "Button Primary State",
"x_path": "//button[@class='btn-primary']",
"url": "https://example.com/components/button",
"is_domain_specific": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"screenshot": "https://example.com/screenshots/button.png",
"code": "<button class=\"btn-primary\">Click me</button>"
}
]
External Links
Get External Links (get_external_links
)
Retrieve external links associated with components.
Endpoint: GET /rest/v1/rpc/get_external_links
Response:
[
{
"external_link_id": "link_uuid",
"main_component_id": "component_uuid",
"title": "Figma Design File",
"url": "https://figma.com/file/...",
"created_at": "2024-01-15T10:30:00Z"
}
]
Pages
Get Pages (get_pages
)
Retrieve page structure data, optionally filtered by board.
Endpoint: GET /rest/v1/rpc/get_pages
Parameters:
p_board_id
(optional): Filter pages by specific board ID
Response:
[
{
"page_id": "page_uuid",
"board_id": "board_uuid",
"title": "Homepage",
"url_pattern": "https://example.com/",
"is_dynamic": false,
"default_url": "https://example.com/",
"screenshot": { "url": "https://example.com/screenshot.png" },
"parent_page_id": null,
"created_at": "2024-01-15T10:30:00Z",
"weight": 1,
"variables": {}
}
]
Next Steps
For a complete design system management experience, explore our other integrations:
Need help with API integration? Check out our general documentation for additional guidance on managing your design system with Infa.