List Comment Automation Posts API
The List Comment Automation Posts API lists comment automation posts for a single account. It uses GET /v1/comment-automations/posts, requires the accountId query parameter, accepts an optional after parameter, and returns a posts array with nextCursor. Use this operation when you need the post identifiers, captions, media types, permalinks, preview URLs and timestamps returned for comment automation posts, rather than automation logs or automation management.
List Comment Automation Posts API overview
This operation is a GET request to /v1/comment-automations/posts. It lists comment automation posts scoped to one account, so every call must identify that account. The response returns a posts array together with nextCursor. Each post object carries an id plus caption, mediaType, permalink, previewUrl and timestamp fields. Send the access key in the x-access-key header, using the accessKey parameter name shown in the authorization contract. To build a request, set the method to GET, append accountId as a required query parameter, and add after only when supplying a value for that optional parameter. The after value must be a string of length at least 1 when supplied. After a call, read success, nextCursor and posts from a 200 body. Check the status code before parsing the body as a success payload, because error responses use a different shape with success and message. The captured contract does not specify side effects, cursor format, page size, or end-of-list behaviour, and this page does not add those semantics. For a worked walkthrough, see the request and response examples titled cURL request for List Comment Automation Posts API, JavaScript request for List Comment Automation Posts API, 200 response body example and Error response body example for 400, 403, 404 and 502.
Authorization
Authorization uses the accessKey parameter sent in the x-access-key header. Include that header on every request to this endpoint. The captured contract does not describe token format, issuance, rotation or scope, so clients should use the token value issued for their access and not invent additional auth fields. If a request is rejected, first confirm the header name is exactly x-access-key and that the value is present, then check the status code and message in the error body.
Query Parameters
Two query parameters control the listing. accountId is a required string that scopes the list to an account, and after is an optional string with a minimum length of 1. The full field map, including requiredness and nullability for every response field, is in the table titled Query parameters and response fields.
Response Body
A 200 response returns application/json with success as a boolean, nextCursor as string or null, and posts as an array of post objects. Each post object has a required string id, and caption, mediaType, permalink, previewUrl and timestamp are each required fields that may be null. The timestamp string uses a date-time format when present. Clients should handle null values for those nullable fields rather than assuming every post has a caption, media type, permalink, preview URL or timestamp. The exact success shape is shown in the example titled 200 response body example.
Error responses
Error responses for 400, 403, 404 and 502 return application/json with success as a boolean and message as a string. The captured contract does not define what each status means or when it occurs, so do not hard-code assumptions about causes. Instead, branch on the status code, surface the message, and keep the success and error parsing paths separate. The status-by-status breakdown is in the table titled Status codes and response shapes.
Choosing the right adjacent operation
Choose this listing operation when the task is to discover which posts are available for comment automation for an account. Choose the comment automation logs operation when the task is to inspect what an automation has done, and choose the delete comment automation operation when the task is to remove an automation rather than enumerate its posts. The captured contract for this endpoint does not specify side effects or downstream use of the returned post id, so this page makes no claim about those behaviours. For display and linking, the returned fields include permalink and previewUrl, and the returned fields include caption, mediaType and timestamp for describing each post object.
| Field | Location | Type | Required | Constraints / nullability |
|---|---|---|---|---|
| accountId | Query parameter | string | Yes | Required; scopes the list to an account |
| after | Query parameter | string | No | Optional; 1 <= length when supplied |
| x-access-key (accessKey) | Header | string (token) | Yes | Authorization header; token format not specified |
| success | Response body (200 and errors) | boolean | Yes | Present in success and error bodies |
| nextCursor | Response body (200) | string | null | Yes | May be null |
| posts | Response body (200) | array<object> | Yes | Array of post objects |
| posts[].id | Response body (200) | string | Yes | Post identifier |
| posts[].caption | Response body (200) | string | null | Yes | May be null |
| posts[].mediaType | Response body (200) | string | null | Yes | May be null |
| posts[].permalink | Response body (200) | string | null | Yes | May be null |
| posts[].previewUrl | Response body (200) | string | null | Yes | May be null |
| posts[].timestamp | Response body (200) | string | null | Yes | Date-time string when present; may be null |
| message | Response body (400, 403, 404, 502) | string | Yes | Error message |
Exact captured contract; pagination semantics beyond field names are not specified.
| Status | Content type | Response body shape |
|---|---|---|
| 200 | application/json | { success: boolean, nextCursor: string | null, posts: array of { id: string, caption: string | null, mediaType: string | null, permalink: string | null, previewUrl: string | null, timestamp: string | null } } |
| 400 | application/json | { success: boolean, message: string } |
| 403 | application/json | { success: boolean, message: string } |
| 404 | application/json | { success: boolean, message: string } |
| 502 | application/json | { success: boolean, message: string } |
Error meanings and triggers are not specified in the captured contract and are not invented here.
Frequently asked questions
How is authorization sent for the List Comment Automation Posts API?
Send the accessKey value in the x-access-key header on every request. The captured contract does not describe token format, issuance, rotation, or scope.
Which query parameters does the endpoint accept?
accountId is a required string query parameter. after is an optional string query parameter with a minimum length of 1 when supplied.
What does a 200 response contain?
A 200 response contains success as a boolean, nextCursor as string or null, and posts as an array of objects with id, caption, mediaType, permalink, previewUrl, and timestamp fields.
What shape do error responses use?
Responses for 400, 403, 404, and 502 contain success as a boolean and message as a string. The captured contract does not define the meaning or trigger for each status code.
curl -X GET "{{API_BASE_URL}}/v1/comment-automations/posts?accountId=string" \
-H "x-access-key: <token>"{
"success": true,
"nextCursor": "string",
"posts": [
{
"id": "string",
"caption": "string",
"mediaType": "string",
"permalink": "string",
"previewUrl": "string",
"timestamp": "2019-08-24T14:15:22Z"
}
]
}{
"success": true,
"message": "string"
}| Scope | Field | Type | Type reference | Required | Description | Constraints |
|---|---|---|---|---|---|---|
| accountId#1 | accountId | string | __0 | Yes | ||
| after#2 | after | string | __0 | No | kind: schemaLength; value: 1 <= length | |
| response#3 | response | object | __0 | |||
| response#3 | response.success | boolean | __1 | Yes | ||
| response#3 | response.nextCursor | string | null | __2 | Yes | ||
| response#3 | response.nextCursor[variant1] | string | __2_extends:__3 | |||
| response#3 | response.nextCursor[variant2] | null | __2_extends:__4 | |||
| response#3 | response.posts | array<object> | __5 | Yes | ||
| response#3 | response.posts[] | object | __6 | |||
| response#3 | response.posts[].id | string | __7 | Yes | ||
| response#3 | response.posts[].caption | string | null | __8 | Yes | ||
| response#3 | response.posts[].caption[variant1] | string | __8_extends:__9 | |||
| response#3 | response.posts[].caption[variant2] | null | __8_extends:__10 | |||
| response#3 | response.posts[].mediaType | string | null | __11 | Yes | ||
| response#3 | response.posts[].mediaType[variant1] | string | __11_extends:__12 | |||
| response#3 | response.posts[].mediaType[variant2] | null | __11_extends:__13 | |||
| response#3 | response.posts[].permalink | string | null | __14 | Yes | ||
| response#3 | response.posts[].permalink[variant1] | string | __14_extends:__15 | |||
| response#3 | response.posts[].permalink[variant2] | null | __14_extends:__16 | |||
| response#3 | response.posts[].previewUrl | string | null | __17 | Yes | ||
| response#3 | response.posts[].previewUrl[variant1] | string | __17_extends:__18 | |||
| response#3 | response.posts[].previewUrl[variant2] | null | __17_extends:__19 | |||
| response#3 | response.posts[].timestamp | string | null | __20 | Yes | ||
| response#3 | response.posts[].timestamp[variant1] | string | __20_extends:__21 | kind: ; value: date-time | ||
| response#3 | response.posts[].timestamp[variant2] | null | __20_extends:__22 | |||
| response#4 | response | object | __0 | |||
| response#4 | response.success | boolean | __1 | Yes | ||
| response#4 | response.message | string | __2 | Yes |