Only registered user can perform this action
Authentication - string - required
Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"
{
"social_media_post_wrappers": [
{
"id": 3865,
"publication_date": "2024-05-20T12:59:00.000Z",
"publication_date_format": {
"day": "Mon",
"date": "20 May",
"time": "12:59 PM",
"year": "2024"
},
"message": "nknknknkj",
"medias": [
"https://d2tyu887lcxnka.cloudfront.net/EE2500D0EAE9E4D5C8A7606CB1C53E14.jpeg",
...
],
"twitter_social_media_posts": [
{
"id": 21481,
"account_id": 2018,
"publication_error": null
},
...
],
"facebook_social_media_posts": [
{
"id": 21482,
"account_id": 5937,
"publication_error": null
},
...
],
"instagram_social_media_posts": []
},
...
],
"meta": {
"total_count": 1
}
}
| Param name | Description |
|---|---|
|
pending
required |
Validations:
|
|
date_from
optional |
Validations:
|
|
date_to
optional |
Validations:
|
|
social_media
optional |
Validations:
|
|
page
required |
Validations:
|
|
per_page
required |
Validations:
|
Only registered user can perform this action
Authentication - string - required
Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"
{
"id": 3865,
"publication_date": "2024-05-20T12:59:00.000Z",
"publication_date_format": {
"day": "Mon",
"date": "20 May",
"time": "12:59 PM",
"year": "2024"
},
"message": "nknknknkj",
"social_attachments": [
{
"id": 2,
"link_for_media": "https://d2tyu887lcxnka.cloudfront.net/018BB18539AC943DDC1EF709F55E8553.jpeg",
"status": "created",
"mediable_id": 24925,
"mediable_type": "Picture",
"mediable_size": null,
"video": false
},
...
],
"twitter_social_media_posts": [
{
"id": 21481,
"account_id": 2018,
"message": "nknknknkj",
"alt_text": "",
"publication_error": null
},
...
],
"facebook_social_media_posts": [
{
"id": 21482,
"account_id": 5937,
"message": "nknknknkj",
"alt_text": "",
"publication_error": null
},
...
],
"instagram_social_media_posts": []
}
| Param name | Description |
|---|---|
|
id
required |
Validations:
|
Only registered user can perform this action
Authentication - string - required
Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"
{
"social_media_post_wrapper": {
"publication_date": "PUBLICATION DATE",
"social_media_posts_attributes": [
# for update
{
"id": 12,
"message": "MESSAGE",
"alt_text": "ALT TEXT",
},
# for destroy
{
"id": 13,
"_destroy": true
},
# for add new social network
{
"message": "MESSAGE",
"alt_text": "ALT TEXT",
"social_media": "facebook",
"account_id": 1
}
# you can combine hashes in one request
],
"social_attachments_attributes": [
# for update position
{
"id": 1,
"position": 1
},
# for create new attachment
{
"mediable_id": 1121,
"mediable_type": "TemplateVideo",
"position": 0
},
# for destroy attachment
{
"id": 2,
"_destroy": true
}
]
}
}
{
"id": 3865,
"publication_date": "2024-05-20T12:59:00.000Z",
"publication_date_format": {
"day": "Mon",
"date": "20 May",
"time": "12:59 PM",
"year": "2024"
},
"message": "nknknknkj",
"social_attachments": [
{
"id": 2,
"link_for_media": "https://d2tyu887lcxnka.cloudfront.net/018BB18539AC943DDC1EF709F55E8553.jpeg",
"status": "created",
"mediable_id": 24925,
"mediable_type": "Picture",
"mediable_size": null,
"video": false
},
...
],
"twitter_social_media_posts": [
{
"id": 21481,
"account_id": 2018,
"message": "nknknknkj",
"alt_text": "",
"publication_error": null
}
],
"facebook_social_media_posts": [
{
"id": 21482,
"account_id": 5937,
"message": "nknknknkj",
"alt_text": "",
"publication_error": null
}
],
"instagram_social_media_posts": []
}
{
"social_media_posts.publication_date": [
"This post cannot be edited because it has already been published to social media."
]
}
| Param name | Description |
|---|---|
|
id
required |
Validations:
|
|
social_media_post_wrapper
required |
Validations:
|
|
social_media_post_wrapper[publication_date]
required |
DateTime of publications Validations:
|
|
social_media_post_wrapper[social_media_posts_attributes]
optional |
Validations:
|
|
social_media_post_wrapper[social_media_posts_attributes][id]
optional |
if you want create new post DONT SEND ID else MUST BE Validations:
|
|
social_media_post_wrapper[social_media_posts_attributes][message]
required |
Validations:
|
|
social_media_post_wrapper[social_media_posts_attributes][alt_text]
optional |
Validations:
|
|
social_media_post_wrapper[social_media_posts_attributes][social_media]
optional |
MUST BE if you want add new social network Validations:
|
|
social_media_post_wrapper[social_media_posts_attributes][account_id]
optional |
ID of account; MUST BE if you want add new social network Validations:
|
|
social_media_post_wrapper[social_media_posts_attributes][_destroy]
optional |
Validations:
|
|
social_media_post_wrapper[social_attachments_attributes]
optional |
Validations:
|
|
social_media_post_wrapper[social_attachments_attributes][id]
optional |
if you want create new post attachment DONT SEND ID else MUST BE Validations:
|
|
social_media_post_wrapper[social_attachments_attributes][mediable_id]
optional |
ID of media; MUST BE if you want add new social network Validations:
|
|
social_media_post_wrapper[social_attachments_attributes][mediable_type]
optional |
Type of media; MUST BE if you want add new social network Validations:
|
|
social_media_post_wrapper[social_attachments_attributes][position]
required , nil allowed |
Validations:
|
|
social_media_post_wrapper[social_attachments_attributes][_destroy]
optional |
Validations:
|
Only registered user can perform this action
Authentication - string - required
Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"
{
"success": true
}
| Param name | Description |
|---|---|
|
id
required |
Validations:
|