Skip to main content

Create Projects and Organizations

This guide walks you through creating organizations and projects to structure your extraction workflows in Sterndesk.

Prerequisites

Before you begin, ensure you have:

Creating an Organization

Organizations are the top-level container for your projects. To create an organization, make a POST request to the organizations endpoint:
curl -X POST https://api.eu.sterndesk.com/organizations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Company"
  }'
The response includes the organization ID you’ll need for creating projects:
{
  "id": "org_abc123",
  "name": "My Company",
  "created_at": "2024-01-15T10:30:00Z"
}

Creating a Project

Once you have an organization, you can create projects within it. Projects contain your extraction schemas, collectors, and resulting extractions.
curl -X POST https://api.eu.sterndesk.com/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "org_abc123",
    "name": "Invoice Processing"
  }'
Response:
{
  "id": "proj_xyz789",
  "organization_id": "org_abc123",
  "name": "Invoice Processing",
  "created_at": "2024-01-15T10:35:00Z"
}

Listing Your Organizations and Projects

To view all organizations you have access to:
curl https://api.eu.sterndesk.com/organizations \
  -H "Authorization: Bearer YOUR_API_KEY"
To list projects within an organization:
curl https://api.eu.sterndesk.com/projects?organization_id=org_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Updating an Organization or Project

Update an organization’s name:
curl -X PATCH https://api.eu.sterndesk.com/organizations/org_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Updated Company Name"
  }'
Update a project’s name:
curl -X PATCH https://api.eu.sterndesk.com/projects/proj_xyz789 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Invoice Processing - Production"
  }'

Deleting Projects and Organizations

Deleting a project permanently removes all associated data including extraction schemas, collectors, and extractions. This action cannot be undone.
Delete a project:
curl -X DELETE https://api.eu.sterndesk.com/projects/proj_xyz789 \
  -H "Authorization: Bearer YOUR_API_KEY"
Delete an organization (all projects within it must be deleted first):
curl -X DELETE https://api.eu.sterndesk.com/organizations/org_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Next Steps