Create an intent record (returns intent_id)
curl --request POST \
--url https://sandbox.composer.id/v1/intent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"payload": {}
}'import requests
url = "https://sandbox.composer.id/v1/intent"
payload = { "payload": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payload: {}})
};
fetch('https://sandbox.composer.id/v1/intent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"intent_id": "<string>",
"intent_version": 2,
"state": "draft",
"created_at": "2023-11-07T05:31:56Z",
"payload": {
"diagnostics": {
"assessment_id": "<string>",
"scored": true,
"scores": [
{
"dimension": "<string>",
"value": 123,
"weight": 0.5
}
],
"answers": [
{
"question_id": "<string>",
"value": "<unknown>",
"label": "<string>"
}
],
"ranked_outcomes": [
{
"outcome": "contingent",
"score": 123,
"proportion": 0.5
}
],
"override_event": {
"reason": "<string>",
"actor": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"completed_at": "2023-11-07T05:31:56Z"
},
"routing": {
"role_title": "<string>",
"worker_type": "contingent",
"location": {
"country": "<string>",
"state": "<string>",
"city": "<string>",
"postal_code": "<string>",
"remote": true
},
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"description": "<string>",
"skills": [
"<string>"
],
"headcount": 1,
"destination": {
"provider": "<string>",
"object_type": "<string>",
"tenant_id": "<string>"
}
},
"admin": {
"cost_center": "<string>",
"budget": {
"max_bill_rate": 123,
"currency": "<string>",
"total_budget": 123
},
"approvals": [
{
"approver": "<string>",
"status": "pending",
"at": "2023-11-07T05:31:56Z"
}
],
"department": "<string>",
"business_unit": "<string>",
"project_code": "<string>",
"requester": {
"name": "<string>",
"email": "jsmith@example.com"
},
"hiring_manager": {
"name": "<string>",
"email": "jsmith@example.com"
}
}
},
"publishing": {
"receipts": [
"<unknown>"
],
"current_external_id": "<string>",
"current_idempotency_key": "<string>",
"adapter_status": "pending"
},
"defence_file_ref": "<string>",
"override_event": {
"reason": "<string>",
"actor": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create an intent record (returns intent_id)
POST
/
intent
Create an intent record (returns intent_id)
curl --request POST \
--url https://sandbox.composer.id/v1/intent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"payload": {}
}'import requests
url = "https://sandbox.composer.id/v1/intent"
payload = { "payload": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payload: {}})
};
fetch('https://sandbox.composer.id/v1/intent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"intent_id": "<string>",
"intent_version": 2,
"state": "draft",
"created_at": "2023-11-07T05:31:56Z",
"payload": {
"diagnostics": {
"assessment_id": "<string>",
"scored": true,
"scores": [
{
"dimension": "<string>",
"value": 123,
"weight": 0.5
}
],
"answers": [
{
"question_id": "<string>",
"value": "<unknown>",
"label": "<string>"
}
],
"ranked_outcomes": [
{
"outcome": "contingent",
"score": 123,
"proportion": 0.5
}
],
"override_event": {
"reason": "<string>",
"actor": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"completed_at": "2023-11-07T05:31:56Z"
},
"routing": {
"role_title": "<string>",
"worker_type": "contingent",
"location": {
"country": "<string>",
"state": "<string>",
"city": "<string>",
"postal_code": "<string>",
"remote": true
},
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"description": "<string>",
"skills": [
"<string>"
],
"headcount": 1,
"destination": {
"provider": "<string>",
"object_type": "<string>",
"tenant_id": "<string>"
}
},
"admin": {
"cost_center": "<string>",
"budget": {
"max_bill_rate": 123,
"currency": "<string>",
"total_budget": 123
},
"approvals": [
{
"approver": "<string>",
"status": "pending",
"at": "2023-11-07T05:31:56Z"
}
],
"department": "<string>",
"business_unit": "<string>",
"project_code": "<string>",
"requester": {
"name": "<string>",
"email": "jsmith@example.com"
},
"hiring_manager": {
"name": "<string>",
"email": "jsmith@example.com"
}
}
},
"publishing": {
"receipts": [
"<unknown>"
],
"current_external_id": "<string>",
"current_idempotency_key": "<string>",
"adapter_status": "pending"
},
"defence_file_ref": "<string>",
"override_event": {
"reason": "<string>",
"actor": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
oauth2bearerAuth
Body
application/json
Response
Created
Canonical system-of-engagement record keyed by intent_id.