Approvals
POST
http://localhost:4000/api/v1 /posts/{postId}/submit Submit a draft: for approval, or straight to the calendar when none is needed
With several workflows, workflowId picks one. Where approval is optional, requestApproval: true asks for it; without it the post is scheduled directly.
Parameters
postIdstring
path
required
Request body
application/json
assigneeIdsstring[]
workflowIdstring
requestApprovalboolean
{
"assigneeIds": [
"string"
],
"workflowId": "string",
"requestApproval": true
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/posts/{postId}/submit" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"assigneeIds":["string"],"workflowId":"string","requestApproval":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}POST
http://localhost:4000/api/v1 /posts/submissions Submit up to 100 drafts for approval in one call
Each entry of the answer is ok: true with the post's new status, or ok: false with the error POST /posts/{postId}/submit would have answered.
Request body
application/json
postIdsstring[]
required
workflowIdstring
requestApprovalboolean
{
"postIds": [
"string"
],
"workflowId": "string",
"requestApproval": true
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/posts/submissions" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"postIds":["string"],"workflowId":"string","requestApproval":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}POST
http://localhost:4000/api/v1 /approvals/{postId}/decision Approve or reject a post that is awaiting approval
Parameters
postIdstring
path
required
Request body
application/json
decisionstring
required
commentstring
{
"decision": "approved",
"comment": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/approvals/{postId}/decision" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"decision":"approved","comment":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}POST
http://localhost:4000/api/v1 /approvals/decisions Approve or reject up to 100 posts at once
comment is the one note for all of them and is required when rejecting. The answer has one result per post, in order: ok: true with the outcome, or ok: false with the error POST /approvals/{postId}/decision would have answered.
Request body
application/json
postIdsstring[]
required
decisionstring
required
commentstring
{
"postIds": [
"string"
],
"decision": "approved",
"comment": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/approvals/decisions" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"postIds":["string"],"decision":"approved","comment":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}POST
http://localhost:4000/api/v1 /posts/{postId}/withdraw Take a post back from approval: it becomes a draft again
Parameters
postIdstring
path
required
Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/posts/{postId}/withdraw" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}GET
http://localhost:4000/api/v1 /approvals List approval requests (pending ones unless `status` says otherwise)
Parameters
statusstring
query
postIdstring
query
approverIdstring
query
clientIdstring
query
stepinteger
query
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/approvals" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
[
{
"id": "string",
"organizationId": "string",
"postId": "string",
"requestedBy": "string",
"mode": "none",
"assigneeIds": {},
"status": "pending",
"createdAt": "2024-01-01T00:00:00Z",
"decidedAt": "2024-01-01T00:00:00Z",
"workflowId": "string",
"steps": {},
"step": 0,
"policy": "string",
"graceHours": 0,
"remindedDayAt": "2024-01-01T00:00:00Z",
"remindedSoonAt": "2024-01-01T00:00:00Z",
"clientId": "string",
"decisions": [
{
"id": "string",
"organizationId": "string",
"requestId": "string",
"actorKind": "member",
"actorId": "string",
"actorName": "string",
"decision": "approved",
"comment": "string",
"step": 0,
"elsewhere": true,
"createdAt": "2024-01-01T00:00:00Z"
}
]
}
]Schema
idstring
required
organizationIdstring
required
postIdstring
required
requestedBystring
required
modestring
required
assigneeIdsrequired
statusstring
required
createdAtstring
required
decidedAtstring
required
workflowIdstring
required
stepsrequired
stepnumber
required
policystring
required
graceHoursnumber
required
remindedDayAtstring
required
remindedSoonAtstring
required
clientIdstring
required
decisionsobject[]
required
Show child parameters
idstring
required
organizationIdstring
required
requestIdstring
required
actorKindstring
required
actorIdstring
required
actorNamestring
required
decisionstring
required
commentstring
required
stepnumber
required
elsewhereboolean
required
createdAtstring
required
Updated