Creates a new project in your organization.
POST /api/v1/machine/project| Header | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Yes | Your API key |
Content-Type | string | Yes | Must be application/json |
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name of the project (max 255 characters) |
externalId | string | No | Optional external identifier for integration (max 255 characters) |
description | string | No | A description of the project (max 1000 characters) |
{
"name": "Production Infrastructure",
"externalId": "PROJ-001",
"description": "Contains all production environment resources"
}Success (201 Created)
{
"id": "507f1f77bcf86cd799439014"
}| Field | Type | Description |
|---|---|---|
id | string | The unique identifier of the newly created project |
400 Bad Request - Invalid request body
{
"error": {
"code": "project_creation_failed",
"message": "Failed to create the project. Please verify your input and try again."
}
}401 Unauthorized - Invalid or missing API key
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key. Please provide your API key in the X-API-Key header."
}
}curl -X POST "https://r4.dev/api/v1/machine/project" \
-H "X-API-Key: rk_abc123def456.ghijklmnopqrstuvwxyz1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"name": "New Project",
"externalId": "PROJ-003",
"description": "A new project for the team"
}'externalId field is useful for linking projects to external systems (e.g., Jira, GitHub)