curl --request POST \
--url https://sandbox.composer.id/v1/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intent_id": "itn_7f3aK2mQ9xLp",
"platform": "<string>"
}
'import requests
url = "https://sandbox.composer.id/v1/publish"
payload = {
"intent_id": "itn_7f3aK2mQ9xLp",
"platform": "<string>"
}
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({intent_id: 'itn_7f3aK2mQ9xLp', platform: '<string>'})
};
fetch('https://sandbox.composer.id/v1/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"intent_id": "itn_7f3aK2mQ9xLp",
"intent_version": 2,
"target_system": "<string>",
"object_type": "<string>",
"mode": "create",
"carrier_field": "<string>",
"idempotency_key": "<string>",
"payload": {},
"dry_run": true,
"profile": "<string>",
"external_id": "<string>",
"deep_link_template": "<string>",
"note": "<string>"
}{
"intent_id": "itn_7f3aK2mQ9xLp",
"target_system": "<string>",
"object_type": "<string>",
"external_id": "<string>",
"idempotency_key": "<string>",
"status": "published",
"replayed": true,
"at": "2023-11-07T05:31:56Z",
"intent_version": 2,
"profile": "<string>",
"payload": {},
"deep_link": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"enrichment_request": {
"type": "enrichment_request",
"intent_id": "<string>",
"intent_version": 2,
"target_system": "<string>",
"profile": "<string>",
"missing_fields": [
"<unknown>"
]
}
}Idempotent publish to target platform via adapter
Writes the intent into the destination through its adapter and returns a receipt carrying the destination’s own record id, the deterministic idempotency key and the exact payload written. A retry with the same intent version returns the original receipt with replayed: true and creates nothing. Send dry_run: true to get the payload composerID would write, as a 200 PublishPreview, with nothing written and nothing recorded.
curl --request POST \
--url https://sandbox.composer.id/v1/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intent_id": "itn_7f3aK2mQ9xLp",
"platform": "<string>"
}
'import requests
url = "https://sandbox.composer.id/v1/publish"
payload = {
"intent_id": "itn_7f3aK2mQ9xLp",
"platform": "<string>"
}
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({intent_id: 'itn_7f3aK2mQ9xLp', platform: '<string>'})
};
fetch('https://sandbox.composer.id/v1/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"intent_id": "itn_7f3aK2mQ9xLp",
"intent_version": 2,
"target_system": "<string>",
"object_type": "<string>",
"mode": "create",
"carrier_field": "<string>",
"idempotency_key": "<string>",
"payload": {},
"dry_run": true,
"profile": "<string>",
"external_id": "<string>",
"deep_link_template": "<string>",
"note": "<string>"
}{
"intent_id": "itn_7f3aK2mQ9xLp",
"target_system": "<string>",
"object_type": "<string>",
"external_id": "<string>",
"idempotency_key": "<string>",
"status": "published",
"replayed": true,
"at": "2023-11-07T05:31:56Z",
"intent_version": 2,
"profile": "<string>",
"payload": {},
"deep_link": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"enrichment_request": {
"type": "enrichment_request",
"intent_id": "<string>",
"intent_version": 2,
"target_system": "<string>",
"profile": "<string>",
"missing_fields": [
"<unknown>"
]
}
}Authorizations
Body
Response
Dry run: the payload composerID would write, and nothing written
The answer to a dry run: exactly what a real publish would write to the destination, and nothing written.
create: a new record is written from the mapping profile. stamp: the Intent ID is written onto the existing record named by external_id. link: the destination is link-mode, so nothing is written and the linkage is recorded on composerID's side.
create, stamp, link