Components
Components are reusable schema definitions that can be referenced by other components through nested fields. Unlike collection folders, components are purely structural and cannot store content directly. They serve as building blocks for creating complex, modular data structures with inheritance and composition patterns.
Components enable:
- Schema Reusability - define once, use multiple times across different components
- Nested Composition - components can reference other components through nested fields
- Version Management - track schema evolution with versioning support
- Type Safety - enforce consistent data structures across your application
Learn more about related resources:
- Folders API - manage collection folders that can use components
- Versions API - manage component schema versions
- Fields API - define component structure and validation
Path Parameters
- Name
:env
- Type
- string
- Description
Unique identifier of the environment
- Name
:component
- Type
- string
- Description
Unique identifier of the component
URL Pattern
Components use the URL pattern: /v1/:env/components/
Examples:
- List/Create:
/v1/7c9h4pwu/components/
- Individual Component:
/v1/7c9h4pwu/components/40zahze9815f/
Component Object
- Name
key
- Type
- string
- Description
Unique identifier for the component within the system.
- Name
name
- Type
- string
- Description
Human-readable name for the component.
- Name
description
- Type
- string
- Description
Optional description explaining the component's purpose and usage.
- Name
environment
- Type
- string
- Description
Key of the environment this component belongs to.
- Name
content_type
- Type
- string
- Description
Always
"document"
for components.
- Name
created_at
- Type
- datetime
- Description
Timestamp when the component was created, in ISO 8601 format.
- Name
current_version
- Type
- string
- Description
Key of the currently published version, if any.
List Components
Retrieves all components in the specified environment.
Success Response: 200 OK
Ordering
- Name
created_at
- Type
- datetime
- Description
Order by creation date. Use
-created_at
for descending order (latest first).
Errors
- Name
401 Unauthorized
- Description
Authentication credentials are missing or invalid.
authentication_failed
- authentication credentials were not provided or are invalid
- Name
403 Forbidden
- Description
Insufficient permissions to view components.
permission_denied
- insufficient permissions to perform this action
- Name
404 Not Found
- Description
The specified resource could not be found. Specific codes:
environment_not_found
- the specified environment does not exist
Request
curl https://api.foxnose.net/v1/7c9h4pwu/components/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json"
Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"key": "40zahze9815f",
"name": "User Profile",
"description": "Reusable user profile component with contact information",
"environment": "7c9h4pwu",
"content_type": "document",
"created_at": "2025-06-15T10:30:00.000000-05:00",
"current_version": "vr8x2k9m"
},
{
"key": "50bghif0926g",
"name": "Address",
"description": "Standard address component for various use cases",
"environment": "7c9h4pwu",
"content_type": "document",
"created_at": "2025-06-14T14:20:00.000000-05:00",
"current_version": null
}
]
}
Create Component
Creates a new component in the specified environment.
Success Response: 201 Created
Attributes
- Name
name
- Type
- string
- Required
- required
- Description
Component name
- Maximum length: 255
- Minimum length: 1
- Name
description
- Type
- string
- Default
- default:''
- Description
Component description
- Maximum length: 500
- Name
content_type
- Type
- string
- Required
- required
- Description
Must be
"document"
Errors
- Name
401 Unauthorized
- Description
Authentication credentials are missing or invalid.
authentication_failed
- authentication credentials were not provided or are invalid
- Name
403 Forbidden
- Description
Insufficient permissions to create components.
permission_denied
- insufficient permissions to perform this action
- Name
404 Not Found
- Description
The specified resource could not be found. Specific codes:
environment_not_found
- the specified environment does not exist
- Name
422 Unprocessable Content
- Description
Validation or business logic error. Specific codes:
validation_error
- validation errors in request dataplan_limit_exceeded
- component limit for current plan exceeded
Request
curl https://api.foxnose.net/v1/7c9h4pwu/components/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json" \
-d '{
"name": "Contact Form",
"description": "Reusable contact form component with validation",
"content_type": "document"
}'
Response
{
"key": "60cjkl1037h",
"name": "Contact Form",
"description": "Reusable contact form component with validation",
"environment": "7c9h4pwu",
"content_type": "document",
"created_at": "2025-06-16T15:30:01.514282-05:00",
"current_version": null
}
Retrieve Component
Retrieves details of a specific component.
Success Response: 200 OK
Errors
- Name
401 Unauthorized
- Description
Authentication credentials are missing or invalid.
authentication_failed
- authentication credentials were not provided or are invalid
- Name
403 Forbidden
- Description
Insufficient permissions to view this component.
permission_denied
- insufficient permissions to perform this action
- Name
404 Not Found
- Description
The specified resource could not be found. Specific codes:
environment_not_found
- the specified environment does not existcomponent_not_found
- the specified component does not exist
Request
curl https://api.foxnose.net/v1/7c9h4pwu/components/40zahze9815f/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json"
Response
{
"key": "40zahze9815f",
"name": "User Profile",
"description": "Reusable user profile component with contact information",
"environment": "7c9h4pwu",
"content_type": "document",
"created_at": "2025-06-15T10:30:00.000000-05:00",
"current_version": "vr8x2k9m"
}
Update Component
Updates component metadata. Schema structure is managed through versions and fields.
Success Response: 200 OK
Attributes
- Name
name
- Type
- string
- Description
Component name
- Maximum length: 255
- Minimum length: 1
- Name
description
- Type
- string
- Description
Component description
- Maximum length: 500
The content_type
field cannot be modified after creation.
Errors
- Name
401 Unauthorized
- Description
Authentication credentials are missing or invalid.
authentication_failed
- authentication credentials were not provided or are invalid
- Name
403 Forbidden
- Description
Insufficient permissions to modify this component.
permission_denied
- insufficient permissions to perform this action
- Name
404 Not Found
- Description
The specified resource could not be found. Specific codes:
environment_not_found
- the specified environment does not existcomponent_not_found
- the specified component does not exist
- Name
422 Unprocessable Content
- Description
Validation error. Specific codes:
validation_error
- validation errors in request data
Request
curl -X PUT https://api.foxnose.net/v1/7c9h4pwu/components/40zahze9815f/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json" \
-d '{
"name": "Enhanced User Profile",
"description": "Enhanced user profile component with social media links and preferences"
}'
Response
{
"key": "40zahze9815f",
"name": "Enhanced User Profile",
"description": "Enhanced user profile component with social media links and preferences",
"environment": "7c9h4pwu",
"content_type": "document",
"created_at": "2025-06-15T10:30:00.000000-05:00",
"current_version": "vr8x2k9m"
}
Delete Component
Permanently deletes a component and all its versions.
Components that are referenced by other components through nested fields cannot be deleted. Remove all references first.
Success Response: 204 No Content
Errors
- Name
401 Unauthorized
- Description
Authentication credentials are missing or invalid.
authentication_failed
- authentication credentials were not provided or are invalid
- Name
403 Forbidden
- Description
Insufficient permissions to delete this component.
permission_denied
- insufficient permissions to perform this action
- Name
404 Not Found
- Description
The specified resource could not be found. Specific codes:
environment_not_found
- the specified environment does not existcomponent_not_found
- the specified component does not exist
Request
curl -X DELETE https://api.foxnose.net/v1/7c9h4pwu/components/40zahze9815f/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json"