Creates a project for the authenticated key's organization. Requires the organization to be enabled for the write surface.
Retries are safe by default. Send the same body twice within 24 hours and the second request replays the first one's 201 instead of creating a second project — no header needed. This matters because there is no way to delete a project through this API, so a duplicate needs manual cleanup on our side.
Send an Idempotency-Key header when you want to control that yourself: two different keys mean two deliberate creates, even with identical bodies.
Emails that junior has never seen are fine. They don't need an account yet: the request stages a pending project invitation with the listed role, reported in invited_lead_emails / invited_member_emails. No account is created and no invitation email is sent; they join through normal supported sign-in. Invitations expire after one year. The first listed lead is the designated creator. If that person is pending, the creator remains unset until their lead membership is granted; other leads signing in first do not become the creator. API invitations do not override existing SSO, valid web-invitation, or registered email-domain organization mappings; conflicting API invitations cannot arbitrarily choose an organization. An email that already belongs to a different organization is skipped for members and rejected for leads.
Optional. Deduplication is on whether or not you send this — omit it and the key is derived from the request body — so the header is an override, not the thing that switches protection on.
An opaque, caller-generated value (max 255 printable ASCII characters, no whitespace; must not begin with auto:, which is reserved for derived keys). Retrying with the same key and the same body returns the ORIGINAL 201 and its response body. Reusing a key with a different body is rejected with 422; retrying while the first attempt is still in flight returns 409. Keys are scoped to your organization and this endpoint.
Reach for it in two cases. To create two projects with identical bodies on purpose: give them different keys, since without a key identical bodies are treated as one create. Or to keep a create replay-safe for longer than 24 hours: a key you supply keeps replaying for at least 7 days, while a derived one stops replaying after 24 hours so that a genuinely later identical create still works.
Equality is semantic, not byte-for-byte: the stored response is held as JSON, so a replay is the same JSON document — object-key order and whitespace are not guaranteed to match the original bytes.
Billing office by name (case-insensitive; must exist in your organization). Resolved server-side to the office and its billing policy — you never supply the internal ID. Rejected with 400 if the name doesn't match an office.
Project leads (at least one), each added with the lead role when already in the organization. The first email is the designated project and running-summary creator. If that person is unknown, their pending invitation retains the designation and fills the creator fields when lead membership is granted. Other leads never take their place; removing the pending invitation cancels the designation. No account is created and no invitation email is sent. If an email also appears in member_emails, lead wins.
Additional members added with the member role. An email junior has never seen receives a pending project invitation, with no account created and no invitation email sent. An email already in another organization is skipped. Leads are never double-added and win if named in both lists.
- Mock serverhttps://api.docs.junior.ai/_mock/openapi/projects
- https://api.junior.ai/v1https://api.junior.ai/v1/projects
curl -i -X POST \
https://api.docs.junior.ai/_mock/openapi/projects \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 00000000-0000-4000-8000-000000000001' \
-d '{
"billing_code": "string",
"billing_office_name": "string",
"budget": 0,
"lead_emails": [
"user@example.com"
],
"member_emails": [
"user@example.com"
],
"name": "string",
"sector": "string",
"timezone": "America/New_York"
}'{ "data": { "billing_code": "string", "billing_office_name": "string", "created_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invited_lead_emails": [ … ], "invited_member_emails": [ … ], "lead_emails": [ … ], "member_emails": [ … ], "name": "string", "sector": "string" } }