Create an initiative
curl --request POST \
--url https://useorgx.com/api/v1/initiatives \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"plan": {
"initiative": {
"title": "Launch the customer API"
},
"workstreams": [
{
"name": "Engineering",
"goal": "Build and validate the API surface",
"agent_id": "engineering-agent",
"milestones": [
{
"title": "Engineering: plan, execute, and validate",
"tasks": [
{
"title": "Scope the endpoints",
"type": "research"
},
{
"title": "Implement the endpoints",
"type": "implement",
"depends_on": [
"Scope the endpoints"
]
}
]
}
]
},
{
"name": "Launch",
"depends_on": [
"Engineering"
]
}
]
},
"plan_digest": "sha256:9b2f1c0d8a7e6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
plan: {
initiative: {title: 'Launch the customer API'},
workstreams: [
{
name: 'Engineering',
goal: 'Build and validate the API surface',
agent_id: 'engineering-agent',
milestones: [
{
title: 'Engineering: plan, execute, and validate',
tasks: [
{title: 'Scope the endpoints', type: 'research'},
{
title: 'Implement the endpoints',
type: 'implement',
depends_on: ['Scope the endpoints']
}
]
}
]
},
{name: 'Launch', depends_on: ['Engineering']}
]
},
plan_digest: 'sha256:9b2f1c0d8a7e6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c'
})
};
fetch('https://useorgx.com/api/v1/initiatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://useorgx.com/api/v1/initiatives"
payload = {
"plan": {
"initiative": { "title": "Launch the customer API" },
"workstreams": [
{
"name": "Engineering",
"goal": "Build and validate the API surface",
"agent_id": "engineering-agent",
"milestones": [
{
"title": "Engineering: plan, execute, and validate",
"tasks": [
{
"title": "Scope the endpoints",
"type": "research"
},
{
"title": "Implement the endpoints",
"type": "implement",
"depends_on": ["Scope the endpoints"]
}
]
}
]
},
{
"name": "Launch",
"depends_on": ["Engineering"]
}
]
},
"plan_digest": "sha256:9b2f1c0d8a7e6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"initiative": {
"id": "1481c341-089b-4be0-809b-49cb6e4fee48",
"title": "Launch the customer API",
"status": "draft",
"aggregateVersion": 1
},
"created": {
"workstreams": 2,
"milestones": 1,
"tasks": 2,
"dependency_edges": 2,
"agents_assigned": 1
},
"receipt": {
"receipt_id": "1a9f5066-24b3-4d4a-90f0-b0f75fe2fe19",
"event_id": "1231d7d4-c43e-4f5a-8c65-628f4122b1b9"
},
"links": {
"self": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48",
"tree": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48?include=tree",
"pulse": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48/pulse"
}
},
"meta": {
"apiVersion": "1",
"workspaceId": "09707fa5-aaae-4493-8a23-827111000f89",
"duplicate": true,
"aggregateVersion": 1
}
}{
"data": {
"initiative": {
"id": "1481c341-089b-4be0-809b-49cb6e4fee48",
"title": "Launch the customer API",
"status": "draft",
"aggregateVersion": 1
},
"created": {
"workstreams": 2,
"milestones": 1,
"tasks": 2,
"dependency_edges": 2,
"agents_assigned": 1
},
"receipt": {
"receipt_id": "1a9f5066-24b3-4d4a-90f0-b0f75fe2fe19",
"event_id": "1231d7d4-c43e-4f5a-8c65-628f4122b1b9"
},
"links": {
"self": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48",
"tree": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48?include=tree",
"pulse": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48/pulse"
}
},
"meta": {
"apiVersion": "1",
"workspaceId": "09707fa5-aaae-4493-8a23-827111000f89",
"duplicate": false,
"aggregateVersion": 1
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}REST API v1 Reference
Create an initiative
Create an initiative with its first workstream and backlog.
POST
/
initiatives
Create an initiative
curl --request POST \
--url https://useorgx.com/api/v1/initiatives \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"plan": {
"initiative": {
"title": "Launch the customer API"
},
"workstreams": [
{
"name": "Engineering",
"goal": "Build and validate the API surface",
"agent_id": "engineering-agent",
"milestones": [
{
"title": "Engineering: plan, execute, and validate",
"tasks": [
{
"title": "Scope the endpoints",
"type": "research"
},
{
"title": "Implement the endpoints",
"type": "implement",
"depends_on": [
"Scope the endpoints"
]
}
]
}
]
},
{
"name": "Launch",
"depends_on": [
"Engineering"
]
}
]
},
"plan_digest": "sha256:9b2f1c0d8a7e6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
plan: {
initiative: {title: 'Launch the customer API'},
workstreams: [
{
name: 'Engineering',
goal: 'Build and validate the API surface',
agent_id: 'engineering-agent',
milestones: [
{
title: 'Engineering: plan, execute, and validate',
tasks: [
{title: 'Scope the endpoints', type: 'research'},
{
title: 'Implement the endpoints',
type: 'implement',
depends_on: ['Scope the endpoints']
}
]
}
]
},
{name: 'Launch', depends_on: ['Engineering']}
]
},
plan_digest: 'sha256:9b2f1c0d8a7e6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c'
})
};
fetch('https://useorgx.com/api/v1/initiatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://useorgx.com/api/v1/initiatives"
payload = {
"plan": {
"initiative": { "title": "Launch the customer API" },
"workstreams": [
{
"name": "Engineering",
"goal": "Build and validate the API surface",
"agent_id": "engineering-agent",
"milestones": [
{
"title": "Engineering: plan, execute, and validate",
"tasks": [
{
"title": "Scope the endpoints",
"type": "research"
},
{
"title": "Implement the endpoints",
"type": "implement",
"depends_on": ["Scope the endpoints"]
}
]
}
]
},
{
"name": "Launch",
"depends_on": ["Engineering"]
}
]
},
"plan_digest": "sha256:9b2f1c0d8a7e6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"initiative": {
"id": "1481c341-089b-4be0-809b-49cb6e4fee48",
"title": "Launch the customer API",
"status": "draft",
"aggregateVersion": 1
},
"created": {
"workstreams": 2,
"milestones": 1,
"tasks": 2,
"dependency_edges": 2,
"agents_assigned": 1
},
"receipt": {
"receipt_id": "1a9f5066-24b3-4d4a-90f0-b0f75fe2fe19",
"event_id": "1231d7d4-c43e-4f5a-8c65-628f4122b1b9"
},
"links": {
"self": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48",
"tree": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48?include=tree",
"pulse": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48/pulse"
}
},
"meta": {
"apiVersion": "1",
"workspaceId": "09707fa5-aaae-4493-8a23-827111000f89",
"duplicate": true,
"aggregateVersion": 1
}
}{
"data": {
"initiative": {
"id": "1481c341-089b-4be0-809b-49cb6e4fee48",
"title": "Launch the customer API",
"status": "draft",
"aggregateVersion": 1
},
"created": {
"workstreams": 2,
"milestones": 1,
"tasks": 2,
"dependency_edges": 2,
"agents_assigned": 1
},
"receipt": {
"receipt_id": "1a9f5066-24b3-4d4a-90f0-b0f75fe2fe19",
"event_id": "1231d7d4-c43e-4f5a-8c65-628f4122b1b9"
},
"links": {
"self": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48",
"tree": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48?include=tree",
"pulse": "/api/v1/initiatives/1481c341-089b-4be0-809b-49cb6e4fee48/pulse"
}
},
"meta": {
"apiVersion": "1",
"workspaceId": "09707fa5-aaae-4493-8a23-827111000f89",
"duplicate": false,
"aggregateVersion": 1
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"retryAfter": 123
}
}Authorizations
bearerAuthcookieAuth
OrgX API key, sent as Authorization: Bearer oxk_...
Headers
Workspace-scoped retry key for safe mutation replay.
Required string length:
1 - 200Pattern:
^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$Body
application/json
- Option 1
- Option 2
- Option 3
Must equal the stored proposal digest — commit exactly what you reviewed
Pattern:
^sha256:[0-9a-f]{64}$Optional client-supplied id; defaults to a deterministic id derived from workspace and Idempotency-Key
Non-structural adjustments; structural edits require a new plan or proposal
Show child attributes
Show child attributes
