Projects ยท version 0.1.0
Create a project
POST
/api/projectsRequest
curl -X POST 'https://sourced.sh/api/projects' \
-H 'Authorization: Bearer $SOURCED_API_KEY' \
-H 'Content-Type: application/json' \
-d '{}'
const response = await fetch("https://sourced.sh/api/projects", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOURCED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await response.json();
import os
import requests
response = requests.request(
"POST",
"https://sourced.sh/api/projects",
headers={"Authorization": f"Bearer {os.environ['SOURCED_API_KEY']}"},
json={},
)
data = response.json()
Request body
Required.
application/json
ProjectCreateInput:
type: object
required: name
properties:
name (required): string
apiName: string
mode: string enum flagship | stainless_compatible | custom | openapi | stainless_migration
Use `flagship` for Sourced-native generation or `stainless_compatible` for clean-room Stainless-compatible migration. Legacy aliases are accepted.
Responses
201
Project created.
application/json
type: object
required: project
properties:
project (required): Project
Project:
type: object
required: id, name, createdAt
properties:
id (required): string
name (required): string
apiName: string
mode: string enum flagship | stainless_compatible | custom | openapi | stainless_migration
New writes use `flagship` or `stainless_compatible`; legacy `custom`, `openapi`, and `stainless_migration` records may still be returned.
status: string enum created | active | archived
createdAt (required): string
updatedAt: string
runCount: integer