Introduction
This documentation aims to provide all the information you need to work with our Attention Nest API.
Base URL
http://err.com:8080
Authenticating requests
Authenticate requests to this API's endpoints by sending an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by calling Login API endpoint.
Admin
!! Warning: This API is restricted to super-admin users
To distinguish super-admins from the others you can use JWT token field aud
= "super-admin" for admins and "agency-user" for all the others.
As well as in response to api/auth/me
endpoint you'll see field global_role
= "super-admin"
Show app statistics.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/admin/app/statistics" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/app/statistics"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show app statistics):
{
"data": {
"agencies_count": 5,
"projects_count": 5,
"users_count": 4,
"social_projects": {
"facebook": {
"social_network": "facebook",
"count": 2
},
"instagram": {
"social_network": "instagram",
"count": 3
},
"twitter": {
"social_network": "twitter",
"count": 4
},
"linkedin": {
"social_network": "linkedin",
"count": 5
}
}
}
}
Received response:
Request failed with error:
Admin/Agency
!! Warning: This API is restricted to super-admin users
To distinguish super-admins from the others you can use JWT token field aud
= "super-admin" for admins and "agency-user" for all the others.
As well as in response to api/auth/me
endpoint you'll see field global_role
= "super-admin"
Show all agencies in application.
requires authentication
See more about sorts and filters here https://spatie.be/docs/laravel-query-builder/v3/features/filtering
Example request:
curl -X GET \
-G "http://err.com:8080/api/admin/agencies?sort=quibusdam&page=19&per_page=9" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/agencies"
);
let params = {
"sort": "quibusdam",
"page": "19",
"per_page": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show list of agencies.):
{
"data": [
{
"id": 4,
"resource": "AgencyCondensedResource",
"name": "ipsum",
"owner_id": 3,
"logo_image_link": null
},
{
"id": 5,
"resource": "AgencyCondensedResource",
"name": "autem",
"owner_id": 3,
"logo_image_link": null
}
],
"links": {
"first": "http:\/\/localhost:8080\/api\/admin\/agencies?per_page=6&filter%5Bid%5D=4%2C5&page=1",
"last": "http:\/\/localhost:8080\/api\/admin\/agencies?per_page=6&filter%5Bid%5D=4%2C5&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 6,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Show agency in extended view.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/admin/agencies/delectus" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/agencies/delectus"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show agency.):
{
"data": {
"id": 3,
"resource": "AgencyExtendedResource",
"name": "aut",
"owner_id": 3,
"logo_image_link": null,
"projects": [
{
"id": 1,
"resource": "ProjectCondensedResource",
"name": "non",
"agency_id": 3,
"owner_id": 4,
"logo_image_link": null,
"timezone": null
},
{
"id": 2,
"resource": "ProjectCondensedResource",
"name": "ipsam",
"agency_id": 3,
"owner_id": 4,
"logo_image_link": null,
"timezone": null
}
],
"users": [
{
"id": 1,
"name": "admin",
"email": "admin@attentionexperts.com",
"avatar_image_link": null,
"role": "content-creator"
},
{
"id": 2,
"name": "Martine Abbott",
"email": "fadel.elian@example.com",
"avatar_image_link": null,
"role": "content-creator"
},
{
"id": 3,
"name": "Jarret Heathcote PhD",
"email": "schaefer.barbara@example.net",
"avatar_image_link": null,
"role": "agency-admin"
}
]
}
}
Received response:
Request failed with error:
Admin/Project
!! Warning: This API is restricted to super-admin users
To distinguish super-admins from the others you can use JWT token field aud
= "super-admin" for admins and "agency-user" for all the others.
As well as in response to api/auth/me
endpoint you'll see field global_role
= "super-admin"
Show condensed all projects list.
requires authentication
See more about sorts and filters here https://spatie.be/docs/laravel-query-builder/v3/features/filtering
Example request:
curl -X GET \
-G "http://err.com:8080/api/admin/projects?sort=eius&page=12&per_page=5" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/projects"
);
let params = {
"sort": "eius",
"page": "12",
"per_page": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show all projects):
{
"data": [
{
"id": 4,
"resource": "ProjectCondensedResource",
"name": "non",
"agency_id": 4,
"owner_id": 4,
"logo_image_link": null,
"timezone": "Asia\/Almaty"
},
{
"id": 5,
"resource": "ProjectCondensedResource",
"name": "deserunt",
"agency_id": 5,
"owner_id": 4,
"logo_image_link": null,
"timezone": "Asia\/Almaty"
}
],
"links": {
"first": "http:\/\/localhost:8080\/api\/admin\/projects?per_page=6&filter%5Bid%5D=4%2C5&page=1",
"last": "http:\/\/localhost:8080\/api\/admin\/projects?per_page=6&filter%5Bid%5D=4%2C5&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 6,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Show extended single project.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/admin/projects/est" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/projects/est"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show single project):
{
"data": {
"id": 1,
"name": "maiores",
"owner_id": 4,
"agency": {
"id": 1,
"resource": "AgencyCondensedResource",
"name": "provident",
"owner_id": 3,
"logo_image_link": null
},
"logo_image_link": null,
"timezone": "Asia\/Bangkok",
"users": [
{
"id": 3,
"name": "Destiny Mosciski",
"email": "xkoch@example.net",
"avatar_image_link": null,
"role": "agency-admin"
}
],
"settings": [
{
"name": "bypass-external-approval-when-internal-approved",
"value": false
},
{
"name": "post-master-content-social-network-id",
"value": null
},
{
"name": "project-timezone",
"value": "UTC"
},
{
"name": "single-round-internal-approve",
"value": false
}
]
}
}
Received response:
Request failed with error:
Admin/User
!! Warning: This API is restricted to super-admin users
To distinguish super-admins from the others you can use JWT token field aud
= "super-admin" for admins and "agency-user" for all the others.
As well as in response to api/auth/me
endpoint you'll see field global_role
= "super-admin"
Show all users in application, can be filtered.
requires authentication
See more about sorts and filters here https://spatie.be/docs/laravel-query-builder/v3/features/filtering
Example request:
curl -X GET \
-G "http://err.com:8080/api/admin/users?sort=quod&page=8&per_page=9" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/users"
);
let params = {
"sort": "quod",
"page": "8",
"per_page": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show list of user):
{
"data": [
{
"id": 3,
"name": "Wendy Littel DVM",
"email": "jordyn80@example.com",
"is_blocked": false,
"resource": "UserWithAgencyCondensedResource",
"avatar_image_link": null,
"role": "agency-admin",
"agency": {
"id": 1,
"resource": "AgencyCondensedResource",
"name": "cumque",
"owner_id": 3,
"logo_image_link": null
}
},
{
"id": 5,
"name": "Karolann Ullrich",
"email": "jabari21@example.net",
"avatar_image_link": null,
"role": "external-approver",
"agency": null
}
],
"links": {
"first": "http:\/\/localhost:8080\/api\/admin\/users?per_page=6&filter%5Bid%5D=4%2C5&page=1",
"last": "http:\/\/localhost:8080\/api\/admin\/users?per_page=6&filter%5Bid%5D=4%2C5&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 6,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Show extended user resource.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/admin/users/aut" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/users/aut"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show user):
{
"data": {
"id": 3,
"name": "Marty Hintz",
"email": "udenesik@example.org",
"avatar_image_link": null,
"global_role": null,
"agency_role": null,
"agency": {
"id": 1,
"resource": "AgencyCondensedResource",
"name": "rerum",
"owner_id": 1,
"logo_image_link": null
},
"projects": [
{
"id": 1,
"resource": "ProjectCondensedResource",
"name": "consectetur",
"agency_id": 1,
"owner_id": 1,
"logo_image_link": null,
"timezone": null
}
]
}
}
Received response:
Request failed with error:
Block user access
requires authentication
Restrict user to perform api calls in general.
User login is restricted with HTTP 401 and error code "ApiGeneralException.authenticationException.userIsBlocked" but if user is already logged in requests will be prohibited with HTTP 403 code.
But you still can call api/auth/me
and see is_blocked
field as true.
You cannot block/unblock yourself
Example request:
curl -X PATCH \
"http://err.com:8080/api/admin/users/13/block" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/users/13/block"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200, Updated agency.):
{
"data": {
"id": 3,
"name": "Mrs. Madalyn Cruickshank MD",
"email": "gutkowski.jolie@example.org",
"is_blocked": true,
"resource": "UserCondensedResource"
}
}
Received response:
Request failed with error:
Unblock user access
requires authentication
Example request:
curl -X PATCH \
"http://err.com:8080/api/admin/users/11/unblock" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/admin/users/11/unblock"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200, Updated agency.):
{
"data": {
"id": 3,
"name": "Mrs. Madalyn Cruickshank MD",
"email": "gutkowski.jolie@example.org",
"is_blocked": true,
"resource": "UserCondensedResource"
}
}
Received response:
Request failed with error:
Update user role
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/admin/users/praesentium/roles" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"project_id":3,"current_role":"external-approver","new_role":"internal-approver"}'
const url = new URL(
"http://err.com:8080/api/admin/users/praesentium/roles"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"project_id": 3,
"current_role": "external-approver",
"new_role": "internal-approver"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Show user):
{
"data": {
"id": 3,
"name": "Marty Hintz",
"email": "udenesik@example.org",
"avatar_image_link": null,
"global_role": null,
"agency_role": null,
"agency": {
"id": 1,
"resource": "AgencyCondensedResource",
"name": "rerum",
"owner_id": 1,
"logo_image_link": null
},
"projects": [
{
"id": 1,
"resource": "ProjectCondensedResource",
"name": "consectetur",
"agency_id": 1,
"owner_id": 1,
"logo_image_link": null,
"timezone": null
}
]
}
}
Received response:
Request failed with error:
Agency
Class AgencyController
Store a newly created agency in storage.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/agencies" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "name=sed" \
-F "image=@/tmp/phpfiAJbM"
const url = new URL(
"http://err.com:8080/api/agencies"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'sed');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Example response (200, Store agency.):
{
"data": {
"id": 26,
"name": "AgencyNew1",
"owner_id": 26,
"logo_image_link": "http:\/\/localhost:8080\/storage\/tmp\/agency-26\/logo\/461914025fdb37604c542.jpg"
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Update agency.
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/agencies/est" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "name=quidem" \
-F "image=@/tmp/phpbeJChm"
const url = new URL(
"http://err.com:8080/api/agencies/est"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'quidem');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Example response (200, Updated agency.):
{
"data": {
"id": 26,
"name": "AgencyNew1",
"owner_id": 26,
"logo_image_link": "http:\/\/localhost:8080\/storage\/tmp\/agency-26\/logo\/461914025fdb37604c542.jpg"
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Display an agency.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/agencies/vitae" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/agencies/vitae"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show agency.):
{
"data": {
"id": 26,
"name": "AgencyNew1",
"owner_id": 26,
"logo_image_link": "http:\/\/localhost:8080\/storage\/tmp\/agency-26\/logo\/461914025fdb37604c542.jpg"
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Get agency invitations.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/agencies/et/invitations" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/agencies/et/invitations"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Get agency invitations.):
{
"data": [
{
"id": 1,
"user": {
"id": 3,
"name": "Ms. Baby Stanton",
"email": "ignatius00@wilderman.com",
"resource": "UserCondensedResource"
},
"agency_id": 1,
"owner": {
"id": 2,
"name": "Vivien Ernser Jr.",
"email": "maryse69@example.org",
"resource": "UserCondensedResource"
},
"agency_role": "content-creator",
"agency_role_id": 3,
"last_sent_at": null,
"resource": "UserAgencyInvitationResource"
},
{
"id": 2,
"user": null,
"agency_id": 1,
"owner": {
"id": 2,
"name": "Vivien Ernser Jr.",
"email": "maryse69@example.org",
"resource": "UserCondensedResource"
},
"agency_role": "content-creator",
"agency_role_id": 3,
"last_sent_at": null,
"resource": "UserAgencyInvitationResource"
},
{
"id": 3,
"user": null,
"agency_id": 1,
"owner": {
"id": 2,
"name": "Vivien Ernser Jr.",
"email": "maryse69@example.org",
"resource": "UserCondensedResource"
},
"agency_role": "content-creator",
"agency_role_id": 3,
"last_sent_at": null,
"resource": "UserAgencyInvitationResource"
}
]
}
Received response:
Request failed with error:
Remove user roles from agency and all projects in this agency.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/agencies/occaecati/remove/user/nulla" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/agencies/occaecati/remove/user/nulla"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (204, Logout is successfull.):
<Empty response>
Received response:
Request failed with error:
Approval
Class ApprovalController
Start post approval flow
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/approvals" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_id":20,"concrete_internal_approver_id":5,"concrete_external_approver_id":3}'
const url = new URL(
"http://err.com:8080/api/posts/approvals"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_id": 20,
"concrete_internal_approver_id": 5,
"concrete_external_approver_id": 3
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Start approval.):
{
"data": [
{
"post_id": 1,
"post_status": "pending_approval",
"approval_plan": {
"postId": 1,
"isSingleRoundInternalApprove": false,
"isMasterContent": true,
"masterSocialNetwork": "facebook",
"rounds": {
"internal": {
"type": "internal",
"concreteApproverId": null,
"onApproveIsNextRoundRequired": false,
"onApproveNextRoundType": null,
"onRevisionNextRoundType": "internal"
}
}
},
"concrete_internal_approver": null,
"concrete_external_approver": null,
"post_socials": [
{
"id": 1,
"status": "pending_internal_approval",
"is_master_content": true,
"approvals": [
{
"id": 1,
"type": "internal",
"post_social_id": 1,
"created_by_user": {
"id": 3,
"name": "Brandt Hand",
"email": "rhowell@example.com"
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": true,
"actions": [
{
"id": 1,
"type": "approval-started",
"approval_id": 1,
"message": null
}
]
}
]
},
{
"id": 2,
"status": "pending_internal_approval",
"is_master_content": false,
"approvals": []
}
]
},
{
"post_id": 2,
"post_status": "pending_publish",
"approval_plan": {
"postId": 2,
"isSingleRoundInternalApprove": false,
"isMasterContent": false,
"masterSocialNetwork": null,
"rounds": []
},
"concrete_internal_approver": null,
"concrete_external_approver": null,
"post_socials": [
{
"id": 3,
"status": "pending_publish",
"is_master_content": false,
"approvals": []
},
{
"id": 4,
"status": "pending_publish",
"is_master_content": false,
"approvals": []
}
]
}
]
}
Received response:
Request failed with error:
Start post approval flow for multiple posts together
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/approvals/batch" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"posts_ids":[3,14],"concrete_internal_approver_id":3,"concrete_external_approver_id":7}'
const url = new URL(
"http://err.com:8080/api/posts/approvals/batch"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"posts_ids": [
3,
14
],
"concrete_internal_approver_id": 3,
"concrete_external_approver_id": 7
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Start approval.):
{
"data": [
{
"id": 1,
"project_id": 1,
"type": "multi_photo",
"status": "pending_approval",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": null,
"parent_post_id": null,
"master_social_post_id": null,
"master_social_network": null,
"created_at": "2021-02-24T12:54:24.000000Z",
"post_socials": [
{
"id": 1,
"post_id": 1,
"social_network": "facebook",
"message": "Voluptate cumque dolorum ullam placeat. Et ut et vel excepturi ut. Id eos reprehenderit harum autem esse.",
"attachment_order": [],
"first_comment": null,
"status": "pending_external_approval",
"has_multi_attachments": 0,
"social_api_response": null,
"attachments": []
},
{
"id": 2,
"status": "pending_internal_approval",
"is_master_content": false,
"approvals": [
{
"id": 2,
"type": "internal",
"post_social_id": 2,
"created_by_user": {
"id": 3,
"name": "Kiara Streich",
"email": "jbode@example.net",
"avatar_image_link": null
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": false,
"actions": [
{
"id": 2,
"type": "approval-started",
"approval_id": 2,
"message": null,
"created_by_user": {
"id": 3,
"name": "Kiara Streich",
"email": "jbode@example.net",
"avatar_image_link": null
},
"created_at": "2021-07-28T08:51:18+00:00"
}
]
}
],
"notes": []
}
]
},
{
"post_id": 2,
"post_status": "pending_approval",
"approval_plan": {
"postId": 2,
"isSingleRoundInternalApprove": false,
"isMasterContent": false,
"masterSocialNetwork": null,
"rounds": {
"internal": {
"type": "internal",
"concreteApproverId": null,
"onApproveIsNextRoundRequired": false,
"onApproveNextRoundType": null,
"onRevisionNextRoundType": "internal"
}
}
},
"concrete_internal_approver": null,
"concrete_external_approver": null,
"post_socials": [
{
"id": 3,
"status": "pending_internal_approval",
"is_master_content": false,
"approvals": [
{
"id": 3,
"type": "internal",
"post_social_id": 3,
"created_by_user": {
"id": 3,
"name": "Kiara Streich",
"email": "jbode@example.net",
"avatar_image_link": null
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": false,
"actions": [
{
"id": 3,
"type": "approval-started",
"approval_id": 3,
"message": null,
"created_by_user": {
"id": 3,
"name": "Kiara Streich",
"email": "jbode@example.net",
"avatar_image_link": null
},
"created_at": "2021-07-28T08:51:21+00:00"
}
]
}
],
"notes": []
},
{
"id": 4,
"status": "pending_internal_approval",
"is_master_content": false,
"approvals": [
{
"id": 4,
"type": "internal",
"post_social_id": 4,
"created_by_user": {
"id": 3,
"name": "Kiara Streich",
"email": "jbode@example.net",
"avatar_image_link": null
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": false,
"actions": [
{
"id": 4,
"type": "approval-started",
"approval_id": 4,
"message": null,
"created_by_user": {
"id": 3,
"name": "Kiara Streich",
"email": "jbode@example.net",
"avatar_image_link": null
},
"created_at": "2021-07-28T08:51:21+00:00"
}
]
}
],
"notes": []
}
]
}
]
}
Received response:
Request failed with error:
Get full post approval info
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/posts/approvals/11" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/approvals/11"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Get approval info.):
{
"data": {
"post_id": 2,
"post_status": "requires_revision",
"approval_plan": {
"postId": 2,
"isSingleRoundInternalApprove": false,
"isMasterContent": false,
"masterSocialNetwork": null,
"rounds": {
"external": {
"type": "external",
"concreteApproverId": null,
"onApproveIsNextRoundRequired": false,
"onApproveNextRoundType": null,
"onRevisionNextRoundType": "internal"
},
"internal": {
"type": "internal",
"concreteApproverId": null,
"onApproveIsNextRoundRequired": true,
"onApproveNextRoundType": "external",
"onRevisionNextRoundType": "internal"
}
}
},
"concrete_internal_approver": null,
"concrete_external_approver": null,
"post_socials": [
{
"id": 3,
"status": "requires_revision",
"is_master_content": false,
"approvals": [
{
"id": 1,
"type": "internal",
"post_social_id": 3,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": false,
"actions": [
{
"id": 1,
"type": "approval-started",
"approval_id": 1,
"message": null,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 3,
"type": "revision-requested",
"approval_id": 1,
"message": "Need to make changes to photo.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:48+00:00",
"checkboxes": [
{
"id": 1,
"is_checked": 0,
"label": "Removed photo"
},
{
"id": 2,
"is_checked": 0,
"label": "Fixed aspect ratio"
}
]
},
{
"id": 4,
"type": "question-pushed",
"approval_id": 1,
"message": "Can we publish 400x400px image in facebook?",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:48+00:00"
}
]
}
],
"notes": [
{
"id": 1,
"post_social_id": 3,
"message": "Quisquam totam delectus assumenda dolorem sint odit deleniti in.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 2,
"post_social_id": 3,
"message": "Mollitia voluptas molestiae et velit.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 3,
"post_social_id": 3,
"message": "Consequatur repudiandae voluptatem totam accusamus odio qui.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
}
]
},
{
"id": 4,
"status": "pending_internal_approval",
"is_master_content": false,
"approvals": [
{
"id": 2,
"type": "internal",
"post_social_id": 4,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": false,
"actions": [
{
"id": 2,
"type": "approval-started",
"approval_id": 2,
"message": null,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00"
}
]
}
],
"notes": [
{
"id": 4,
"post_social_id": 4,
"message": "Impedit enim explicabo consequatur.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 5,
"post_social_id": 4,
"message": "Qui eius et doloribus adipisci.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
}
]
}
]
}
}
Received response:
Request failed with error:
Start next round (after revision issues fixed)
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/approvals/next-round" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_social_id":16}'
const url = new URL(
"http://err.com:8080/api/posts/approvals/next-round"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_social_id": 16
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Post revision fixes.):
{
"data": {
"id": 2,
"type": "internal",
"post_social_id": 1,
"created_by_user": {
"id": 3,
"name": "Dr. Ida Fritsch Sr.",
"email": "toy.tobin@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": true,
"actions": [
{
"id": 3,
"type": "approval-started",
"approval_id": 2,
"message": null
}
]
}
}
Received response:
Request failed with error:
Approve current round
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/approvals/approve-round" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_social_id":11,"approval_id":8}'
const url = new URL(
"http://err.com:8080/api/posts/approvals/approve-round"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_social_id": 11,
"approval_id": 8
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Approve round.):
{
"data": {
"post_id": 2,
"post_status": "requires_revision",
"approval_plan": {
"postId": 2,
"isSingleRoundInternalApprove": false,
"isMasterContent": false,
"masterSocialNetwork": null,
"rounds": {
"external": {
"type": "external",
"concreteApproverId": null,
"onApproveIsNextRoundRequired": false,
"onApproveNextRoundType": null,
"onRevisionNextRoundType": "internal"
},
"internal": {
"type": "internal",
"concreteApproverId": null,
"onApproveIsNextRoundRequired": true,
"onApproveNextRoundType": "external",
"onRevisionNextRoundType": "internal"
}
}
},
"concrete_internal_approver": null,
"concrete_external_approver": null,
"post_socials": [
{
"id": 3,
"status": "requires_revision",
"is_master_content": false,
"approvals": [
{
"id": 1,
"type": "internal",
"post_social_id": 3,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": false,
"actions": [
{
"id": 1,
"type": "approval-started",
"approval_id": 1,
"message": null,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 3,
"type": "revision-requested",
"approval_id": 1,
"message": "Need to make changes to photo.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:48+00:00",
"checkboxes": [
{
"id": 1,
"is_checked": 0,
"label": "Removed photo"
},
{
"id": 2,
"is_checked": 0,
"label": "Fixed aspect ratio"
}
]
},
{
"id": 4,
"type": "question-pushed",
"approval_id": 1,
"message": "Can we publish 400x400px image in facebook?",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:48+00:00"
}
]
}
],
"notes": [
{
"id": 1,
"post_social_id": 3,
"message": "Quisquam totam delectus assumenda dolorem sint odit deleniti in.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 2,
"post_social_id": 3,
"message": "Mollitia voluptas molestiae et velit.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 3,
"post_social_id": 3,
"message": "Consequatur repudiandae voluptatem totam accusamus odio qui.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
}
]
},
{
"id": 4,
"status": "pending_internal_approval",
"is_master_content": false,
"approvals": [
{
"id": 2,
"type": "internal",
"post_social_id": 4,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"approved_by_user": null,
"is_approved": false,
"is_master_content": false,
"actions": [
{
"id": 2,
"type": "approval-started",
"approval_id": 2,
"message": null,
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00"
}
]
}
],
"notes": [
{
"id": 4,
"post_social_id": 4,
"message": "Impedit enim explicabo consequatur.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
},
{
"id": 5,
"post_social_id": 4,
"message": "Qui eius et doloribus adipisci.",
"created_by_user": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:35:45+00:00",
"updated_at": "2021-04-16T08:35:45+00:00"
}
]
}
]
}
}
Received response:
Request failed with error:
Require revision from approver.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/approvals/revision" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"approval_id":14,"message":"maxime","checkboxes":[{"label":"aspernatur","is_checked":false}]}'
const url = new URL(
"http://err.com:8080/api/posts/approvals/revision"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"approval_id": 14,
"message": "maxime",
"checkboxes": [
{
"label": "aspernatur",
"is_checked": false
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Revisions saved.):
{
"data": {
"id": 3,
"type": "revision-requested",
"approval_id": 1,
"message": "Need to make changes to photo.",
"created_at": "2021-05-19T11:49:56+00:00",
"checkboxes": [
{
"id": 1,
"is_checked": 0,
"label": "Removed photo"
},
{
"id": 2,
"is_checked": 1,
"label": "Fixed aspect ratio"
}
],
"created_by_user": {
"id": 4,
"name": "Koby Ritchie",
"email": "bstroman@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
}
}
}
Received response:
Request failed with error:
Add statuses to checkboxes in revision block.
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/posts/approvals/revision/checkboxes" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"approval_id":19,"approval_action_id":10,"checkboxes":[{"id":5,"is_checked":false}]}'
const url = new URL(
"http://err.com:8080/api/posts/approvals/revision/checkboxes"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"approval_id": 19,
"approval_action_id": 10,
"checkboxes": [
{
"id": 5,
"is_checked": false
}
]
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Changes saved.):
{
"data": {
"id": 3,
"type": "revision-requested",
"approval_id": 1,
"message": "Need to make changes to photo.",
"created_at": "2021-05-19T11:49:56+00:00",
"checkboxes": [
{
"id": 1,
"is_checked": 0,
"label": "Removed photo"
},
{
"id": 2,
"is_checked": 1,
"label": "Fixed aspect ratio"
}
],
"created_by_user": {
"id": 4,
"name": "Koby Ritchie",
"email": "bstroman@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
}
}
}
Received response:
Request failed with error:
Push a question by content-creator.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/approvals/revision/question" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"approval_id":15,"message":"ea"}'
const url = new URL(
"http://err.com:8080/api/posts/approvals/revision/question"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"approval_id": 15,
"message": "ea"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Question added.):
{
"data": {
"id": 4,
"type": "question-pushed",
"approval_id": 1,
"message": "Can we publish 400x400px image in facebook?",
"created_by_user": {
"id": 3,
"name": "Shyann Eichmann",
"email": "name58@example.net",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-04-16T08:17:04+00:00"
}
}
Received response:
Request failed with error:
Push an answer, only for internal/external approver.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/approvals/revision/answer" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"approval_id":2,"message":"tempora"}'
const url = new URL(
"http://err.com:8080/api/posts/approvals/revision/answer"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"approval_id": 2,
"message": "tempora"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Answer added.):
{
"data": {
"id": 5,
"type": "answer-pushed",
"approval_id": 1,
"message": "Yes",
"created_by_user": {
"id": 4,
"name": "Kurtis Predovic MD",
"email": "kip29@example.org"
},
"created_at": "2021-04-16T08:19:45+00:00"
}
}
Received response:
Request failed with error:
Auth
Class AuthController
Register a User.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/auth/signup" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"consequatur","email":"cassin.missouri@example.net","password":"pariatur"}'
const url = new URL(
"http://err.com:8080/api/auth/signup"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"email": "cassin.missouri@example.net",
"password": "pariatur"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user": {
"id": 686,
"name": "Miss Breanne Effertz IV",
"email": "hazel20@example.org",
"avatar_image_link": null
},
"token": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2FwaVwvYXV0aFwvc2lnbnVwIiwiaWF0IjoxNjMzNjkwOTYzLCJleHAiOjE2MzM2OTQ1NjMsIm5iZiI6MTYzMzY5MDk2MywianRpIjoibWRpZ1Z6TEF1dm9GYVg1YiIsInN1YiI6Njg2LCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3IiwiYXVkIjoiYWdlbmN5LXVzZXIiLCJhZ2VuY3kiOm51bGx9.iAmOGQJWxiFgNbrGWnUgHzseAmmMFguU4q56Wl64nx8",
"token_type": "bearer",
"expires_in": 3600
}
}
}
Received response:
Request failed with error:
Get a JWT via given credentials.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/auth/signin" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"telly.collins@example.com","password":"mollitia"}'
const url = new URL(
"http://err.com:8080/api/auth/signin"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "telly.collins@example.com",
"password": "mollitia"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user": {
"id": 687,
"name": "Corrine Cruickshank",
"email": "casimer.schumm@example.net",
"avatar_image_link": null
},
"token": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2FwaVwvYXV0aFwvc2lnbmluIiwiaWF0IjoxNjMzNjkwOTYzLCJleHAiOjE2MzM2OTQ1NjMsIm5iZiI6MTYzMzY5MDk2MywianRpIjoiUEdPcXloY3BsdlNZbUcwbiIsInN1YiI6Njg3LCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3IiwiYXVkIjoiYWdlbmN5LXVzZXIiLCJhZ2VuY3kiOm51bGx9.BCxvXhgDtT58HPxNQg2e71NugWu5RXqun2TI_7joBSc",
"token_type": "bearer",
"expires_in": 3600
}
}
}
Received response:
Request failed with error:
Refresh a token.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/auth/refresh" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/auth/refresh"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODA4MFwvYXBpXC9hdXRoXC9zaWduaW4iLCJpYXQiOjE2MDczNDk4MzksImV4cCI6MTYwNzM1MzQzOSwibmJmIjoxNjA3MzQ5ODM5LCJqdGkiOiI2Z3ZYZFpVbjRSekxFVXVkIiwic3ViIjoxLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.eOVEPblMsS9uy3o8rvXpG-1Q5DTtHz-AI174kQDs0R0",
"token_type": "bearer",
"expires_in": 3600
}
}
Received response:
Request failed with error:
Log the user out (Invalidate the token).
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/auth/logout" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/auth/logout"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (204, Logout is successfull.):
<Empty response>
Example response (401, Logout failed.):
{
"error": {
"message": "Token has expired",
"title": "ApiGeneralException",
"code": "ApiGeneralException.authenticationException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Get the authenticated User.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/auth/me" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/auth/me"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 690,
"name": "Roel Reichel II",
"email": "buck33@example.org",
"avatar_image_link": null
}
}
Received response:
Request failed with error:
Sending to user email a notification with token for forgot password.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/password/forgot" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"maribel31@example.com"}'
const url = new URL(
"http://err.com:8080/api/password/forgot"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "maribel31@example.com"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (204, Notification sent.):
<Empty response>
Example response (401, Notification sent failed.):
{
"error": {
"message": "User not found in refresh password table.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.authenticationException.invalidPasswordRefreshData",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Check if an email and a token for refresh password are valid.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/password/checktoken" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"reuben87@example.org","token":"corporis"}'
const url = new URL(
"http://err.com:8080/api/password/checktoken"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "reuben87@example.org",
"token": "corporis"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (204, Token is valid.):
<Empty response>
Example response (401, Error with data.):
{
"error": {
"message": "Refresh password token hash is invalid.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.authenticationException.invalidPasswordRefreshToken",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Refresh user password, set new password.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/password/new" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"token":"dolorum","email":"luz.spencer@example.net","password":"laboriosam"}'
const url = new URL(
"http://err.com:8080/api/password/new"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "dolorum",
"email": "luz.spencer@example.net",
"password": "laboriosam"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (204, Password is changed.):
<Empty response>
Example response (401, Error with data.):
{
"error": {
"message": "Refresh password token hash is invalid.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.authenticationException.invalidPasswordRefreshToken",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
AuthGoogle
Class GoogleController
Redirect the user to the Google authentication page.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/auth/google" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/auth/google"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='https://accounts.google.com/o/oauth2/auth?scope=openid+profile+email&response_type=code&state=pKmfaOcYemJrKv6G4y7Fdp6QNLiLo2gJHUjjAlUg'" />
<title>Redirecting to https://accounts.google.com/o/oauth2/auth?scope=openid+profile+email&response_type=code&state=pKmfaOcYemJrKv6G4y7Fdp6QNLiLo2gJHUjjAlUg</title>
</head>
<body>
Redirecting to <a href="https://accounts.google.com/o/oauth2/auth?scope=openid+profile+email&response_type=code&state=pKmfaOcYemJrKv6G4y7Fdp6QNLiLo2gJHUjjAlUg">https://accounts.google.com/o/oauth2/auth?scope=openid+profile+email&response_type=code&state=pKmfaOcYemJrKv6G4y7Fdp6QNLiLo2gJHUjjAlUg</a>.
</body>
</html>
Received response:
Request failed with error:
Obtain the user information from Google.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/auth/google/callback" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/auth/google/callback"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"user": {
"id": 688,
"name": "Dr. Beatrice Lindgren",
"email": "drippin@example.net",
"avatar_image_link": null
},
"token": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2FwaVwvYXV0aFwvZ29vZ2xlXC9jYWxsYmFjayIsImlhdCI6MTYzMzY5MDk2NCwiZXhwIjoxNjMzNjk0NTY0LCJuYmYiOjE2MzM2OTA5NjQsImp0aSI6Ik5LWDRBNWEwcHlWOWkzaHUiLCJzdWIiOjY4OCwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyIsImF1ZCI6ImFnZW5jeS11c2VyIiwiYWdlbmN5IjpudWxsfQ.Fv7P7XwecxfVKsM3I8_J4WalTBKRIj08rgyrgVslwsg",
"token_type": "bearer",
"expires_in": 3600
}
}
}
Received response:
Request failed with error:
Obtain the user information from Google user idToken.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/auth/google/app" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"device_type":"exercitationem","token":"provident"}'
const url = new URL(
"http://err.com:8080/api/auth/google/app"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_type": "exercitationem",
"token": "provident"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user": {
"id": 689,
"name": "Leola Corkery DVM",
"email": "brisa64@example.org",
"avatar_image_link": null
},
"token": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2FwaVwvYXV0aFwvZ29vZ2xlXC9hcHAiLCJpYXQiOjE2MzM2OTA5NjQsImV4cCI6MTYzMzY5NDU2NCwibmJmIjoxNjMzNjkwOTY0LCJqdGkiOiJzOVpEalU4RDVMd2JxZWZtIiwic3ViIjo2ODksInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjciLCJhdWQiOiJhZ2VuY3ktdXNlciIsImFnZW5jeSI6bnVsbH0.1a7iGVt3gN3ZgmMcnB0ETi-pfkRfLhKu1YLqPLZE9CE",
"token_type": "bearer",
"expires_in": 3600
}
}
}
Received response:
Request failed with error:
DayLabel
Class DayLabelController
Create label.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/daylabels" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"project_id":9,"text":"accusantium","color":"quasi","start_at":"2021-10-08","end_at":"2021-10-08"}'
const url = new URL(
"http://err.com:8080/api/daylabels"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"project_id": 9,
"text": "accusantium",
"color": "quasi",
"start_at": "2021-10-08",
"end_at": "2021-10-08"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 263,
"project_id": 1,
"text": "Amet est numquam neque ut et.",
"color": "#fff",
"start_at": "2021-10-25",
"end_at": "2021-10-25"
}
}
Received response:
Request failed with error:
Update label.
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/daylabels/6" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"project_id":12,"text":"vitae","color":"qui","start_at":"2021-10-08","end_at":"2021-10-08"}'
const url = new URL(
"http://err.com:8080/api/daylabels/6"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"project_id": 12,
"text": "vitae",
"color": "qui",
"start_at": "2021-10-08",
"end_at": "2021-10-08"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 264,
"project_id": 1,
"text": "Fugiat sunt aperiam est.",
"color": "#fff",
"start_at": "2022-09-14",
"end_at": "2022-09-14"
}
}
Received response:
Request failed with error:
Delete label.
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/daylabels/11" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/daylabels/11"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Endpoints
larabug-api/javascript-report
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/larabug-api/javascript-report" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/larabug-api/javascript-report"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get the key performance stats for the dashboard.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/stats" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/stats"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get the current queue workload for the application.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/workload" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/workload"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get all of the master supervisors and their underlying supervisors.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/masters" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/masters"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get all of the monitored tags and their job counts.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/monitoring" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/monitoring"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Start monitoring the given tag.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/horizon/api/monitoring" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/monitoring"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Paginate the jobs for a given tag.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/monitoring/itaque" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/monitoring/itaque"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Stop monitoring the given tag.
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/horizon/api/monitoring/minima" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/monitoring/minima"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get all of the measured jobs.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/metrics/jobs" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/metrics/jobs"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get metrics for a given job.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/metrics/jobs/eos" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/metrics/jobs/eos"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get all of the measured queues.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/metrics/queues" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/metrics/queues"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get metrics for a given queue.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/metrics/queues/quia" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/metrics/queues/quia"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get all of the batches.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/batches" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/batches"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get the details of a batch by ID.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/batches/eius" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/batches/eius"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Retry the given batch.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/horizon/api/batches/retry/similique" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/batches/retry/similique"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get all of the pending jobs.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/jobs/pending" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/jobs/pending"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get all of the completed jobs.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/jobs/completed" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/jobs/completed"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get all of the failed jobs.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/jobs/failed" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/jobs/failed"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Get a failed job instance.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/jobs/failed/autem" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/jobs/failed/autem"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Retry a failed job.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/horizon/api/jobs/retry/facilis" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/jobs/retry/facilis"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get the details of a recent job by ID.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/api/jobs/nihil" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/api/jobs/nihil"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
Single page application catch-all route.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/horizon/sed" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/horizon/sed"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Unauthorized.
Received response:
Request failed with error:
api/version
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/version" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/version"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
0.41.1
Received response:
Request failed with error:
api/status/{api_key}
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/status/omnis" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/status/omnis"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
{
"error": {
"message": "Forbidden",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
api/info/{api_key}
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/info/vero" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/info/vero"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
{
"error": {
"message": "Forbidden",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
api/webhooks/api-deployed/{version}/{api_key}
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/webhooks/api-deployed/optio/optio" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/webhooks/api-deployed/optio/optio"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
{
"error": {
"message": "Forbidden",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
/
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://err.com:8080/docs/index.html'" />
<title>Redirecting to http://err.com:8080/docs/index.html</title>
</head>
<body>
Redirecting to <a href="http://err.com:8080/docs/index.html">http://err.com:8080/docs/index.html</a>.
</body>
</html>
Received response:
Request failed with error:
login
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/login" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/login"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"error": {
"message": "Unauthenticated",
"title": "ApiGeneralException",
"code": "ApiGeneralException.authException.userUnauthenticated",
"payload": {
"method": "GET",
"path": "login"
},
"trace": null
}
}
Received response:
Request failed with error:
Class FacebookController
Get Facebook authorized pages
requires authentication
This endpoint requires Facebook business account user token.
How to get token see: Get short living user access token via FB sdk. https://developers.facebook.com/docs/javascript/examples
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/19/facebook/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"token":"iure"}'
const url = new URL(
"http://err.com:8080/api/projects/19/facebook/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "iure"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Facebook project connected.):
{
"data": {
"project_social": {
"project_id": 1,
"social_network_id": 1,
"social_network": "facebook",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest"
},
"token_expires_at": null,
"id": 1,
"logo": "https:\/\/graph.facebook.com\/102251745038901\/picture?redirect=1&type=small&width=50&height=50"
},
"pages": [
{
"id": "102251745038901",
"category": "Product\/Service",
"category_list": [
{
"id": "2201",
"name": "Product\/service"
}
],
"name": "attentionnesttest",
"tasks": [
"ANALYZE",
"ADVERTISE",
"MESSAGING",
"MODERATE",
"CREATE_CONTENT",
"MANAGE"
]
}
]
}
}
Example response (200, Facebook response contains two pages, select page step required.):
{
"data": {
"project_social": null,
"pages": [
{
"id": "102251745038901",
"category": "Product\/Service",
"category_list": [
{
"id": "2201",
"name": "Product\/service"
}
],
"name": "attentionnesttest",
"tasks": [
"ANALYZE",
"ADVERTISE",
"MESSAGING",
"MODERATE",
"CREATE_CONTENT",
"MANAGE"
]
},
{
"id": "102251745038902",
"category": "Product\/Service",
"category_list": [
{
"id": "2201",
"name": "Product\/service"
}
],
"name": "attentionnesttest2",
"tasks": [
"ANALYZE",
"ADVERTISE",
"MESSAGING",
"MODERATE",
"CREATE_CONTENT",
"MANAGE"
]
}
]
}
}
Received response:
Request failed with error:
Search Facebook tags
requires authentication
Required permission CREATE_POST_PERMISSION
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/5/facebook/tags?q=corporis" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/5/facebook/tags"
);
let params = {
"q": "corporis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (201, Facebook project connected.):
{
"data": [
{
"id": "6003246597567",
"name": "Hublot",
"audience_size": 20893451,
"path": [
"Interests",
"Additional Interests",
"Hublot"
],
"description": null,
"topic": "Shopping and fashion"
},
{
"id": "6003074704915",
"name": "Hubble Space Telescope",
"audience_size": 14488080,
"path": [
"Interests",
"Additional Interests",
"Hubble Space Telescope"
],
"description": null,
"topic": "Business and industry"
},
{
"id": "6003126155749",
"name": "HubSpot",
"audience_size": 4974210,
"path": [
"Interests",
"Additional Interests",
"HubSpot"
],
"description": null,
"topic": "Business and industry"
},
{
"id": "6003161459030",
"name": "StarHub TV",
"audience_size": 3888960,
"path": [
"Interests",
"Additional Interests",
"StarHub TV"
],
"description": null,
"topic": "Business and industry"
},
{
"id": "6003108508790",
"name": "GitHub",
"audience_size": 3777840,
"path": [
"Interests",
"Additional Interests",
"GitHub"
],
"description": null,
"topic": "Business and industry"
},
{
"id": "6003579109404",
"name": "GrubHub",
"audience_size": 3031378,
"path": [
"Interests",
"Additional Interests",
"GrubHub"
],
"description": null,
"topic": "Food and drink"
},
{
"id": "6004113791024",
"name": "StubHub",
"audience_size": 2690870,
"path": [
"Interests",
"Additional Interests",
"StubHub"
],
"description": null,
"topic": "Business and industry"
},
{
"id": "6003180917733",
"name": "Hubert de Givenchy",
"audience_size": 1421660,
"path": [
"Interests",
"Additional Interests",
"Hubert de Givenchy"
],
"description": null,
"topic": "People"
}
]
}
Chose page from the list returned by "Get Facebook authorized pages"
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/projects/facebook/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"project_id":4197033.19,"page_id":4926.47070616}'
const url = new URL(
"http://err.com:8080/api/projects/facebook/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"project_id": 4197033.19,
"page_id": 4926.47070616
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Facebook project connected.):
{
"data": {
"project_id": 1,
"social_network_id": 1,
"social_network": "facebook",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest"
},
"token_expires_at": null,
"id": 1,
"logo": "https:\/\/graph.facebook.com\/102251745038901\/picture?redirect=1&type=small&width=50&height=50"
}
}
Received response:
Request failed with error:
Renew page credentials by saving new token for given page
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/projects/8/facebook/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"token":"nulla"}'
const url = new URL(
"http://err.com:8080/api/projects/8/facebook/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "nulla"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Facebook project connected.):
{
"data": {
"project_id": 1,
"social_network_id": 1,
"social_network": "facebook",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest"
},
"token_expires_at": null,
"id": 1,
"logo": "https:\/\/graph.facebook.com\/102251745038901\/picture?redirect=1&type=small&width=50&height=50"
}
}
Received response:
Request failed with error:
Delete connected social account
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/projects/8/facebook" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/8/facebook"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204, Post):
<Empty response>
Received response:
Request failed with error:
Search Facebook pages
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/9/facebook/search?q=ipsum" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/9/facebook/search"
);
let params = {
"q": "ipsum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
GlobalOptions
api/global-options/timezones
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/global-options/timezones" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/global-options/timezones"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
"Africa\/Abidjan",
"Africa\/Accra",
"Africa\/Addis_Ababa",
"Africa\/Algiers",
"Africa\/Asmara",
"Africa\/Bamako",
"Africa\/Bangui",
"Africa\/Banjul",
"Africa\/Bissau",
"Africa\/Blantyre",
"Africa\/Brazzaville",
"Africa\/Bujumbura",
"Africa\/Cairo",
"Africa\/Casablanca",
"Africa\/Ceuta",
"Africa\/Conakry",
"Africa\/Dakar",
"Africa\/Dar_es_Salaam",
"Africa\/Djibouti",
"Africa\/Douala",
"Africa\/El_Aaiun",
"Africa\/Freetown",
"Africa\/Gaborone",
"Africa\/Harare",
"Africa\/Johannesburg",
"Africa\/Juba",
"Africa\/Kampala",
"Africa\/Khartoum",
"Africa\/Kigali",
"Africa\/Kinshasa",
"Africa\/Lagos",
"Africa\/Libreville",
"Africa\/Lome",
"Africa\/Luanda",
"Africa\/Lubumbashi",
"Africa\/Lusaka",
"Africa\/Malabo",
"Africa\/Maputo",
"Africa\/Maseru",
"Africa\/Mbabane",
"Africa\/Mogadishu",
"Africa\/Monrovia",
"Africa\/Nairobi",
"Africa\/Ndjamena",
"Africa\/Niamey",
"Africa\/Nouakchott",
"Africa\/Ouagadougou",
"Africa\/Porto-Novo",
"Africa\/Sao_Tome",
"Africa\/Tripoli",
"Africa\/Tunis",
"Africa\/Windhoek",
"America\/Adak",
"America\/Anchorage",
"America\/Anguilla",
"America\/Antigua",
"America\/Araguaina",
"America\/Argentina\/Buenos_Aires",
"America\/Argentina\/Catamarca",
"America\/Argentina\/Cordoba",
"America\/Argentina\/Jujuy",
"America\/Argentina\/La_Rioja",
"America\/Argentina\/Mendoza",
"America\/Argentina\/Rio_Gallegos",
"America\/Argentina\/Salta",
"America\/Argentina\/San_Juan",
"America\/Argentina\/San_Luis",
"America\/Argentina\/Tucuman",
"America\/Argentina\/Ushuaia",
"America\/Aruba",
"America\/Asuncion",
"America\/Atikokan",
"America\/Bahia",
"America\/Bahia_Banderas",
"America\/Barbados",
"America\/Belem",
"America\/Belize",
"America\/Blanc-Sablon",
"America\/Boa_Vista",
"America\/Bogota",
"America\/Boise",
"America\/Cambridge_Bay",
"America\/Campo_Grande",
"America\/Cancun",
"America\/Caracas",
"America\/Cayenne",
"America\/Cayman",
"America\/Chicago",
"America\/Chihuahua",
"America\/Costa_Rica",
"America\/Creston",
"America\/Cuiaba",
"America\/Curacao",
"America\/Danmarkshavn",
"America\/Dawson",
"America\/Dawson_Creek",
"America\/Denver",
"America\/Detroit",
"America\/Dominica",
"America\/Edmonton",
"America\/Eirunepe",
"America\/El_Salvador",
"America\/Fort_Nelson",
"America\/Fortaleza",
"America\/Glace_Bay",
"America\/Goose_Bay",
"America\/Grand_Turk",
"America\/Grenada",
"America\/Guadeloupe",
"America\/Guatemala",
"America\/Guayaquil",
"America\/Guyana",
"America\/Halifax",
"America\/Havana",
"America\/Hermosillo",
"America\/Indiana\/Indianapolis",
"America\/Indiana\/Knox",
"America\/Indiana\/Marengo",
"America\/Indiana\/Petersburg",
"America\/Indiana\/Tell_City",
"America\/Indiana\/Vevay",
"America\/Indiana\/Vincennes",
"America\/Indiana\/Winamac",
"America\/Inuvik",
"America\/Iqaluit",
"America\/Jamaica",
"America\/Juneau",
"America\/Kentucky\/Louisville",
"America\/Kentucky\/Monticello",
"America\/Kralendijk",
"America\/La_Paz",
"America\/Lima",
"America\/Los_Angeles",
"America\/Lower_Princes",
"America\/Maceio",
"America\/Managua",
"America\/Manaus",
"America\/Marigot",
"America\/Martinique",
"America\/Matamoros",
"America\/Mazatlan",
"America\/Menominee",
"America\/Merida",
"America\/Metlakatla",
"America\/Mexico_City",
"America\/Miquelon",
"America\/Moncton",
"America\/Monterrey",
"America\/Montevideo",
"America\/Montserrat",
"America\/Nassau",
"America\/New_York",
"America\/Nipigon",
"America\/Nome",
"America\/Noronha",
"America\/North_Dakota\/Beulah",
"America\/North_Dakota\/Center",
"America\/North_Dakota\/New_Salem",
"America\/Nuuk",
"America\/Ojinaga",
"America\/Panama",
"America\/Pangnirtung",
"America\/Paramaribo",
"America\/Phoenix",
"America\/Port-au-Prince",
"America\/Port_of_Spain",
"America\/Porto_Velho",
"America\/Puerto_Rico",
"America\/Punta_Arenas",
"America\/Rainy_River",
"America\/Rankin_Inlet",
"America\/Recife",
"America\/Regina",
"America\/Resolute",
"America\/Rio_Branco",
"America\/Santarem",
"America\/Santiago",
"America\/Santo_Domingo",
"America\/Sao_Paulo",
"America\/Scoresbysund",
"America\/Sitka",
"America\/St_Barthelemy",
"America\/St_Johns",
"America\/St_Kitts",
"America\/St_Lucia",
"America\/St_Thomas",
"America\/St_Vincent",
"America\/Swift_Current",
"America\/Tegucigalpa",
"America\/Thule",
"America\/Thunder_Bay",
"America\/Tijuana",
"America\/Toronto",
"America\/Tortola",
"America\/Vancouver",
"America\/Whitehorse",
"America\/Winnipeg",
"America\/Yakutat",
"America\/Yellowknife",
"Antarctica\/Casey",
"Antarctica\/Davis",
"Antarctica\/DumontDUrville",
"Antarctica\/Macquarie",
"Antarctica\/Mawson",
"Antarctica\/McMurdo",
"Antarctica\/Palmer",
"Antarctica\/Rothera",
"Antarctica\/Syowa",
"Antarctica\/Troll",
"Antarctica\/Vostok",
"Arctic\/Longyearbyen",
"Asia\/Aden",
"Asia\/Almaty",
"Asia\/Amman",
"Asia\/Anadyr",
"Asia\/Aqtau",
"Asia\/Aqtobe",
"Asia\/Ashgabat",
"Asia\/Atyrau",
"Asia\/Baghdad",
"Asia\/Bahrain",
"Asia\/Baku",
"Asia\/Bangkok",
"Asia\/Barnaul",
"Asia\/Beirut",
"Asia\/Bishkek",
"Asia\/Brunei",
"Asia\/Chita",
"Asia\/Choibalsan",
"Asia\/Colombo",
"Asia\/Damascus",
"Asia\/Dhaka",
"Asia\/Dili",
"Asia\/Dubai",
"Asia\/Dushanbe",
"Asia\/Famagusta",
"Asia\/Gaza",
"Asia\/Hebron",
"Asia\/Ho_Chi_Minh",
"Asia\/Hong_Kong",
"Asia\/Hovd",
"Asia\/Irkutsk",
"Asia\/Jakarta",
"Asia\/Jayapura",
"Asia\/Jerusalem",
"Asia\/Kabul",
"Asia\/Kamchatka",
"Asia\/Karachi",
"Asia\/Kathmandu",
"Asia\/Khandyga",
"Asia\/Kolkata",
"Asia\/Krasnoyarsk",
"Asia\/Kuala_Lumpur",
"Asia\/Kuching",
"Asia\/Kuwait",
"Asia\/Macau",
"Asia\/Magadan",
"Asia\/Makassar",
"Asia\/Manila",
"Asia\/Muscat",
"Asia\/Nicosia",
"Asia\/Novokuznetsk",
"Asia\/Novosibirsk",
"Asia\/Omsk",
"Asia\/Oral",
"Asia\/Phnom_Penh",
"Asia\/Pontianak",
"Asia\/Pyongyang",
"Asia\/Qatar",
"Asia\/Qostanay",
"Asia\/Qyzylorda",
"Asia\/Riyadh",
"Asia\/Sakhalin",
"Asia\/Samarkand",
"Asia\/Seoul",
"Asia\/Shanghai",
"Asia\/Singapore",
"Asia\/Srednekolymsk",
"Asia\/Taipei",
"Asia\/Tashkent",
"Asia\/Tbilisi",
"Asia\/Tehran",
"Asia\/Thimphu",
"Asia\/Tokyo",
"Asia\/Tomsk",
"Asia\/Ulaanbaatar",
"Asia\/Urumqi",
"Asia\/Ust-Nera",
"Asia\/Vientiane",
"Asia\/Vladivostok",
"Asia\/Yakutsk",
"Asia\/Yangon",
"Asia\/Yekaterinburg",
"Asia\/Yerevan",
"Atlantic\/Azores",
"Atlantic\/Bermuda",
"Atlantic\/Canary",
"Atlantic\/Cape_Verde",
"Atlantic\/Faroe",
"Atlantic\/Madeira",
"Atlantic\/Reykjavik",
"Atlantic\/South_Georgia",
"Atlantic\/St_Helena",
"Atlantic\/Stanley",
"Australia\/Adelaide",
"Australia\/Brisbane",
"Australia\/Broken_Hill",
"Australia\/Currie",
"Australia\/Darwin",
"Australia\/Eucla",
"Australia\/Hobart",
"Australia\/Lindeman",
"Australia\/Lord_Howe",
"Australia\/Melbourne",
"Australia\/Perth",
"Australia\/Sydney",
"Europe\/Amsterdam",
"Europe\/Andorra",
"Europe\/Astrakhan",
"Europe\/Athens",
"Europe\/Belgrade",
"Europe\/Berlin",
"Europe\/Bratislava",
"Europe\/Brussels",
"Europe\/Bucharest",
"Europe\/Budapest",
"Europe\/Busingen",
"Europe\/Chisinau",
"Europe\/Copenhagen",
"Europe\/Dublin",
"Europe\/Gibraltar",
"Europe\/Guernsey",
"Europe\/Helsinki",
"Europe\/Isle_of_Man",
"Europe\/Istanbul",
"Europe\/Jersey",
"Europe\/Kaliningrad",
"Europe\/Kiev",
"Europe\/Kirov",
"Europe\/Lisbon",
"Europe\/Ljubljana",
"Europe\/London",
"Europe\/Luxembourg",
"Europe\/Madrid",
"Europe\/Malta",
"Europe\/Mariehamn",
"Europe\/Minsk",
"Europe\/Monaco",
"Europe\/Moscow",
"Europe\/Oslo",
"Europe\/Paris",
"Europe\/Podgorica",
"Europe\/Prague",
"Europe\/Riga",
"Europe\/Rome",
"Europe\/Samara",
"Europe\/San_Marino",
"Europe\/Sarajevo",
"Europe\/Saratov",
"Europe\/Simferopol",
"Europe\/Skopje",
"Europe\/Sofia",
"Europe\/Stockholm",
"Europe\/Tallinn",
"Europe\/Tirane",
"Europe\/Ulyanovsk",
"Europe\/Uzhgorod",
"Europe\/Vaduz",
"Europe\/Vatican",
"Europe\/Vienna",
"Europe\/Vilnius",
"Europe\/Volgograd",
"Europe\/Warsaw",
"Europe\/Zagreb",
"Europe\/Zaporozhye",
"Europe\/Zurich",
"Indian\/Antananarivo",
"Indian\/Chagos",
"Indian\/Christmas",
"Indian\/Cocos",
"Indian\/Comoro",
"Indian\/Kerguelen",
"Indian\/Mahe",
"Indian\/Maldives",
"Indian\/Mauritius",
"Indian\/Mayotte",
"Indian\/Reunion",
"Pacific\/Apia",
"Pacific\/Auckland",
"Pacific\/Bougainville",
"Pacific\/Chatham",
"Pacific\/Chuuk",
"Pacific\/Easter",
"Pacific\/Efate",
"Pacific\/Enderbury",
"Pacific\/Fakaofo",
"Pacific\/Fiji",
"Pacific\/Funafuti",
"Pacific\/Galapagos",
"Pacific\/Gambier",
"Pacific\/Guadalcanal",
"Pacific\/Guam",
"Pacific\/Honolulu",
"Pacific\/Kiritimati",
"Pacific\/Kosrae",
"Pacific\/Kwajalein",
"Pacific\/Majuro",
"Pacific\/Marquesas",
"Pacific\/Midway",
"Pacific\/Nauru",
"Pacific\/Niue",
"Pacific\/Norfolk",
"Pacific\/Noumea",
"Pacific\/Pago_Pago",
"Pacific\/Palau",
"Pacific\/Pitcairn",
"Pacific\/Pohnpei",
"Pacific\/Port_Moresby",
"Pacific\/Rarotonga",
"Pacific\/Saipan",
"Pacific\/Tahiti",
"Pacific\/Tarawa",
"Pacific\/Tongatapu",
"Pacific\/Wake",
"Pacific\/Wallis",
"UTC"
]
}
Received response:
Request failed with error:
api/global-options/error-codes
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/global-options/error-codes" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/global-options/error-codes"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"ApiGeneralException.default": true,
"ApiGeneralException.filesystemException.default": true,
"ApiGeneralException.configurationException.default": true,
"ApiGeneralException.configurationException.AccessControlService": true,
"ApiGeneralException.authenticationException.default": true,
"ApiGeneralException.authenticationException.signIn": true,
"ApiGeneralException.authenticationException.googleAuth": true,
"ApiGeneralException.authenticationException.invalidPasswordRefreshToken": true,
"ApiGeneralException.authenticationException.invalidPasswordRefreshData": true,
"ApiGeneralException.authenticationException.userIsBlocked": true,
"ApiGeneralException.accessDeniedException.default": true,
"ApiGeneralException.routingException.methodNotAllowed": true,
"ApiGeneralException.routingException.notFoundHttpException": true,
"ApiGeneralException.modelException.modelNotFoundException": true,
"ApiGeneralException.invitationException.default": true,
"ApiGeneralException.invitationException.alreadyHasAgencyInvite": true,
"ApiGeneralException.invitationException.projectNotFromAgency": true,
"ApiGeneralException.invitationException.roleNotMatch": true,
"ApiGeneralException.invitationException.userIsAdmin": true,
"ApiGeneralException.invitationException.alreadyHasProjectInvitation": true,
"ApiGeneralException.postException.default": true,
"ApiGeneralException.postException.notFound": true,
"ApiGeneralException.postException.invalidPostType": true,
"ApiGeneralException.postException.invalidPostStatus": true,
"ApiGeneralException.postException.invalidSocialNetworkType": true,
"ApiGeneralException.postException.unallowedPostType": true,
"ApiGeneralException.postException.postIsNotReadyToDuplication": true,
"ApiGeneralException.postException.postIsNotReadyToSetStatus": true,
"ApiGeneralException.postAttachmentException.default": true,
"ApiGeneralException.postAttachmentException.attachmentNotMatch": true,
"ApiGeneralException.postAttachmentException.attachmentNotExists": true,
"ApiGeneralException.postAttachmentException.filetypeNotAllowed": true,
"ApiGeneralException.postAttachmentException.objectTypeNotAllowed": true,
"ApiGeneralException.postAttachmentException.actionRestricted": true,
"ApiGeneralException.postAttachmentException.requiredExtraFields": true,
"ApiGeneralException.mediaException.default": true,
"ApiGeneralException.mediaException.mediaIsNotTemporary": true,
"ApiGeneralException.mediaException.mediaIsNotExists": true,
"ApiGeneralException.mediaException.mediaIsRestrictedForUser": true,
"ApiGeneralException.mediaException.mediaTypeIsNotMatchToPost": true,
"ApiGeneralException.mediaException.mediaThumbnailTypeIsNotMatchToPost": true,
"ApiGeneralException.authException.userUnauthenticated": true,
"ApiGeneralException.configException.pathNotExists": true,
"ApiGeneralException.rateLimitedException": true,
"ApiDatabaseQueryException.default": true,
"ApiDatabaseQueryException.notFound.default": true,
"ApiDatabaseQueryException.alreadyExists.default": true,
"ApiDatabaseQueryException.couldNotSave": true,
"ApiPostScheduleException.default": true,
"ApiPostScheduleException.relatedPostNotFound": true,
"ApiPostScheduleException.restrictMultiProjectAction": true,
"ApiPostScheduleException.scheduleCannotBeUpdated": true,
"ApiPostScheduleException.scheduleCannotBeDeleted": true,
"ApiPostScheduleException.postCannotBeScheduled": true,
"ApiPostScheduleException.timeIsNotAllowed": true,
"ApiPostScheduleException.expiredScheduleDate": true,
"ApiPostScheduleException.autoPostingNotAllowedForOnlyMobilePublishingPosts": true,
"ApiValidationException.default": true,
"ApiPermissionsException.default": true,
"TwitterResponseException.default": true,
"TwitterResponseException.twitter.default": true,
"TwitterResponseException.twitter.errorsInResponse": true,
"ApiSocialServiceException.default": true,
"ApiSocialServiceException.postIsNotReadyToPublication": true,
"ApiSocialServiceException.facebook.default": true,
"ApiSocialServiceException.facebook.appConfigurationException": true,
"ApiSocialServiceException.facebook.appInitializationException": true,
"ApiSocialServiceException.facebook.getMeException": true,
"ApiSocialServiceException.facebook.providerAlreadyInitialized": true,
"ApiSocialServiceException.facebook.providerNotInitialized": true,
"ApiSocialServiceException.facebook.badRequestOptions": true,
"ApiSocialServiceException.facebook.socialApiResponseFailed": true,
"ApiSocialServiceException.facebook.emptyResponse": true,
"ApiSocialServiceException.facebook.postIsNotReadyToPublication": true,
"ApiSocialServiceException.facebook.publicationChainGenerationFailed": true,
"ApiSocialServiceException.instagram.default": true,
"ApiSocialServiceException.instagram.appConfigurationException": true,
"ApiSocialServiceException.instagram.appInitializationException": true,
"ApiSocialServiceException.instagram.getMeException": true,
"ApiSocialServiceException.instagram.providerAlreadyInitialized": true,
"ApiSocialServiceException.instagram.providerNotInitialized": true,
"ApiSocialServiceException.instagram.badRequestOptions": true,
"ApiSocialServiceException.instagram.socialApiResponseFailed": true,
"ApiSocialServiceException.instagram.emptyResponse": true,
"ApiSocialServiceException.instagram.postIsNotReadyToPublication": true,
"ApiSocialServiceException.instagram.publicationChainGenerationFailed": true,
"ApiSocialServiceException.linkedin.default": true,
"ApiSocialServiceException.linkedin.appConfigurationException": true,
"ApiSocialServiceException.linkedin.appInitializationException": true,
"ApiSocialServiceException.linkedin.getMeException": true,
"ApiSocialServiceException.linkedin.providerAlreadyInitialized": true,
"ApiSocialServiceException.linkedin.providerNotInitialized": true,
"ApiSocialServiceException.linkedin.badRequestOptions": true,
"ApiSocialServiceException.linkedin.socialApiResponseFailed": true,
"ApiSocialServiceException.linkedin.emptyResponse": true,
"ApiSocialServiceException.linkedin.postIsNotReadyToPublication": true,
"ApiSocialServiceException.linkedin.publicationChainGenerationFailed": true,
"ApiSocialServiceException.twitter.default": true,
"ApiSocialServiceException.twitter.appConfigurationException": true,
"ApiSocialServiceException.twitter.appInitializationException": true,
"ApiSocialServiceException.twitter.getMeException": true,
"ApiSocialServiceException.twitter.providerAlreadyInitialized": true,
"ApiSocialServiceException.twitter.providerNotInitialized": true,
"ApiSocialServiceException.twitter.badRequestOptions": true,
"ApiSocialServiceException.twitter.socialApiResponseFailed": true,
"ApiSocialServiceException.twitter.emptyResponse": true,
"ApiSocialServiceException.twitter.postIsNotReadyToPublication": true,
"ApiSocialServiceException.twitter.publicationChainGenerationFailed": true,
"ApiPostApprovalException.default": true,
"ApiPostApprovalException.appConfigurationException": true,
"ApiPostApprovalException.insufficientStatusException": true,
"ApiPostApprovalException.approvalAlreadyStartedException": true,
"ApiPostApprovalException.approvalRoundAlreadyFinishedException": true,
"ApiPostApprovalException.noQuestionsToAnswerException": true,
"ApiPostApprovalException.insufficientActionTypeException": true,
"ApiPostApprovalException.operationTemporaryLocked": true,
"ApiContentRestrictionException.default": true,
"ApiContentRestrictionException.mimeTypeNotSupported": true,
"ApiContentRestrictionException.facebook.default": true,
"ApiContentRestrictionException.facebook.postValidateContentException": true,
"ApiContentRestrictionException.facebook.invalidAttachementsCount": true,
"ApiContentRestrictionException.facebook.invalidAttachementType": true,
"ApiContentRestrictionException.facebook.invalidMessage": true,
"ApiContentRestrictionException.facebook.invalidLink": true,
"ApiContentRestrictionException.facebook.invalidFileSize": true,
"ApiContentRestrictionException.facebook.invalidFileType": true,
"ApiContentRestrictionException.facebook.invalidVideoDuration": true,
"ApiContentRestrictionException.facebook.invalidGifIsAnimated": true,
"ApiContentRestrictionException.facebook.missingParameter": true,
"ApiContentRestrictionException.facebook.missingConfig": true,
"ApiContentRestrictionException.facebook.invalidChildAttachmentsCount": true,
"ApiContentRestrictionException.instagram.default": true,
"ApiContentRestrictionException.instagram.postValidateContentException": true,
"ApiContentRestrictionException.instagram.invalidAttachementsCount": true,
"ApiContentRestrictionException.instagram.invalidAttachementType": true,
"ApiContentRestrictionException.instagram.invalidMessage": true,
"ApiContentRestrictionException.instagram.invalidLink": true,
"ApiContentRestrictionException.instagram.invalidFileSize": true,
"ApiContentRestrictionException.instagram.invalidFileType": true,
"ApiContentRestrictionException.instagram.invalidVideoDuration": true,
"ApiContentRestrictionException.instagram.invalidGifIsAnimated": true,
"ApiContentRestrictionException.instagram.missingParameter": true,
"ApiContentRestrictionException.instagram.missingConfig": true,
"ApiContentRestrictionException.instagram.invalidChildAttachmentsCount": true,
"ApiContentRestrictionException.linkedin.default": true,
"ApiContentRestrictionException.linkedin.postValidateContentException": true,
"ApiContentRestrictionException.linkedin.invalidAttachementsCount": true,
"ApiContentRestrictionException.linkedin.invalidAttachementType": true,
"ApiContentRestrictionException.linkedin.invalidMessage": true,
"ApiContentRestrictionException.linkedin.invalidLink": true,
"ApiContentRestrictionException.linkedin.invalidFileSize": true,
"ApiContentRestrictionException.linkedin.invalidFileType": true,
"ApiContentRestrictionException.linkedin.invalidVideoDuration": true,
"ApiContentRestrictionException.linkedin.invalidGifIsAnimated": true,
"ApiContentRestrictionException.linkedin.missingParameter": true,
"ApiContentRestrictionException.linkedin.missingConfig": true,
"ApiContentRestrictionException.linkedin.invalidChildAttachmentsCount": true,
"ApiContentRestrictionException.twitter.default": true,
"ApiContentRestrictionException.twitter.postValidateContentException": true,
"ApiContentRestrictionException.twitter.invalidAttachementsCount": true,
"ApiContentRestrictionException.twitter.invalidAttachementType": true,
"ApiContentRestrictionException.twitter.invalidMessage": true,
"ApiContentRestrictionException.twitter.invalidLink": true,
"ApiContentRestrictionException.twitter.invalidFileSize": true,
"ApiContentRestrictionException.twitter.invalidFileType": true,
"ApiContentRestrictionException.twitter.invalidVideoDuration": true,
"ApiContentRestrictionException.twitter.invalidGifIsAnimated": true,
"ApiContentRestrictionException.twitter.missingParameter": true,
"ApiContentRestrictionException.twitter.missingConfig": true,
"ApiContentRestrictionException.twitter.invalidChildAttachmentsCount": true
}
}
Received response:
Request failed with error:
api/global-options/social-content-restrictions
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/global-options/social-content-restrictions" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/global-options/social-content-restrictions"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"facebook": {
"link": {
"message": {
"message": true,
"max_length": 63206,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1
},
"link": {
"link": true
},
"enter_location": true,
"targeting_and_visibility": {
"targeting": true,
"dark_post": true
},
"first_comment": {
"max_length": 8000
}
},
"single_photo": {
"message": {
"message": true,
"max_length": 63206,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1,
"image": true
},
"enter_location": true,
"targeting_and_visibility": {
"targeting": true,
"dark_post": true
},
"first_comment": {
"max_length": 8000
}
},
"multi_photo": {
"message": {
"message": true,
"max_length": 63206,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 6,
"image": true
},
"video": [],
"enter_location": true,
"targeting_and_visibility": {
"targeting": true,
"dark_post": true
},
"first_comment": {
"max_length": 8000
}
},
"single_video": {
"message": {
"max_mediafiles_count": 1
},
"video": {
"file": true,
"title": true,
"category": true
},
"enter_location": true,
"targeting_and_visibility": {
"targeting": true,
"dark_post": true
},
"first_comment": {
"max_length": 8000
}
},
"animated_gif": {
"message": {
"message": true,
"max_length": 63206,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1,
"gif": true
},
"enter_location": true,
"targeting_and_visibility": {
"targeting": true,
"dark_post": true
},
"first_comment": {
"max_length": 8000
}
},
"text": {
"message": {
"message": true,
"max_length": 63206,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 0
},
"enter_location": true,
"targeting_and_visibility": {
"targeting": true,
"dark_post": true
},
"first_comment": {
"max_length": 8000
}
},
"link_carousel": {
"message": {
"message": true,
"max_length": 63206,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": "1 per card",
"image": true,
"gif": true
},
"cards": {
"min_cards": 2,
"max_cards": 5,
"end_card_link": true
},
"link": {
"link": true,
"link_name": true,
"link_description": true
},
"enter_location": true,
"targeting_and_visibility": {
"targeting": true,
"dark_post": true
},
"first_comment": {
"max_length": 8000
}
}
},
"instagram": {
"single_photo": {
"message": {
"message": true,
"max_length": 2200,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1,
"image": true,
"gif": {
"is_animated": false
}
},
"tag_people": true,
"enter_location": true,
"first_comment": {
"max_length": 2200
}
},
"single_video": {
"message": {
"message": true,
"max_length": 2200,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1,
"gif": true
},
"video": {
"file": true,
"title": true,
"category": true
},
"tag_people": true,
"enter_location": true,
"first_comment": {
"max_length": 2200
}
},
"photo_story": {
"message": {
"max_mediafiles_count": 1,
"image": true,
"gif": true
},
"first_comment": {
"max_length": 2200
}
},
"video_story": {
"message": {
"max_mediafiles_count": 1
},
"video": {
"file": true
},
"first_comment": {
"max_length": 2200
}
},
"media_carousel": {
"message": {
"message": true,
"max_length": 2200,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 10,
"image": true,
"gif": {
"is_animated": false
}
},
"video": {
"file": true
},
"first_comment": {
"max_length": 2200
}
}
},
"linkedin": {
"link": {
"message": {
"message": true,
"max_length": 3000,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1,
"image": true,
"gif": true
},
"link": {
"link": true,
"link_name": true,
"link_description": true
},
"first_comment": {
"max_length": 1250
}
},
"single_photo": {
"message": {
"message": true,
"max_length": 3000,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1,
"image": true,
"gif": true
},
"first_comment": {
"max_length": 1250
}
},
"multi_photo": {
"message": {
"message": true,
"max_length": 3000,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 9,
"image": true,
"gif": true
},
"first_comment": {
"max_length": 1250
}
},
"single_video": {
"message": {
"message": true,
"max_length": 3000,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1
},
"video": {
"file": true
},
"first_comment": {
"max_length": 1250
}
},
"text": {
"message": {
"message": true,
"max_length": 3000,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 0
},
"first_comment": {
"max_length": 1250
}
}
},
"twitter": {
"single_photo": {
"message": {
"message": true,
"max_length": 280,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1,
"image": true,
"gif": true
}
},
"multi_photo": {
"message": {
"message": true,
"max_length": 280,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 4,
"image": true,
"gif": true
}
},
"single_video": {
"message": {
"message": true,
"max_length": 280,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 1
},
"video": {
"file": true
}
},
"animated_gif": {
"message": {
"message": true,
"max_length": 280,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"gif": true,
"max_mediafiles_count": 1
}
},
"text": {
"message": {
"message": true,
"max_length": 280,
"shorten_link_checkbox": true,
"emoji": true,
"hashtags": true,
"max_mediafiles_count": 0
}
}
}
}
}
api/global-options/social-media-restrictions
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/global-options/social-media-restrictions" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/global-options/social-media-restrictions"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"facebook": {
"default": {
"video": {
"valid_file_type": [
"mov",
"quicktime",
"mp4",
"x-msvideo",
"3gpp",
"mpeg",
"ogg",
"webm",
"x-m4v",
"ms-asf",
"x-ms-asf",
"x-ms-wmv",
"x-matroska"
],
"max_videos_per_post": 1,
"max_size_mb": 1024,
"max_size_px": {
"width": [],
"height": []
},
"min_size_px": {
"width": [],
"height": []
},
"max_duration_sec": 1200,
"min_duration_sec": [],
"recommended_size": [],
"aspect_ratio": []
},
"image": {
"valid_file_type": [
"jpg",
"jpeg",
"png"
],
"max_mediafiles_count_per_post_carousel": 1,
"max_size_mb": 10,
"max_size_px": {
"width": [],
"height": []
},
"min_size_px": {
"width": 600,
"height": 315
},
"recommended_size": [],
"aspect_ratio": []
},
"gif": {
"valid_file_type": [
"gif"
],
"max_size_mb": 10,
"max_size_px": {
"width": [],
"height": []
},
"min_size_px": {
"width": 600,
"height": 315
},
"gif_is_animated": true
}
},
"link": [],
"single_photo": {
"image": {
"recommended_size": {
"1.91:1": {
"width": 1200,
"height": 628
},
"2:3": {
"width": 1200,
"height": 1800
},
"1:1": {
"width": 1200,
"height": 1200
}
},
"aspect_ratio": [
"1.91:1",
"2:3",
"1:1"
]
}
},
"multi_photo": {
"image": {
"recommended_size": {
"1.91:1": {
"width": 1200,
"height": 628
},
"2:3": {
"width": 1200,
"height": 1800
},
"1:1": {
"width": 1200,
"height": 1200
}
},
"aspect_ratio": [
"1.91:1",
"2:3",
"1:1"
]
}
},
"single_video": {
"video": {
"recommended_size": {
"16:9": {
"width": 1200,
"height": 720
}
},
"aspect_ratio": [
"16:9"
]
}
},
"animated_gif": {
"gif": []
},
"text": [],
"link_carousel": {
"image": []
},
"photo_story": {
"image": {
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
}
},
"aspect_ratio": [
"9:16"
]
}
},
"video_story": {
"video": {
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
}
},
"aspect_ratio": [
"9:16"
]
}
}
},
"instagram": {
"default": {
"video": {
"valid_file_type": [
"mov",
"quicktime",
"mp4",
"x-msvideo",
"3gpp",
"mpeg",
"ogg",
"webm",
"x-m4v",
"ms-asf",
"x-ms-asf",
"x-ms-wmv",
"x-matroska"
],
"max_videos_per_post": 1,
"max_size_mb": 4096,
"max_size_px": {
"width": [],
"height": []
},
"min_size_px": {
"width": 600,
"height": 315
},
"max_duration_sec": 60,
"min_duration_sec": 3,
"recommended_size": [],
"aspect_ratio": []
},
"image": {
"valid_file_type": [
"jpg",
"jpeg",
"png"
],
"max_mediafiles_count_per_post_carousel": 1,
"max_size_mb": 10,
"max_size_px": {
"width": 1080,
"height": 1080
},
"min_size_px": {
"width": 320,
"height": 320
},
"recommended_size": [],
"aspect_ratio": []
},
"gif": {
"gif_is_animated": true
}
},
"single_photo": {
"image": {
"recommended_size": {
"1:1": {
"width": 1080,
"height": 1080
},
"1.91:1": {
"width": 1080,
"height": 608
},
"4:5": {
"width": 1080,
"height": 1350
}
},
"aspect_ratio": [
"1:1",
"1.91:1",
"4:5"
]
}
},
"single_video": {
"video": {
"min_size_px": {
"width": 600,
"height": 750
},
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
},
"1.91:1": {
"width": 600,
"height": 315
},
"1:1": {
"width": 600,
"height": 600
}
},
"aspect_ratio": [
"4:5",
"1.91:1",
"1:1"
]
}
},
"multi_photo": {
"image": {
"recommended_size": {
"1:1": {
"width": 1080,
"height": 1080
},
"1.91:1": {
"width": 1080,
"height": 608
},
"4:5": {
"width": 1080,
"height": 1350
}
},
"aspect_ratio": [
"1:1",
"1.91:1",
"4:5"
]
}
},
"multi_video": {
"video": {
"min_size_px": {
"width": 600,
"height": 750
},
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
},
"1.91:1": {
"width": 600,
"height": 315
},
"1:1": {
"width": 600,
"height": 600
}
},
"aspect_ratio": [
"4:5",
"1.91:1",
"1:1"
]
}
},
"photo_story": {
"image": {
"valid_file_type": [
"jpg",
"jpeg",
"png"
],
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
}
},
"aspect_ratio": [
"9:16"
]
},
"gif": []
},
"video_story": {
"video": {
"min_size_px": {
"width": 600,
"height": 1067
},
"max_duration_sec": 15,
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
}
},
"aspect_ratio": [
"9:16"
]
}
},
"media_carousel": {
"image": {
"valid_file_type": [
"jpg",
"jpeg",
"png"
],
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
}
},
"aspect_ratio": [
"9:16"
]
},
"video": {
"min_size_px": {
"width": 600,
"height": 1067
},
"max_duration_sec": 15,
"recommended_size": {
"9:16": {
"width": 1080,
"height": 1920
}
},
"aspect_ratio": [
"9:16"
]
}
}
},
"linkedin": {
"default": {
"video": {
"valid_file_type": [
"mov",
"quicktime",
"mp4",
"x-msvideo",
"3gpp",
"mpeg",
"ogg",
"webm",
"x-m4v",
"ms-asf",
"x-ms-asf",
"x-ms-wmv",
"x-matroska"
],
"max_videos_per_post": 1,
"max_size_mb": 5120,
"max_duration_sec": 600,
"min_duration_sec": 3,
"max_size_px": {
"width": 4096,
"height": 2304
},
"min_size_px": {
"width": 256,
"height": 144
},
"recommended_size": [],
"aspect_ratio": [
"1:2.4",
"2.4:1"
]
},
"image": {
"supports_image": true,
"valid_file_type": [
"jpg",
"jpeg",
"png"
],
"max_mediafiles_count_per_post_carousel": 1,
"max_size_mb": 10,
"max_size_px": {
"width": [],
"height": []
},
"min_size_px": {
"width": [],
"height": []
},
"recommended_size": {
"1.91:1": {
"width": 1200,
"height": 628
}
},
"aspect_ratio": [
"1.91:1"
]
},
"gif": {
"valid_file_type": [
"gif"
],
"max_size_mb": 10,
"max_frames_number": 350,
"gif_is_animated": false
}
},
"link": [],
"single_photo": {
"image": []
},
"multi_photo": {
"image": []
},
"single_video": {
"video": []
},
"text": [],
"animated_gif": {
"gif": []
}
},
"twitter": {
"default": {
"video": {
"supports_video": true,
"valid_file_type": [
"mov",
"quicktime",
"mp4",
"x-msvideo",
"3gpp",
"mpeg",
"ogg",
"webm",
"x-m4v",
"ms-asf",
"x-ms-asf",
"x-ms-wmv",
"x-matroska"
],
"max_videos_per_post": 1,
"max_size_mb": 512,
"max_size_px": {
"width": 1280,
"height": 1024
},
"min_size_px": {
"width": 32,
"height": 32
},
"max_duration_sec": 140,
"min_duration_sec": 0.5,
"recommended_size": {
"16:9": {
"width": 1280,
"height": 720
},
"9:16": {
"width": 720,
"height": 1280
},
"1:1": {
"width": 720,
"height": 720
}
},
"aspect_ratio": [
"16:9",
"9:16",
"1:1"
]
},
"image": {
"supports_image": true,
"valid_file_type": [
"jpg",
"jpeg",
"png"
],
"max_mediafiles_count_per_post_carousel": 4,
"max_size_mb": 5,
"max_size_px": {
"width": [],
"height": []
},
"min_size_px": {
"width": [],
"height": []
},
"recommended_size": {
"16:9": {
"width": 1200,
"height": 675
},
"2:1": {
"width": 1024,
"height": 512
}
},
"aspect_ratio": [
"16:9",
"2:1",
"7:8",
"4:7"
]
},
"gif": {
"valid_file_type": [
"gif"
],
"max_size_mb": 15,
"gif_is_animated": true,
"max_frames_number": 350,
"max_size_px": {
"width": 1280,
"height": 1080
}
}
},
"single_photo": {
"image": []
},
"multi_photo": {
"image": []
},
"single_video": {
"video": []
},
"animated_gif": {
"gif": []
},
"text": []
}
}
}
Class InstagramController
Get Instagram authorized pages
requires authentication
This endpoint requires Facebook business account user token.
How to get token see: Get short living user access token via FB sdk. https://developers.facebook.com/docs/javascript/examples
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/18/instagram/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"token":"at"}'
const url = new URL(
"http://err.com:8080/api/projects/18/instagram/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "at"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Instagram project connected.):
{
"data": {
"project_social": {
"project_id": 1,
"social_network_id": 1,
"social_network": "instagram",
"social_uid": "10158499579570731",
"social_user_name": "John Doe",
"social_page_id": "102251745038901",
"social_page_name": "attentionnesttest",
"token_expires_at": null,
"id": 1,
"logo": "https:\/\/graph.facebook.com\/102251745038901\/picture?redirect=1&type=small&width=50&height=50",
"pages": [
{
"id": "102251745038901",
"access_token": "test-pages-token",
"category": "Product\/Service",
"category_list": [
{
"id": "2201",
"name": "Product\/service"
}
],
"name": "attentionnesttest",
"tasks": [
"ANALYZE",
"ADVERTISE",
"MESSAGING",
"MODERATE",
"CREATE_CONTENT",
"MANAGE"
]
}
]
}
}
Example response (200, Facebook response contains two pages, select page step required.):
{
"data": {
"project_social": null,
"pages": [
{
"id": "102251745038901",
"category": "Product\/Service",
"category_list": [
{
"id": "2201",
"name": "Product\/service"
}
],
"name": "attentionnesttest",
"tasks": [
"ANALYZE",
"ADVERTISE",
"MESSAGING",
"MODERATE",
"CREATE_CONTENT",
"MANAGE"
]
},
{
"id": "102251745038902",
"category": "Product\/Service",
"category_list": [
{
"id": "2201",
"name": "Product\/service"
}
],
"name": "attentionnesttest2",
"tasks": [
"ANALYZE",
"ADVERTISE",
"MESSAGING",
"MODERATE",
"CREATE_CONTENT",
"MANAGE"
]
}
]
}
}
Received response:
Request failed with error:
Chose page from the list returned by "Get Instagram authorized pages"
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/projects/instagram/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"project_id":3332.31784338,"page_id":142080683.33}'
const url = new URL(
"http://err.com:8080/api/projects/instagram/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"project_id": 3332.31784338,
"page_id": 142080683.33
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Instagram project connected.):
{
"data": {
"project_id": 1,
"social_network_id": 2,
"social_network": "instagram",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest",
"ig_user_id": "17841444677322556"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
}
Received response:
Request failed with error:
Renew page credentials by saving new token for given page
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/projects/11/instagram/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"token":"qui"}'
const url = new URL(
"http://err.com:8080/api/projects/11/instagram/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "qui"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Instagram project connected.):
{
"data": {
"project_id": 1,
"social_network_id": 2,
"social_network": "instagram",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest",
"ig_user_id": "17841444677322556"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
}
Received response:
Request failed with error:
Delete connected social account
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/projects/11/instagram" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/11/instagram"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204, Post):
<Empty response>
Received response:
Request failed with error:
Class LinkedinController
Get Linkedin authorization link
requires authentication
This is the start point for Linkedin authorization implementation on frontend. It's using to generate link with site callback URL. This URL should be registered in the Linkedin APP used by this backend. The data you will get on callback url you should use in "Get authorized pages request"
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/17/linkedin/authorization-link?callback_url=sit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"callback_url":"http:\/\/www.dietrich.info\/velit-dolorem-non-dolorem-et-sit.html"}'
const url = new URL(
"http://err.com:8080/api/projects/17/linkedin/authorization-link"
);
let params = {
"callback_url": "sit",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"callback_url": "http:\/\/www.dietrich.info\/velit-dolorem-non-dolorem-et-sit.html"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Link generated.):
{
"data": {
"authorization_link": "https:\/\/www.linkedin.com\/oauth\/v2\/authorization?response_type=code&client_id=7744jgd477y3gt&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapi%2Fproject%2Flinkedin%2Fpages&state=eab288d1-d03e-490a-ad97-110322ec92c2&scope=r_organization_social%20w_organization_social%20rw_organization_admin"
}
}
Get Linkedin authorized pages
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/linkedin/pages?code=tenetur&state=odio" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"code":"voluptatem","state":"numquam"}'
const url = new URL(
"http://err.com:8080/api/projects/linkedin/pages"
);
let params = {
"code": "tenetur",
"state": "odio",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "voluptatem",
"state": "numquam"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Linkedin project connected.):
{
"data": {
"project_social": {
"project_id": 1,
"social_network_id": 3,
"social_network": "linkedin",
"account_details": {
"role": "ADMINISTRATOR",
"organization": "urn:test",
"roleAssignee": "urn:test",
"state": "APPROVED",
"organizationName": "test",
"roleAssigneeLastName": "Test",
"roleAssigneeFirstName": "User"
},
"token_expires_at": "2021-05-12T16:02:00+00:00",
"id": 1,
"logo": null
},
"pages": [
{
"role": "ADMINISTRATOR",
"organization": "urn:test",
"roleAssignee": "urn:test",
"state": "APPROVED",
"organizationName": "test",
"roleAssigneeLastName": "Test",
"roleAssigneeFirstName": "User"
}
]
}
}
Example response (200, Linkedin response contains more than one page, select page step required.):
{
"data": {
"project_social": null,
"pages": [
{
"role": "ADMINISTRATOR",
"organization": "urn:test",
"roleAssignee": "urn:test",
"state": "APPROVED",
"organizationName": "test",
"roleAssigneeLastName": "Test",
"roleAssigneeFirstName": "User"
},
{
"role": "ADMINISTRATOR",
"organization": "urn:test2",
"roleAssignee": "urn:test2",
"state": "APPROVED",
"organizationName": "test2",
"roleAssigneeLastName": "Test2",
"roleAssigneeFirstName": "User2"
}
]
}
}
Received response:
Request failed with error:
Chose page from the list returned by "Get linkedin authorized pages"
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/projects/linkedin/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"project_id":2,"organization":"illum"}'
const url = new URL(
"http://err.com:8080/api/projects/linkedin/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"project_id": 2,
"organization": "illum"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Linkedin project connected.):
{
"data": {
"project_id": 1,
"social_network_id": 3,
"social_network": "linkedin",
"account_details": {
"role": "ADMINISTRATOR",
"organization": "urn:test",
"roleAssignee": "urn:test",
"state": "APPROVED",
"organizationName": "test",
"roleAssigneeLastName": "Test",
"roleAssigneeFirstName": "User"
},
"token_expires_at": "2021-05-12T16:02:00+00:00",
"id": 1,
"logo": null
}
}
Received response:
Request failed with error:
Renew page credentials by saving new token for given page
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/projects/linkedin/pages" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"code":"eveniet","state":"omnis"}'
const url = new URL(
"http://err.com:8080/api/projects/linkedin/pages"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "eveniet",
"state": "omnis"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Linkedin project connected.):
{
"data": {
"project_id": 1,
"social_network_id": 3,
"social_network": "linkedin",
"account_details": {
"role": "ADMINISTRATOR",
"organization": "urn:test",
"roleAssignee": "urn:test",
"state": "APPROVED",
"organizationName": "test",
"roleAssigneeLastName": "Test",
"roleAssigneeFirstName": "User"
},
"token_expires_at": "2021-05-12T16:02:00+00:00",
"id": 1,
"logo": null
}
}
Received response:
Request failed with error:
Delete connected social account
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/projects/19/linkedin" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/19/linkedin"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204, Post):
<Empty response>
Received response:
Request failed with error:
Get company by vanity name
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/4/linkedin/search?q=eos" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/4/linkedin/search"
);
let params = {
"q": "eos",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
ManualPublishing
api/posts/publish/admin/{post_id}
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/publish/admin/et" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/publish/admin/et"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Send post for manual publish.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/publish/aut" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/publish/aut"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200, Post published):
{
"success": true
}
Received response:
Request failed with error:
Media
Class MediaController
This group allows you to manage temporary media resources (files)
"Temporary media" is a file resource linked to user who created it. Creators can attach this media resources to their PostSocial resources and create PostAttachments. See PostSocial part of this documentation to find out how to manage attachments.
This media resources called temporary because it will be permanently deleted in defined time. We assumed that you should use it while working on some single Post resource. However if you need to use the same media file for more than one PostSocial you can use single temporary media resource to attach. So you don't need to upload the same file twice. It also calculates MD5 under the hood to prevent processing files that equal.
-- Media previews
The previews
field is array that can be empty or contain one or more elements.
Each element has a key of: small, medium, original (uses only for video previews)
Previews generation is asynchronous so you won't see it after creation of new temporary media
Get list of temporary media by Ids
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/5/medias?media_ids=velit" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/5/medias"
);
let params = {
"media_ids": "velit",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Get batch):
{
"data": [
{
"id": 4,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 5,
"file_path": "\/images\/odit.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/images\/odit.png",
"file_size": null,
"content_type": "image\/png",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 500,
"height": 500,
"ratio": "1:1"
},
"previews": [],
"canva_design_id": null,
"imported_from_url": null,
"created_at": "2021-05-11T14:59:26+00:00",
"updated_at": "2021-05-11T14:59:26+00:00"
},
{
"id": 5,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 5,
"file_path": "\/images\/odit.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/images\/odit.png",
"file_size": null,
"content_type": "image\/png",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 500,
"height": 500,
"ratio": "1:1"
},
"previews": [],
"canva_design_id": null,
"imported_from_url": null,
"created_at": "2021-05-11T14:59:26+00:00",
"updated_at": "2021-05-11T14:59:26+00:00"
},
{
"id": 6,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 5,
"file_path": "\/images\/odit.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/images\/odit.png",
"file_size": null,
"content_type": "image\/png",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 500,
"height": 500,
"ratio": "1:1"
},
"previews": [],
"canva_design_id": null,
"imported_from_url": null,
"created_at": "2021-05-11T14:59:26+00:00",
"updated_at": "2021-05-11T14:59:26+00:00"
},
{
"id": 7,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 5,
"file_path": "\/images\/odit.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/images\/odit.png",
"file_size": null,
"content_type": "image\/png",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 500,
"height": 500,
"ratio": "1:1"
},
"previews": [],
"canva_design_id": null,
"imported_from_url": null,
"created_at": "2021-05-11T14:59:26+00:00",
"updated_at": "2021-05-11T14:59:26+00:00"
},
{
"id": 8,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 5,
"file_path": "\/images\/odit.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/images\/odit.png",
"file_size": null,
"content_type": "image\/png",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 500,
"height": 500,
"ratio": "1:1"
},
"previews": [],
"canva_design_id": null,
"imported_from_url": null,
"created_at": "2021-05-11T14:59:26+00:00",
"updated_at": "2021-05-11T14:59:26+00:00"
}
]
}
Example response (200, Get media with preview):
{
"data": [
{
"id": 1,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 2,
"file_path": "a-1\/3734525746094115f4308a.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/3734525746094115f4308a.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 500,
"height": 500,
"ratio": "1:1"
},
"previews": {
"medium": "http:\/\/localhost:8080\/storage\/tmp\/previews\/test\/medium.jpg"
},
"canva_design_id": null,
"imported_from_url": null,
"created_at": "2021-05-11T14:59:26+00:00",
"updated_at": "2021-05-11T14:59:26+00:00"
}
]
}
Received response:
Request failed with error:
Save temporary media
requires authentication
It returns both 201 and 200 Http status codes 'cause if you uploaded before a file with te same MD5 you will get it with code 200.
Example request:
curl -X POST \
"http://err.com:8080/api/projects/14/medias" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "media=@/tmp/phpblcepN"
const url = new URL(
"http://err.com:8080/api/projects/14/medias"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('media', document.querySelector('input[name="media"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Example response (201, Save):
{
"data": {
"id": 1,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 2,
"file_path": "a-1\/2114471349609a9bcecfd47.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/2114471349609a9bcecfd47.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 500,
"height": 500,
"ratio": "1:1"
},
"previews": [],
"canva_design_id": null,
"imported_from_url": null,
"created_at": "2021-05-11T14:59:26+00:00",
"updated_at": "2021-05-11T14:59:26+00:00"
}
}
Received response:
Request failed with error:
Import temporary media from URL/Canva
requires authentication
This API is generally used for upload files from Canva but you can set any public source URL and omit canva_design_id to upload from another source.
You can add canva_design_id to have possibility of editing design in future with your Canva account.
See more about Canva button
here https://www.canva.com/button/documentation/js-api/
It returns both 201 and 200 Http status codes 'cause if you uploaded before a file with te same MD5 you will get it with code 200.
Example request:
curl -X POST \
"http://err.com:8080/api/projects/5/medias/import" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"canva_design_id":"nesciunt","content_url":"http:\/\/kreiger.com\/"}'
const url = new URL(
"http://err.com:8080/api/projects/5/medias/import"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"canva_design_id": "nesciunt",
"content_url": "http:\/\/kreiger.com\/"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Import):
{
"data": {
"id": 1,
"resource": "MediaResource",
"original_name": "tmp-media-DMhmIP",
"user_id": 2,
"file_path": "a-1\/965826564609a9b106ada3.jpg",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/965826564609a9b106ada3.jpg",
"file_size": 28533,
"content_type": "image\/jpeg",
"media_collection_type": "UserTemporaryMediaInfo",
"is_temporary": true,
"options": {
"type": "image",
"width": 300,
"height": 300,
"ratio": "1:1"
},
"previews": [],
"canva_design_id": "110572aa-441b-39fe-910b-c542b52b084a",
"imported_from_url": "https:\/\/dev-attention-public.s3-ap-southeast-2.amazonaws.com\/test\/square-park.jpg",
"created_at": "2021-05-11T14:56:16+00:00",
"updated_at": "2021-05-11T14:56:16+00:00"
}
}
Received response:
Request failed with error:
Delete temporary media
requires authentication
It might be wondering why you need to delete temporary media since it will be deleted automatically.
Nevertheless when you call this endpoint the file will be deleted asap and storage gods will be pleasant to you.
Example request:
curl -X DELETE \
"http://err.com:8080/api/projects/9/medias/11" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/9/medias/11"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204, Deleted):
<Empty response>
Received response:
Request failed with error:
Check restrictions of unattached media.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/projects/10/medias/13" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"social_options":[{"post_social_type":"praesentium","social_network_name":"praesentium"}]}'
const url = new URL(
"http://err.com:8080/api/projects/10/medias/13"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"social_options": [
{
"post_social_type": "praesentium",
"social_network_name": "praesentium"
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (204, Validated):
<Empty response>
Received response:
Request failed with error:
Notifiable Devices
Class DeviceController
Register new notifiable user device or refresh device's FCM token
requires authentication
You should send this request right after you got notification token from user. We use FCM platform for notification processing. If you're wondering how to get token see docs for details https://firebase.google.com/docs/cloud-messaging
Example request:
curl -X POST \
"http://err.com:8080/api/auth/devices" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"device_type":"web","device_uid":"est","token":"iste"}'
const url = new URL(
"http://err.com:8080/api/auth/devices"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_type": "web",
"device_uid": "est",
"token": "iste"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Send test notifications to authorised user (just for test purposes)
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/auth/devices/notify-test" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"notify_async":false}'
const url = new URL(
"http://err.com:8080/api/auth/devices/notify-test"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notify_async": false
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete notifiable user device.
requires authentication
It just mean that you won't get notifications on that device. You should delete device when user logs out or restricts of getting notifications
Example request:
curl -X DELETE \
"http://err.com:8080/api/auth/devices/consequatur/in" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/auth/devices/consequatur/in"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Post
Class PostController
Get posts for Instagram grid view
requires authentication
API returns all Posts that contains Instagram PostSocial ordered by scheduling time. Deleted posts are omitted.
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/11/instagram-posts-grid?count=17" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/11/instagram-posts-grid"
);
let params = {
"count": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Success response):
{
"data": [
{
"timestamp": 1630681080,
"post": {
"id": 1,
"project_id": 1,
"type": "single_photo",
"status": "scheduled",
"message": "Test message",
"first_comment": "First Comment",
"master_social_post_id": null,
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2021-09-03T14:29:53+00:00",
"updated_at": "2021-09-03T14:29:53+00:00",
"post_socials": [
{
"id": 1,
"resource": "PostSocialResource",
"post_id": 1,
"social_network": "instagram",
"message": "Ducimus possimus maxime dolores facere quis ratione debitis. Veritatis iure autem molestiae id. Quod esse delectus numquam ipsam magni assumenda non.",
"attachment_order": [],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 0,
"extra_fields": null,
"last_social_api_response": null,
"created_at": "2021-09-03T14:29:53+00:00",
"updated_at": "2021-09-03T14:29:53+00:00",
"attachments": []
}
],
"latest_schedule": {
"id": 1,
"timezone": "UTC",
"date": "2021-09-03",
"time": "14:58",
"datetime": "2021-09-03T14:58:00+00:00",
"is_autoposting": false
}
},
"instagramMedia": null
},
{
"timestamp": 1630445414,
"post": null,
"instagramMedia": {
"id": "17935074826589633",
"media_type": "IMAGE",
"media_url": "https:\/\/scontent-syd2-1.cdninstagram.com\/v\/t51.2885-15\/240890608_387264572775563_3233415912430917726_n.jpg?_nc_cat=106&ccb=1-5&_nc_sid=8ae9d6&_nc_ohc=6FHTlAwzwfwAX92E1Kl&_nc_ht=scontent-syd2-1.cdninstagram.com&edm=AM6HXa8EAAAA&oh=ec9606ad5061e9e369f5bcae262128f6&oe=61350F8F",
"created_at": "2021-08-31T21:30:14+00:00"
}
},
{
"timestamp": 1630188013,
"post": {
"id": 2,
"project_id": 1,
"type": "single_video",
"status": "scheduled",
"message": "Test message",
"first_comment": "First Comment",
"master_social_post_id": null,
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2021-09-03T14:29:53+00:00",
"updated_at": "2021-09-03T14:29:53+00:00",
"post_socials": [
{
"id": 2,
"resource": "PostSocialResource",
"post_id": 2,
"social_network": "instagram",
"message": "Minus et voluptas cum eius molestiae consequatur. Rerum ut dignissimos laudantium quos sit et animi. Sunt quibusdam delectus voluptatem modi. Consequuntur eius aut et similique adipisci.",
"attachment_order": [],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 0,
"extra_fields": null,
"last_social_api_response": null,
"created_at": "2021-09-03T14:29:53+00:00",
"updated_at": "2021-09-03T14:29:53+00:00",
"attachments": []
}
],
"latest_schedule": {
"id": 2,
"timezone": "UTC",
"date": "2021-09-03",
"time": "14:41",
"datetime": "2021-09-03T14:41:00+00:00",
"is_autoposting": false
}
},
"instagramMedia": {
"id": "17913338554896555",
"media_type": "IMAGE",
"media_url": "https:\/\/scontent-syd2-1.cdninstagram.com\/v\/t51.2885-15\/240865356_427044545384934_3941222171137570154_n.jpg?_nc_cat=101&ccb=1-5&_nc_sid=8ae9d6&_nc_ohc=-plLkTwZDOkAX9t706K&_nc_ht=scontent-syd2-1.cdninstagram.com&edm=AM6HXa8EAAAA&oh=f2c3d3ac05865308e0ef10dec69c719a&oe=61358263",
"created_at": "2021-08-28T22:00:13+00:00"
}
},
{
"timestamp": 1630011619,
"post": null,
"instagramMedia": {
"id": "17867968187511978",
"media_type": "IMAGE",
"media_url": "https:\/\/scontent-syd2-1.cdninstagram.com\/v\/t51.2885-15\/240551857_1729054007291778_8794094132150080744_n.jpg?_nc_cat=101&ccb=1-5&_nc_sid=8ae9d6&_nc_ohc=lMRxo_nKcnYAX-s_0JS&_nc_ht=scontent-syd2-1.cdninstagram.com&edm=AM6HXa8EAAAA&oh=a64328256eb0b1fb834c393ff48bd25a&oe=61352BDF",
"created_at": "2021-08-26T21:00:19+00:00"
}
},
{
"timestamp": 1629974066,
"post": null,
"instagramMedia": {
"id": "18247478008032899",
"media_type": "VIDEO",
"media_url": "https:\/\/video-syd2-1.cdninstagram.com\/v\/t50.2886-16\/240619524_128757126144954_7330969964493171770_n.mp4?_nc_cat=105&vs=17985893248376905_384509316&_nc_vs=HBkcFQAYJEdBU1FWdzY2SThTYUduVUFBRHBzckhCWDFyeGxia1lMQUFBRhUAAsgBACgAGAAbAYgHdXNlX29pbAExFQAAJujI8rniysA%2FFQIoAkMzLBdAQMAAAAAAABgSZGFzaF9iYXNlbGluZV8xX3YxEQB16gcA&ccb=1-5&_nc_sid=59939d&efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5mZWVkIn0%3D&_nc_ohc=w13TKRta6pwAX_Gpl0d&_nc_ht=video-syd2-1.cdninstagram.com&edm=AM6HXa8EAAAA&oh=0e21cb8d78cb0a2a9afd3aa7044eb741&oe=61314C90&_nc_vts_prog=1&vts=1&_nc_rid=ebbab550ee",
"created_at": "2021-08-26T10:34:26+00:00"
}
},
{
"timestamp": 1629837012,
"post": null,
"instagramMedia": {
"id": "17894672219190235",
"media_type": "IMAGE",
"media_url": "https:\/\/scontent-syd2-1.cdninstagram.com\/v\/t51.2885-15\/240445144_215511780541433_7951297366561793136_n.jpg?_nc_cat=104&ccb=1-5&_nc_sid=8ae9d6&_nc_ohc=yLdbVyN7uSwAX_0oW8I&_nc_ht=scontent-syd2-1.cdninstagram.com&edm=AM6HXa8EAAAA&oh=86afec53f841755bca2d4ce2606738c7&oe=61364793",
"created_at": "2021-08-24T20:30:12+00:00"
}
},
{
"timestamp": 1629797562,
"post": null,
"instagramMedia": {
"id": "17980360729399937",
"media_type": "CAROUSEL_ALBUM",
"media_url": "https:\/\/scontent-syd2-1.cdninstagram.com\/v\/t51.29350-15\/240449131_4776156815730713_7708989946732539218_n.jpg?_nc_cat=102&ccb=1-5&_nc_sid=8ae9d6&_nc_ohc=1Bs9iKUwQK0AX_dXyNo&_nc_ht=scontent-syd2-1.cdninstagram.com&edm=AM6HXa8EAAAA&oh=62fd9c5b98bd8c512284ffb874ce089d&oe=61354525",
"created_at": "2021-08-24T09:32:42+00:00"
}
},
{
"timestamp": 1629583216,
"post": null,
"instagramMedia": {
"id": "17859170894608346",
"media_type": "IMAGE",
"media_url": "https:\/\/scontent-syd2-1.cdninstagram.com\/v\/t51.2885-15\/240394411_323908672847436_7047761068541883991_n.jpg?_nc_cat=108&ccb=1-5&_nc_sid=8ae9d6&_nc_ohc=b2deWwOCwfoAX_k8TGe&_nc_ht=scontent-syd2-1.cdninstagram.com&oh=52c81d8e6ae3c1aa57f07700cbe2f1a2&oe=613544C8",
"created_at": "2021-08-21T22:00:16+00:00"
}
},
{
"timestamp": 1629457332,
"post": null,
"instagramMedia": {
"id": "17908619279029779",
"media_type": "VIDEO",
"media_url": "https:\/\/video-syd2-1.cdninstagram.com\/v\/t50.2886-16\/239526449_135069408795937_5660060644449036508_n.mp4?_nc_cat=100&vs=17889156002475034_80321013&_nc_vs=HBkcFQAYJEdESGlSZzRoblNGTTJIb0FBTnlvamZjcWs0eE9ia1lMQUFBRhUAAsgBACgAGAAbAYgHdXNlX29pbAExFQAAJtrOzJCsxbo%2FFQIoAkMzLBdAKAAAAAAAABgSZGFzaF9iYXNlbGluZV8xX3YxEQB16gcA&ccb=1-5&_nc_sid=59939d&efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5mZWVkIn0%3D&_nc_ohc=oSJvW81bzFQAX_uSeF5&_nc_ht=video-syd2-1.cdninstagram.com&oh=351b4b97286a60127de8099c1ef03866&oe=61316857&_nc_vts_prog=1&vts=1&_nc_rid=90fd9189c4",
"created_at": "2021-08-20T11:02:12+00:00"
}
}
]
}
Received response:
Request failed with error:
Display a list of allowed post types for choosed social networks.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/types/allowed" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"social_networks":["incidunt","sed"]}'
const url = new URL(
"http://err.com:8080/api/posts/types/allowed"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"social_networks": [
"incidunt",
"sed"
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Get allowed post types.):
{
"data": {
"link": {
"name": "Link",
"label": "Link"
},
"single_photo": {
"name": "Single photo",
"label": "Single photo"
},
"multi_photo": {
"name": "Multi photo",
"label": "Multi photo"
},
"video": {
"name": "Single video",
"label": "Single video"
},
"text": {
"name": "Text message",
"label": "Text message"
}
}
}
Received response:
Request failed with error:
Display a list of allowed social networks for choosed post type.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/social-networks/allowed" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_type":"rerum"}'
const url = new URL(
"http://err.com:8080/api/posts/social-networks/allowed"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_type": "rerum"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Get allowed social networks.):
{
"data": {
"social_networks": [
"facebook",
"linkedin",
"twitter"
]
}
}
Display a list of available and allowed social networks for chosen post social.
requires authentication
- available - social networks supported by given post type
- allowed - which available networks is registered in this project
Example request:
curl -X GET \
-G "http://err.com:8080/api/post-socials/quia/social-networks/allowed" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/post-socials/quia/social-networks/allowed"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Get allowed social networks.):
{
"data": {
"social_networks": [
"facebook",
"linkedin",
"twitter"
]
}
}
Store a newly created post in storage and create related social posts.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"project_id":5,"type":"accusamus","message":"temporibus","first_comment":"consequatur","social_networks":["eum","dolorum"],"is_temporary":false}'
const url = new URL(
"http://err.com:8080/api/posts"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"project_id": 5,
"type": "accusamus",
"message": "temporibus",
"first_comment": "consequatur",
"social_networks": [
"eum",
"dolorum"
],
"is_temporary": false
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Store post.):
{
"data": {
"id": 1,
"project_id": 1,
"type": "message",
"status": "Draft",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2020-12-31T15:26:45.000000Z",
"updated_at": "2020-12-31T15:26:45.000000Z",
"post_socials": [
{
"id": 1,
"post_id": 1,
"social_network": "facebook",
"message": "Second message",
"attachment_order": "[1,3]",
"first_comment": "Second comment",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 1,
"post_social_id": 1,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 5,
"post_social_id": 1,
"object_id": 3,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 3,
"original_name": "test2.jpg",
"user_id": 1,
"file_path": "agency-1\/social-posts\/4051555905fededb6bd4dc.jpg",
"file_size": 14401,
"content_type": "image\/jpeg",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
},
{
"id": 2,
"post_id": 1,
"social_network": "linkedIn",
"message": "Test message",
"attachment_order": "[1,2]",
"first_comment": "First Comment",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 3,
"post_social_id": 2,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 4,
"post_social_id": 2,
"object_id": 2,
"object_type": "video",
"preview_image_id": null,
"object_data": {
"id": 2,
"original_name": "test.avi",
"user_id": 1,
"file_path": "agency-1\/social-posts\/13396592335fededb617797.avi",
"file_size": 8324510,
"content_type": "video\/x-msvideo",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
}
]
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Duplicate post with post socials, attaches, schedules, media. Duplicate media files.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/duplicate" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_id":3,"social_networks":["linkedin","instagram"]}'
const url = new URL(
"http://err.com:8080/api/posts/duplicate"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_id": 3,
"social_networks": [
"linkedin",
"instagram"
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Store post.):
{
"data": {
"id": 1,
"project_id": 1,
"type": "message",
"status": "Draft",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2020-12-31T15:26:45.000000Z",
"updated_at": "2020-12-31T15:26:45.000000Z",
"post_socials": [
{
"id": 1,
"post_id": 1,
"social_network": "facebook",
"message": "Second message",
"attachment_order": "[1,3]",
"first_comment": "Second comment",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 1,
"post_social_id": 1,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 5,
"post_social_id": 1,
"object_id": 3,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 3,
"original_name": "test2.jpg",
"user_id": 1,
"file_path": "agency-1\/social-posts\/4051555905fededb6bd4dc.jpg",
"file_size": 14401,
"content_type": "image\/jpeg",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
},
{
"id": 2,
"post_id": 1,
"social_network": "linkedIn",
"message": "Test message",
"attachment_order": "[1,2]",
"first_comment": "First Comment",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 3,
"post_social_id": 2,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 4,
"post_social_id": 2,
"object_id": 2,
"object_type": "video",
"preview_image_id": null,
"object_data": {
"id": 2,
"original_name": "test.avi",
"user_id": 1,
"file_path": "agency-1\/social-posts\/13396592335fededb617797.avi",
"file_size": 8324510,
"content_type": "video\/x-msvideo",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
}
]
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Duplicate post batch
requires authentication
With post socials, attaches, schedules, media. Duplicate media files.
In addition to post id you can add an array of social networks you want to duplicate for each post
Example request:
curl -X POST \
"http://err.com:8080/api/posts/duplicate-batch" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"posts":[{"post_id":19,"social_networks":["instagram","linkedin"]}]}'
const url = new URL(
"http://err.com:8080/api/posts/duplicate-batch"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"posts": [
{
"post_id": 19,
"social_networks": [
"instagram",
"linkedin"
]
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, New posts created.):
{
"data": [
{
"id": 3,
"project_id": 1,
"type": "single_video",
"status": "draft",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": "pending-duplication",
"parent_post_id": 1,
"master_social_post_id": null,
"master_social_network": null,
"created_at": "2021-03-19T11:08:06+00:00",
"updated_at": "2021-03-19T11:08:06+00:00",
"post_socials": [
{
"id": 5,
"post_id": 3,
"social_network": "facebook",
"message": "Nemo eius asperiores velit aspernatur provident doloribus ut labore. Harum blanditiis delectus sequi harum dolore accusantium. Unde quisquam et eius autem tempore hic quia.",
"attachment_order": [
1,
2
],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 3,
"post_social_id": 5,
"object_id": 3,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 3,
"original_name": "test.png",
"user_id": 3,
"file_path": "agency-1\/social-posts\/5\/1260836711605486154f1ac.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 4,
"post_social_id": 5,
"object_id": 4,
"object_type": "video",
"preview_image_id": null,
"object_data": {
"id": 4,
"original_name": "SampleVideo_1280x720_1mb.mp4",
"user_id": 3,
"file_path": "agency-1\/social-posts\/5\/2769951160548615944c9.mp4",
"file_size": 1055736,
"content_type": "video\/mp4",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
},
{
"id": 6,
"post_id": 3,
"social_network": "instagram",
"message": "Velit reiciendis dolor sint. At omnis at laborum neque et. Harum beatae et saepe amet sit dolores vel. Enim quia quis id optio. Inventore vel nulla impedit voluptatum deleniti.",
"attachment_order": [],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": []
}
]
},
{
"id": 4,
"project_id": 1,
"type": "single_video",
"status": "draft",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": "in-progress",
"parent_post_id": 2,
"master_social_post_id": null,
"master_social_network": null,
"created_at": "2021-03-19T11:08:17+00:00",
"updated_at": "2021-03-19T11:08:17+00:00",
"post_socials": [
{
"id": 7,
"post_id": 4,
"social_network": "facebook",
"message": "Laudantium in iure consequatur est. Velit assumenda sequi quaerat quos laborum ad. Inventore corrupti eum dolor consectetur at. In inventore et ut velit et.",
"attachment_order": [],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": []
},
{
"id": 8,
"post_id": 4,
"social_network": "instagram",
"message": "Eius ipsa quo hic in quis suscipit aut. Ut voluptatum quidem quos quas quis odit. Sed omnis veritatis ducimus nisi reiciendis voluptate. A ut voluptas illo vel cum.",
"attachment_order": [],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": []
}
]
}
]
}
Received response:
Request failed with error:
Duplicate post social to any social network platform in new post.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/duplicate-to-any-platform" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_social_id":15,"social_networks":["instagram","facebook"],"date":"\"2021-10-08\"","time":"\"11:02\"","is_autoposting":false}'
const url = new URL(
"http://err.com:8080/api/posts/duplicate-to-any-platform"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_social_id": 15,
"social_networks": [
"instagram",
"facebook"
],
"date": "\"2021-10-08\"",
"time": "\"11:02\"",
"is_autoposting": false
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Duplicate post social batch to any social network platform in new post.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/duplicate-to-any-platform-batch" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"posts_socials":[{"post_social_id":11,"social_networks":["twitter","linkedin"]}]}'
const url = new URL(
"http://err.com:8080/api/posts/duplicate-to-any-platform-batch"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"posts_socials": [
{
"post_social_id": 11,
"social_networks": [
"twitter",
"linkedin"
]
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Display a post.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/posts/excepturi" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/excepturi"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show post.):
{
"data": {
"id": 1,
"project_id": 1,
"type": "message",
"status": "Draft",
"message": "Test message",
"first_comment": "First Comment",
"master_social_post_id": null,
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2020-12-31T15:26:45.000000Z",
"updated_at": "2020-12-31T15:26:45.000000Z",
"post_socials": [
{
"id": 1,
"post_id": 1,
"social_network": "facebook",
"message": "Second message",
"attachment_order": "[1,3]",
"first_comment": "Second comment",
"has_multi_attachments": 1,
"extra_fields": null,
"message_editor_state": null,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 1,
"post_social_id": 1,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 5,
"post_social_id": 1,
"object_id": 3,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 3,
"original_name": "test2.jpg",
"user_id": 1,
"file_path": "agency-1\/social-posts\/4051555905fededb6bd4dc.jpg",
"file_size": 14401,
"content_type": "image\/jpeg",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
},
{
"id": 2,
"post_id": 1,
"social_network": "linkedIn",
"message": "Test message",
"attachment_order": "[1,2]",
"first_comment": "First Comment",
"has_multi_attachments": 1,
"extra_fields": null,
"message_editor_state": null,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 3,
"post_social_id": 2,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 4,
"post_social_id": 2,
"object_id": 2,
"object_type": "video",
"preview_image_id": null,
"object_data": {
"id": 2,
"original_name": "test.avi",
"user_id": 1,
"file_path": "agency-1\/social-posts\/13396592335fededb617797.avi",
"file_size": 8324510,
"content_type": "video\/x-msvideo",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
}
],
"latest_schedule": {
"id": 1,
"timezone": "UTC",
"date": "2021-02-23",
"time": "12:46",
"datetime": "2021-02-23T12:46:00+00:00",
"is_autoposting": false
}
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Set post and post socials statuses to on publishing.
requires authentication
! This endpoint is used only for handling Post status on manual publishing of Instagram stories and media carousel.
Example request:
curl -X PUT \
"http://err.com:8080/api/posts/aut/status-on-publishing" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/aut/status-on-publishing"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200, Statuses changed):
{
"success": true
}
Received response:
Request failed with error:
Set post and post socials statuses to live.
requires authentication
! This endpoint is used only for handling Post status on manual publishing of Instagram stories and media carousel.
Example request:
curl -X PUT \
"http://err.com:8080/api/posts/maxime/status-live" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/maxime/status-live"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200, Statuses changed):
{
"success": true
}
Received response:
Request failed with error:
Display a list of posts got by date interval.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/posts/ab/quam/sunt" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/ab/quam/sunt"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show posts with schedules.):
{
"data": [
{
"id": 1,
"project_id": 1,
"type": "message",
"status": "Draft",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2020-12-31T15:26:45.000000Z",
"updated_at": "2020-12-31T15:26:45.000000Z",
"post_socials": [
{
"id": 1,
"post_id": 1,
"social_network": "facebook",
"message": "Second message",
"attachment_order": "[1,3]",
"first_comment": "Second comment",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 1,
"post_social_id": 1,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 5,
"post_social_id": 1,
"object_id": 3,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 3,
"original_name": "test2.jpg",
"user_id": 1,
"file_path": "agency-1\/social-posts\/4051555905fededb6bd4dc.jpg",
"file_size": 14401,
"content_type": "image\/jpeg",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
},
{
"id": 2,
"post_id": 1,
"social_network": "linkedIn",
"message": "Test message",
"attachment_order": "[1,2]",
"first_comment": "First Comment",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 3,
"post_social_id": 2,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 1,
"file_path": "agency-1\/social-posts\/1168063955fededb602be6.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
},
{
"id": 4,
"post_social_id": 2,
"object_id": 2,
"object_type": "video",
"preview_image_id": null,
"object_data": {
"id": 2,
"original_name": "test.avi",
"user_id": 1,
"file_path": "agency-1\/social-posts\/13396592335fededb617797.avi",
"file_size": 8324510,
"content_type": "video\/x-msvideo",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
}
],
"latest_schedule": {
"id": 1,
"timezone": "UTC",
"date": "2021-02-23",
"time": "12:46",
"datetime": "2021-02-23T12:46:00+00:00",
"is_autoposting": false
}
}
]
}
Received response:
Request failed with error:
Soft delete a post.
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/posts/repellendus" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/repellendus"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204, Deleted):
<Empty response>
Received response:
Request failed with error:
Soft delete many posts.
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/posts" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_ids":[5,19]}'
const url = new URL(
"http://err.com:8080/api/posts"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_ids": [
5,
19
]
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (204, Deleted):
<Empty response>
Received response:
Request failed with error:
PostSchedule
Update batch of post-schedules to new date without time
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/posts/schedules/date" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"schedules":[{"id":17,"date":"\"2021-10-08\"","time":"\"11:02\""}]}'
const url = new URL(
"http://err.com:8080/api/posts/schedules/date"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"schedules": [
{
"id": 17,
"date": "\"2021-10-08\"",
"time": "\"11:02\""
}
]
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": [
{
"id": null,
"timezone": "UTC",
"date": "2021-10-08",
"time": "11:28",
"datetime": "2021-10-08T11:28:00+00:00",
"is_autoposting": false,
"post": null
},
{
"id": null,
"timezone": "UTC",
"date": "2021-10-08",
"time": "11:12",
"datetime": "2021-10-08T11:12:00+00:00",
"is_autoposting": false,
"post": null
}
]
}
Received response:
Request failed with error:
Create post schedule
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/posts/schedules" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_id":20,"date":"\"2021-10-08\"","time":"\"11:02\"","is_autoposting":false}'
const url = new URL(
"http://err.com:8080/api/posts/schedules"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_id": 20,
"date": "\"2021-10-08\"",
"time": "\"11:02\"",
"is_autoposting": false
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": null,
"timezone": "UTC",
"date": "2021-10-08",
"time": "11:19",
"datetime": "2021-10-08T11:19:00+00:00",
"is_autoposting": false,
"post": null
}
}
Received response:
Request failed with error:
Update post schedule
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/posts/schedules/17" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"date":"\"2021-10-08\"","time":"\"11:02\"","is_autoposting":false}'
const url = new URL(
"http://err.com:8080/api/posts/schedules/17"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "\"2021-10-08\"",
"time": "\"11:02\"",
"is_autoposting": false
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": null,
"timezone": "UTC",
"date": "2021-10-08",
"time": "11:13",
"datetime": "2021-10-08T11:13:00+00:00",
"is_autoposting": false,
"post": null
}
}
Received response:
Request failed with error:
Update batch of post-schedules to new date and time
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/posts/schedules" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"schedule_ids":[15,19],"date":"\"2021-10-08\"","time":"\"11:02\"","is_autoposting":false}'
const url = new URL(
"http://err.com:8080/api/posts/schedules"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"schedule_ids": [
15,
19
],
"date": "\"2021-10-08\"",
"time": "\"11:02\"",
"is_autoposting": false
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": [
{
"id": null,
"timezone": "UTC",
"date": "2021-10-08",
"time": "11:30",
"datetime": "2021-10-08T11:30:00+00:00",
"is_autoposting": false,
"post": null
},
{
"id": null,
"timezone": "UTC",
"date": "2021-10-08",
"time": "11:12",
"datetime": "2021-10-08T11:12:00+00:00",
"is_autoposting": false,
"post": null
}
]
}
Received response:
Request failed with error:
Delete post schedule
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/posts/schedules/8" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/schedules/8"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"id": null,
"timezone": "UTC",
"date": "2021-10-08",
"time": "11:12",
"datetime": "2021-10-08T11:12:00+00:00",
"is_autoposting": false,
"post": null
}
}
Received response:
Request failed with error:
Get month view.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/posts/schedules/19/iusto" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/schedules/19/iusto"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show post scheduler and labels for interval.):
{
"data": {
"post_schedules": [
{
"id": 2,
"timezone": "Europe\/Prague",
"date": "2040-01-10",
"time": "15:40",
"is_autoposting": 1,
"post": {
"id": 2,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
},
{
"id": 3,
"timezone": "Europe\/Prague",
"date": "2040-01-31",
"time": "23:59",
"is_autoposting": 1,
"post": {
"id": 3,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
}
],
"day_labels": [
{
"id": 1,
"project_id": 1,
"text": "Test label text",
"color": "green",
"date": "2040-01-05"
},
{
"id": 2,
"project_id": 1,
"text": "New label text",
"color": "red",
"date": "2040-01-06"
}
]
}
}
Received response:
Request failed with error:
Get interval view.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/posts/schedules/20/maxime/rerum" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/schedules/20/maxime/rerum"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show post scheduler and labels for interval.):
{
"data": {
"post_schedules": [
{
"id": 2,
"timezone": "Europe\/Prague",
"date": "2040-01-10",
"time": "15:40",
"is_autoposting": 1,
"post": {
"id": 2,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
},
{
"id": 3,
"timezone": "Europe\/Prague",
"date": "2040-01-31",
"time": "23:59",
"is_autoposting": 1,
"post": {
"id": 3,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
}
],
"day_labels": [
{
"id": 1,
"project_id": 1,
"text": "Test label text",
"color": "green",
"date": "2040-01-05"
},
{
"id": 2,
"project_id": 1,
"text": "New label text",
"color": "red",
"date": "2040-01-06"
}
]
}
}
Received response:
Request failed with error:
Get interval view for stories (posts with the type photo or video story).
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/posts/stories/schedules/17/placeat/in" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/stories/schedules/17/placeat/in"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show post scheduler and labels for interval.):
{
"data": {
"post_schedules": [
{
"id": 2,
"timezone": "Europe\/Prague",
"date": "2040-01-10",
"time": "15:40",
"is_autoposting": 1,
"post": {
"id": 2,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
},
{
"id": 3,
"timezone": "Europe\/Prague",
"date": "2040-01-31",
"time": "23:59",
"is_autoposting": 1,
"post": {
"id": 3,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
}
],
"day_labels": [
{
"id": 1,
"project_id": 1,
"text": "Test label text",
"color": "green",
"date": "2040-01-05"
},
{
"id": 2,
"project_id": 1,
"text": "New label text",
"color": "red",
"date": "2040-01-06"
}
]
}
}
Received response:
Request failed with error:
Get interval view for stories (posts with the type photo or video story).
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/posts/mobile-publishing/schedules/20/tenetur/omnis" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/posts/mobile-publishing/schedules/20/tenetur/omnis"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show post scheduler and labels for interval.):
{
"data": {
"post_schedules": [
{
"id": 2,
"timezone": "Europe\/Prague",
"date": "2040-01-10",
"time": "15:40",
"is_autoposting": 1,
"post": {
"id": 2,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
},
{
"id": 3,
"timezone": "Europe\/Prague",
"date": "2040-01-31",
"time": "23:59",
"is_autoposting": 1,
"post": {
"id": 3,
"project_id": 1,
"type": "message",
"status": "Scheduled",
"message": "Test message",
"first_comment": "First Comment",
"created_at": "2021-01-13T14:09:01.000000Z",
"post_socials": []
}
}
],
"day_labels": [
{
"id": 1,
"project_id": 1,
"text": "Test label text",
"color": "green",
"date": "2040-01-05"
},
{
"id": 2,
"project_id": 1,
"text": "New label text",
"color": "red",
"date": "2040-01-06"
}
]
}
}
Received response:
Request failed with error:
PostSocial
Class PostSocialController
Display a social post.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/postssocials/11" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/postssocials/11"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show social post.):
{
"data": {
"id": 1,
"post_id": 1,
"social_network": "instagram",
"message": "Nemo qui quia adipisci et et nihil perspiciatis similique. Qui optio quis doloribus quia ducimus ratione dolore.",
"attachment_order": [
1
],
"first_comment": null,
"status": "draft",
"has_multi_attachments": true,
"extra_fields": null,
"message_editor_state": null,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": [
{
"id": 1,
"post_social_id": 1,
"object_id": 1,
"object_type": "image",
"preview_image_id": null,
"object_data": {
"id": 1,
"original_name": "test.png",
"user_id": 2,
"file_path": "agency-1\/social-posts\/1\/1457915911606b265149a8b.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/agency-1\/social-posts\/1\/1457915911606b265149a8b.png",
"file_size": 20281,
"content_type": "image\/png",
"media_collection_type": "PostAttachmentImageMediaInfo"
}
}
]
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Update Post's PostSocials and its attachments
requires authentication
You can update all PostSocials of given Post in single request
Post structure: Post -> PostSocials -> PostAttachments -> Media
Previously you should upload or import new temporary media to your account. If new media has the same md5 sum as the old one it won't be updated and you get response with the old one.
You can add media actions to apply changes of PostSocial medias and attachments. Each action has type field and some required and optional fields related to content.
Media Action types:
attach-media
- Attach temporary media and create attachment. Media ID is requireddetach-attachment
- Detach selected attachment. Attachment ID is requiredupdate-attachment
- Update attachment with new media. Both new Media and selected Attachment IDs are requireddetach-all-attachments
- Delete all attachment of selected Social Post. This used to simplify copying conten from another Social Postcopy-attachment
- Copy Attachment to another Post Socialupdate-attachment-extra-fields
- Update extra fields for example for Facebook video. Attachment ID is required. If you wish to delete some field set it tonull
value
Actions supported only by link post types:
attach-link
- Create link attachment. Media here is optional and used to attach custom picture. By default picture given from link tags will be used. So ou can set only extra fields without Mediadetach-link-media
- Delete custom picture from link Attachment. Attachment ID is requiredupdate-link-attachment
- Since link attachment could be without Media you should use this action to update safely
Actions to support facebook video thumbnails
attach-thumbnail
- attach temporary media as thumbnail
update-thumbnail
- update thumbnail with a new media
detach-thumbnail
- delete thumbnail image for given attachment.
Some Post attachments can have extra fields. For example link posts must have link ans is_child_link fields. Another extra fields is optional
post_social.extra_fields section is used for mentions
Example request:
curl -X PUT \
"http://err.com:8080/api/postssocials" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"post_id":16,"post_socials":[{"id":13,"message":"ex","first_comment":"numquam","message_editor_state":"vel","extra_fields":{"mentions":[{"mention":"culpa","id":"nisi","name":"corrupti","username":"qui"}]},"media_actions":[{"type":"update-thumbnail","attachment_id":7,"media_id":20,"extra_fields":{"is_child_link":false,"title":"ducimus","name":"corporis","description":"adipisci","content_tags":[{"id":"corporis","name":"maxime"}]}}]}]}'
const url = new URL(
"http://err.com:8080/api/postssocials"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"post_id": 16,
"post_socials": [
{
"id": 13,
"message": "ex",
"first_comment": "numquam",
"message_editor_state": "vel",
"extra_fields": {
"mentions": [
{
"mention": "culpa",
"id": "nisi",
"name": "corrupti",
"username": "qui"
}
]
},
"media_actions": [
{
"type": "update-thumbnail",
"attachment_id": 7,
"media_id": 20,
"extra_fields": {
"is_child_link": false,
"title": "ducimus",
"name": "corporis",
"description": "adipisci",
"content_tags": [
{
"id": "corporis",
"name": "maxime"
}
]
}
}
]
}
]
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Updated.):
{
"data": {
"id": 1,
"resource": "PostResource",
"project_id": 1,
"type": "single_video",
"status": "draft",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": null,
"parent_post_id": null,
"master_social_post_id": null,
"master_social_network": null,
"latest_schedule": null,
"post_socials": [
{
"id": 1,
"resource": "PostSocialResource",
"post_id": 1,
"social_network": "facebook",
"message": "Ipsum omnis vel porro. Similique impedit aut officiis excepturi error sit nihil. Ut fugit sint eius alias voluptatum delectus. Quibusdam in inventore ratione dolorum provident.",
"attachment_order": [
3
],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 1,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"extra_fields": {
"link": null,
"title": "test title",
"content_tags": [
"2163781268371",
"6784316847316"
]
},
"message_editor_state": null,
"social_api_response": {
"id": 1,
"resource": "SocialApiResponseResource",
"type": "create-post",
"http_status": 200,
"body": {
"id": "123",
"message": "Unauthenticated",
"error_code": "204"
},
"created_at": "2021-07-26T12:59:19+00:00"
},
"attachments": [
{
"id": 3,
"resource": "AttachmentResource",
"post_social_id": 1,
"object_id": 5,
"object_type": "image",
"object_data": {
"id": 5,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 2,
"file_path": "\/images\/test.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/images\/test.png",
"file_size": 100,
"content_type": "image\/png",
"media_collection_type": null,
"is_temporary": false,
"options": {
"type": "image",
"width": 1,
"height": 1,
"ratio": null
},
"previews": [],
"md5": "291db6d3253efe60f8310d836106c109",
"canva_design_id": null,
"imported_from_url": null,
"parent_media_id": 3,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00"
},
"thumbnail_object_id": null,
"thumbnail_object_data": null,
"extra_fields": null,
"created_at": "2021-05-21T18:17:48+00:00"
}
]
},
{
"id": 2,
"resource": "PostSocialResource",
"post_id": 1,
"social_network": "instagram",
"message": "Eaque quisquam nisi beatae. Fugiat esse architecto eos pariatur velit earum. Aperiam tenetur recusandae consequuntur qui.",
"attachment_order": [],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"extra_fields": {
"link": "http:\/\/localhost",
"title": null,
"content_tags": null
},
"message_editor_state": null,
"social_api_response": {
"id": 1,
"resource": "SocialApiResponseResource",
"type": "create-post",
"http_status": 200,
"body": {
"id": "123",
"message": "Unauthenticated",
"error_code": "204"
},
"created_at": "2021-07-26T12:59:19+00:00"
},
"attachments": []
},
{
"id": 3,
"resource": "PostSocialResource",
"post_id": 1,
"social_network": "twitter",
"message": "Enim eveniet ratione aut repellat accusamus corporis consectetur. Ipsa et in similique voluptates laborum ratione et. Magnam eum autem ratione omnis error.",
"attachment_order": [],
"first_comment": null,
"status": "draft",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"extra_fields": {
"link": "http:\/\/localhost",
"title": null,
"content_tags": null
},
"message_editor_state": null,
"social_api_response": {
"id": 1,
"resource": "SocialApiResponseResource",
"type": "create-post",
"http_status": 200,
"body": {
"id": "123",
"message": "Unauthenticated",
"error_code": "204"
},
"created_at": "2021-07-26T12:59:19+00:00"
},
"attachments": [
{
"id": 2,
"resource": "AttachmentResource",
"post_social_id": 3,
"object_id": 6,
"object_type": "image",
"object_data": {
"id": 6,
"resource": "MediaResource",
"original_name": "test.png",
"user_id": 2,
"file_path": "\/images\/test.png",
"public_url": "http:\/\/localhost:8080\/storage\/tmp\/images\/test.png",
"file_size": 100,
"content_type": "image\/png",
"media_collection_type": null,
"is_temporary": false,
"options": {
"type": "image",
"width": 1,
"height": 1,
"ratio": null
},
"previews": [],
"md5": "0533cbe7a7999cb67c09865669339b08",
"canva_design_id": null,
"imported_from_url": null,
"parent_media_id": null,
"created_at": "2021-05-21T18:17:49+00:00",
"updated_at": "2021-05-21T18:17:49+00:00"
},
"thumbnail_object_id": null,
"thumbnail_object_data": null,
"extra_fields": null,
"created_at": "2021-05-21T18:17:47+00:00"
}
]
}
],
"created_at": "2021-05-21T18:17:46+00:00",
"updated_at": "2021-05-21T18:17:46+00:00"
}
}
Get PostSocial actions
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/postssocials/5/actions" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/postssocials/5/actions"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Deleted.):
{
"data": [
{
"id": 1,
"post_id": 1,
"post_social_id": 1,
"type": "status-transition",
"post_social_status": "pending_internal_approval",
"created_by": {
"id": 3,
"name": "Fletcher Leannon",
"email": "monica46@example.net",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-02-25T20:18:53+02:00"
},
{
"id": 3,
"post_id": 1,
"post_social_id": 1,
"type": "status-transition",
"post_social_status": "requires_revision",
"created_by": {
"id": 3,
"name": "Fletcher Leannon",
"email": "monica46@example.net",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-02-25T20:18:54+02:00"
},
{
"id": 4,
"post_id": 1,
"post_social_id": 1,
"type": "status-transition",
"post_social_status": "pending_internal_approval",
"created_by": {
"id": 3,
"name": "Fletcher Leannon",
"email": "monica46@example.net",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-02-25T20:18:55+02:00"
},
{
"id": 5,
"post_id": 1,
"post_social_id": 1,
"type": "status-transition",
"post_social_status": "pending_publish",
"created_by": {
"id": 4,
"name": "Mrs. Isabelle Kulas",
"email": "estell.swift@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"created_at": "2021-02-25T20:18:55+02:00"
}
]
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
PostSocialNote
Class PostSocialNoteController
Save post social note.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/postssocials/3/notes" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"message":"sapiente"}'
const url = new URL(
"http://err.com:8080/api/postssocials/3/notes"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"message": "sapiente"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Stored post social note.):
{
"data": {
"post_social_id": 1,
"message": "Veniam quod facilis qui beatae dolore quae consectetur.",
"created_by_user_id": 2,
"created_at": "2021-02-25T11:57:15+00:00",
"updated_at": "2021-02-25T11:57:15+00:00"
}
}
Show all post social notes.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/postssocials/3/notes" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/postssocials/3/notes"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show post social note.):
{
"data": [
{
"id": 4,
"post_social_id": 2,
"message": "Incidunt maxime ut id tempore recusandae architecto.",
"created_by_user": {
"id": 2,
"name": "Miss Pansy Gutkowski III",
"email": "wschultz@example.org"
},
"last_updated_by_user": null,
"created_at": "2021-02-26T16:54:21+00:00",
"updated_at": "2021-02-26T16:54:21+00:00"
},
{
"id": 5,
"post_social_id": 2,
"message": "Quam magnam expedita exercitationem non.",
"created_by_user": {
"id": 2,
"name": "Miss Pansy Gutkowski III",
"email": "wschultz@example.org"
},
"last_updated_by_user": null,
"created_at": "2021-02-26T16:54:21+00:00",
"updated_at": "2021-02-26T16:54:21+00:00"
},
{
"id": 6,
"post_social_id": 2,
"message": "Ipsum laboriosam debitis blanditiis.",
"created_by_user": {
"id": 2,
"name": "Miss Pansy Gutkowski III",
"email": "wschultz@example.org"
},
"last_updated_by_user": null,
"created_at": "2021-02-26T16:54:21+00:00",
"updated_at": "2021-02-26T16:54:21+00:00"
},
{
"id": 7,
"post_social_id": 2,
"message": "Aut quos perferendis at ipsa porro expedita.",
"created_by_user": {
"id": 2,
"name": "Miss Pansy Gutkowski III",
"email": "wschultz@example.org"
},
"last_updated_by_user": null,
"created_at": "2021-02-26T16:54:21+00:00",
"updated_at": "2021-02-26T16:54:21+00:00"
},
{
"id": 8,
"post_social_id": 2,
"message": "Et consequatur aut autem labore.",
"created_by_user": {
"id": 2,
"name": "Miss Pansy Gutkowski III",
"email": "wschultz@example.org"
},
"last_updated_by_user": null,
"created_at": "2021-02-26T16:54:21+00:00",
"updated_at": "2021-02-26T16:54:21+00:00"
}
]
}
Display a post social note.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/postssocials/7/notes/8" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/postssocials/7/notes/8"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show post social note.):
{
"data": {
"id": 1,
"post_social_id": 1,
"message": "Voluptas error labore dolores vero.",
"created_by_user": {
"id": 2,
"name": "Marcus Kemmer",
"email": "serena.leannon@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"last_updated_by_user": null,
"created_at": "2021-02-26T16:50:29+00:00",
"updated_at": "2021-02-26T16:50:30+00:00"
}
}
Update a social post note.
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/postssocials/17/notes/11" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"message":"aliquid"}'
const url = new URL(
"http://err.com:8080/api/postssocials/17/notes/11"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"message": "aliquid"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Updated post social note.):
{
"data": {
"id": 1,
"post_social_id": 1,
"message": "Voluptas error labore dolores vero.",
"created_by_user": {
"id": 2,
"name": "Marcus Kemmer",
"email": "serena.leannon@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
},
"last_updated_by_user": null,
"created_at": "2021-02-26T16:50:29+00:00",
"updated_at": "2021-02-26T16:50:30+00:00"
}
}
Delete post social note.
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/postssocials/15/notes/8" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/postssocials/15/notes/8"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204, Note was deleted.):
<Empty response>
Project
Class ProjectController
Store a newly created project in storage.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/projects" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "name=ex" \
-F "timezone=Asia/Gaza" \
-F "image=@/tmp/phpBonaDd"
const url = new URL(
"http://err.com:8080/api/projects"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'ex');
body.append('timezone', 'Asia/Gaza');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Example response (200, Store project.):
{
"data": {
"id": 1,
"name": "sunt",
"agency_id": 1,
"owner_id": 2,
"logo_image_link": null,
"timezone": "America\/Danmarkshavn",
"socials": [
{
"project_id": 1,
"social_network_id": 2,
"social_network": "instagram",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest",
"ig_user_id": "17841444677322556"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
]
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Update project in storage.
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/projects/accusantium" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "name=in" \
-F "timezone=Europe/Jersey" \
-F "image=@/tmp/phpBICapA"
const url = new URL(
"http://err.com:8080/api/projects/accusantium"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'in');
body.append('timezone', 'Europe/Jersey');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Example response (200, Updated project.):
{
"data": {
"id": 1,
"name": "sunt",
"agency_id": 1,
"owner_id": 2,
"logo_image_link": null,
"timezone": "America\/Danmarkshavn",
"socials": [
{
"project_id": 1,
"social_network_id": 2,
"social_network": "instagram",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest",
"ig_user_id": "17841444677322556"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
]
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Soft delete the project.
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/projects/12" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/12"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Restore soft deleted project. User roles can't be restored!!!
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/projects/1/restore" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/1/restore"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200, Show project.):
{
"data": {
"id": 1,
"name": "sunt",
"agency_id": 1,
"owner_id": 2,
"logo_image_link": null,
"timezone": "America\/Danmarkshavn",
"socials": [
{
"project_id": 1,
"social_network_id": 2,
"social_network": "instagram",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest",
"ig_user_id": "17841444677322556"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
]
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Display users from project with selected role.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/10/users" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"role":"agency-admin"}}'
const url = new URL(
"http://err.com:8080/api/projects/10/users"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"filter": {
"role": "agency-admin"
}
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Show project.):
{
"data": [
{
"id": 7,
"name": "Karlee Breitenberg",
"email": "zachariah.nienow@example.com",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png",
"role": "agency-admin"
},
{
"id": 8,
"name": "Angela Douglas",
"email": "luciano69@example.com",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png",
"role": "content-creator"
},
{
"id": 9,
"name": "Prof. Charlie Kreiger",
"email": "abbott.claudine@example.net",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png",
"role": "content-creator"
},
{
"id": 10,
"name": "Earnestine Stroman",
"email": "jolson@example.com",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png",
"role": "content-creator"
}
]
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Display posts for internal/external approvers.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/6/posts/pending-approval" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/6/posts/pending-approval"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show pending approval posts.):
{
"data": [
{
"id": 3,
"project_id": 1,
"type": "message",
"status": "pending_publish",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2021-03-02T14:09:47.000000Z",
"post_socials": [
{
"id": 4,
"post_id": 3,
"social_network": "facebook",
"message": "Cupiditate illo nemo sit. Quas fuga officia quos ratione aut eius. Eligendi odio libero occaecati minus eaque facilis exercitationem.",
"attachment_order": [],
"first_comment": null,
"status": "pending_internal_approval",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": []
}
],
"latest_schedule": {
"id": 3,
"timezone": "UTC",
"date": "2021-03-02",
"time": "14:22",
"datetime": "2021-03-02T14:22:00+00:00",
"is_autoposting": true
}
},
{
"id": 1,
"project_id": 1,
"type": "message",
"status": "pending_publish",
"message": "Test message",
"first_comment": "First Comment",
"media_replication_status": null,
"parent_post_id": null,
"created_at": "2021-03-02T14:09:47.000000Z",
"post_socials": [
{
"id": 1,
"post_id": 1,
"social_network": "facebook",
"message": "Sed voluptate accusantium eius. Hic doloremque commodi ea aliquid ipsum. Tempore et facere cumque quis consequuntur consequatur. Fuga blanditiis aut rerum debitis et ea magnam.",
"attachment_order": [],
"first_comment": null,
"status": "requires_revision",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": []
},
{
"id": 2,
"post_id": 1,
"social_network": "instagram",
"message": "Provident aperiam similique reprehenderit eveniet est. Itaque asperiores deserunt unde doloremque repudiandae quaerat. Aut est accusamus animi enim veniam.",
"attachment_order": [],
"first_comment": null,
"status": "pending_external_approval",
"has_multi_attachments": 0,
"created_at": "2021-05-21T18:17:48+00:00",
"updated_at": "2021-05-21T18:17:48+00:00",
"attachments": []
}
],
"latest_schedule": {
"id": 1,
"timezone": "UTC",
"date": "2040-08-03",
"time": "15:00",
"datetime": "2040-08-03T15:00:00+00:00",
"is_autoposting": true
}
}
]
}
Received response:
Request failed with error:
Display a project.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/11" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/11"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Show project.):
{
"data": {
"id": 1,
"name": "sunt",
"agency_id": 1,
"owner_id": 2,
"logo_image_link": null,
"timezone": "America\/Danmarkshavn",
"socials": [
{
"project_id": 1,
"social_network_id": 2,
"social_network": "instagram",
"account_details": {
"fb_page_id": "102251745038901",
"fb_page_name": "attentionnesttest",
"ig_user_id": "17841444677322556"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
]
}
}
Example response (403, Unauthorized action.):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
Remove user roles from project.
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/numquam/remove/user/aut" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/numquam/remove/user/aut"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (204, Logout is successfull.):
<Empty response>
Received response:
Request failed with error:
Setting
Class SettingController
Save a project settings
requires authentication
Setting value type depends on setting and can be bool, int, string or array
Some setting like 'post-master-content-social-network-id' also supports null value
Example request:
curl -X POST \
"http://err.com:8080/api/projects/repudiandae/settings" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"settings":[{"name":"single-round-internal-approve","value":{}}]}'
const url = new URL(
"http://err.com:8080/api/projects/repudiandae/settings"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"settings": [
{
"name": "single-round-internal-approve",
"value": {}
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Update project settings.):
{
"data": [
{
"id": 4,
"name": "post-master-content-social-network-id",
"value": "instagram",
"agency_id": null,
"project_id": 1,
"priority": "project"
}
]
}
Received response:
Request failed with error:
Get all project settings
requires authentication
This API combine settings with agency and system level and return result value for requested project.
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/et/settings" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/et/settings"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Project settings.):
{
"data": [
{
"name": "post-master-content-social-network-id",
"value": "facebook"
},
{
"name": "project-timezone",
"value": "UTC"
},
{
"name": "single-round-internal-approve",
"value": false
}
]
}
Received response:
Request failed with error:
Social Insights
Get daily insights by social network and metric
See metrics list that this API collect on "Get Available metrics by social network" page of this documentation.
requires authentication
Pagination is not supported so if you need smaller responses try shrink (from - to) period or number of metrics
Example request:
curl -X GET \
-G "http://err.com:8080/api/insights/quas/project-daily-insights/1?metrics=totam&from=odit&to=laboriosam" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/insights/quas/project-daily-insights/1"
);
let params = {
"metrics": "totam",
"from": "odit",
"to": "laboriosam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Get daily insights):
{
"data": [
{
"name": "page_impressions",
"date": "2021-03-17",
"value": 41,
"extended_value": null
},
{
"name": "page_impressions_paid",
"date": "2021-03-17",
"value": 457,
"extended_value": null
},
{
"name": "page_impressions",
"date": "2021-03-18",
"value": 51,
"extended_value": null
},
{
"name": "page_impressions_paid",
"date": "2021-03-18",
"value": 65835304,
"extended_value": null
},
{
"name": "page_impressions_paid",
"date": "2021-03-19",
"value": 97697407,
"extended_value": null
},
{
"name": "page_impressions",
"date": "2021-03-19",
"value": 45,
"extended_value": null
}
]
}
Example response (429, Data processing not finished):
{
"error": {
"message": "Same insights were already requested. Waiting for update.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.rateLimitedException",
"payload": {
"projectId": 1,
"socialNetworkId": 1,
"metrics": [
"page_impressions",
"page_impressions_paid"
],
"from": "2021-03-17",
"to": "2021-04-06"
},
"trace": null
}
}
Example response (422, Validation exception):
{
"error": {
"message": "The given data was invalid.",
"title": "ApiValidationException",
"code": "ApiValidationException.default",
"keys": {
"metrics.0": {
"In": [
"follower_count",
"impressions"
]
},
"metrics.1": {
"In": [
"follower_count",
"impressions"
]
}
},
"messages": {
"metrics.0": [
"The selected metrics.0 is invalid."
],
"metrics.1": [
"The selected metrics.1 is invalid."
]
}
}
}
Get summary insights by social network and metric
Only Twitter followers_count,tweet_count for given profile currently supported
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/insights/eaque/project-summary-insights/6?metrics=totam" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/insights/eaque/project-summary-insights/6"
);
let params = {
"metrics": "totam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Get daily insights):
{
"data": [
{
"name": "followers_count",
"value": 0,
"updated_at": "2021-06-04T11:34:36+00:00"
},
{
"name": "tweet_count",
"value": 23,
"updated_at": "2021-06-04T11:34:36+00:00"
}
]
}
Example response (422, Validation exception):
{
"error": {
"message": "The given data was invalid.",
"title": "ApiValidationException",
"code": "ApiValidationException.default",
"keys": {
"metrics.0": {
"In": [
"follower_count",
"impressions"
]
},
"metrics.1": {
"In": [
"follower_count",
"impressions"
]
}
},
"messages": {
"metrics.0": [
"The selected metrics.0 is invalid."
],
"metrics.1": [
"The selected metrics.1 is invalid."
]
}
}
}
Get available metrics by social network
requires authentication
You can see metrics description on sufficient documentation page
Facebook https://developers.facebook.com/docs/graph-api/reference/v10.0/insights#page-engagement Instagram https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights Linkedin https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/share-statistics?tabs=http
Example request:
curl -X GET \
-G "http://err.com:8080/api/insights/daily-insights-metrics" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/insights/daily-insights-metrics"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"social_network": "facebook",
"daily_metrics": [
"page_fans",
"page_impressions",
"page_impressions_paid",
"page_impressions_organic",
"page_impressions_unique",
"page_impressions_paid_unique",
"page_impressions_organic_unique",
"page_engaged_users",
"page_post_engagements",
"page_views_total",
"page_fans_online",
"page_fan_adds",
"page_fan_removes"
],
"timezone": "America\/Los_Angeles"
},
{
"social_network": "instagram",
"daily_metrics": [
"follower_count",
"impressions"
],
"timezone": "America\/Los_Angeles"
},
{
"social_network": "linkedin",
"daily_metrics": [
"uniqueImpressionsCount",
"shareCount",
"engagement",
"engagementRate",
"clickCount",
"likeCount",
"impressionCount",
"commentCount"
],
"timezone": "UTC"
},
{
"social_network": "twitter",
"daily_metrics": [
"retweet_count",
"reply_count",
"like_count",
"quote_count"
],
"timezone": "UTC"
}
]
}
Received response:
Request failed with error:
Get available fans online metrics by social network
requires authentication
Returns values
array is 24 numbers representing of fans hourly counts for your project timezone
Example request:
curl -X GET \
-G "http://err.com:8080/api/insights/aliquam/project-fans-online-insights/13?from=hic" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/insights/aliquam/project-fans-online-insights/13"
);
let params = {
"from": "hic",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Get fans online insights):
{
"data": {
"name": "page_fans_online",
"date": "2021-04-26",
"values": [
61,
64,
57,
54,
58,
56,
514,
520,
527,
578,
518,
540,
541,
548,
532,
572,
546,
505,
578,
532,
200,
245,
157,
58
],
"timezone": "America\/Adak"
}
}
Example response (200, No fans online data):
{
"data": {
"name": "page_fans_online",
"date": "2021-04-26",
"values": [],
"timezone": "America\/Adak"
}
}
Get Twitter authorization link response
requires authentication
This is a starting point to Twitter integration.
It's using to generate redirect link with site callback URL.
The data you get back from Twitter you should use for the next "Set Twitter User access token" call to set up your project.
This URL should be registered in the Twitter APP used by this API.
Current authorization flow is based on OAuth 1.0a described here: https://developer.twitter.com/en/docs/authentication/oauth-1-0a/obtaining-user-access-tokens
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/15/twitter/authorization-link?callback_url=iste" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/15/twitter/authorization-link"
);
let params = {
"callback_url": "iste",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Twitter link generated.):
{
"data": {
"authorization_link": "https:\/\/api.twitter.com\/oauth\/authorize?oauth_token=vxzvdQAAAAABKA5EAAABeESJmJY
}
}
Get project id linked to twitter request oauth_token
requires authentication
This API request uses to get project id when user cancel Twitter authorization and returns back to frontend. In this case you should send "denied" value as "oauth_token" to get projectId value.
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/twitter/laboriosam" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/twitter/laboriosam"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"oauthToken": "7ca12365-4894-3c02-9cfc-ee2fb742fa45",
"projectId": 1
}
}
Received response:
Request failed with error:
Set Twitter User access token
requires authentication
After register Twitter application you should send given oauth_token
and oauth_verifier
to this API to set up Twitter credentials for your selected project
Example request:
curl -X POST \
"http://err.com:8080/api/projects/twitter/access-token" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"oauth_token":"qui","oauth_verifier":"ullam"}'
const url = new URL(
"http://err.com:8080/api/projects/twitter/access-token"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"oauth_token": "qui",
"oauth_verifier": "ullam"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201, Twitter project connected.):
{
"data": {
"project_id": 1,
"social_network_id": 4,
"social_network": "twitter",
"account_details": {
"user_id": "1372504609101611009",
"screen_name": "MikeTes56030913"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
}
Received response:
Request failed with error:
Renew Twitter User access token
requires authentication
Before this you should repeat "Get Twitter authorization link" call.
After register Twitter application you should send given oauth_token
and oauth_verifier
to this API to renew up Twitter credentials for your selected project.
This API checks equality of given Twitter user ID with previous and throw an Exception if user was changed.
Example request:
curl -X PUT \
"http://err.com:8080/api/projects/twitter/access-token" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"oauth_token":"quasi","oauth_verifier":"cum"}'
const url = new URL(
"http://err.com:8080/api/projects/twitter/access-token"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"oauth_token": "quasi",
"oauth_verifier": "cum"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Twitter credentials renewed.):
{
"data": {
"project_id": 1,
"social_network_id": 4,
"social_network": "twitter",
"account_details": {
"user_id": "1372504609101611009",
"screen_name": "MikeTes56030913"
},
"token_expires_at": null,
"id": 1,
"logo": null
}
}
Received response:
Request failed with error:
Delete connected social account
requires authentication
Example request:
curl -X DELETE \
"http://err.com:8080/api/projects/6/twitter" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/6/twitter"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204, Post):
<Empty response>
Received response:
Request failed with error:
Search users in Twitter
requires authentication
Example request:
curl -X GET \
-G "http://err.com:8080/api/projects/13/twitter/search?q=neque" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://err.com:8080/api/projects/13/twitter/search"
);
let params = {
"q": "neque",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
{
"error": {
"message": "This action is unauthorized.",
"title": "ApiGeneralException",
"code": "ApiGeneralException.accessDeniedException.default",
"payload": null,
"trace": null
}
}
Received response:
Request failed with error:
User
Class UserController
Update user profile (name, avatar).
requires authentication
Example request:
curl -X PUT \
"http://err.com:8080/api/users/15" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "name=natus" \
-F "image=@/tmp/phpbHJhlh"
const url = new URL(
"http://err.com:8080/api/users/15"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'natus');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Example response (200, Updated user.):
{
"data": {
"id": 2,
"name": "Bulah Bernhard",
"email": "marks.shaylee@example.org",
"avatar_image_link": "http:\/\/localhost:8080\/storage\/tmp\/a-1\/avatars\/3734525746094115f4308a.png"
}
}
Received response:
Request failed with error:
UserInvitations
Class UserInvitationController
Send agency invitation to user.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/userinvitations/agency/send" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"kaleigh58@example.com","name":"cumque","agency_role":"distinctio"}'
const url = new URL(
"http://err.com:8080/api/userinvitations/agency/send"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "kaleigh58@example.com",
"name": "cumque",
"agency_role": "distinctio"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Send agency invitation.):
{
"data": {
"id": 1,
"email": "dsporer@klocko.com",
"agency_id": 1,
"owner_id": 2,
"agency_role": "content-creator",
"agency_role_id": 3,
"last_sent_at": null
}
}
Received response:
Request failed with error:
Resend agency invitation to user.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/userinvitations/agency/resend" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"invitation_id":17}'
const url = new URL(
"http://err.com:8080/api/userinvitations/agency/resend"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"invitation_id": 17
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200, Resend invitation.):
{
"data": {
"id": 1,
"email": "dsporer@klocko.com",
"agency_id": 1,
"owner_id": 2,
"agency_role": "content-creator",
"agency_role_id": 3,
"last_sent_at": null
}
}
Received response:
Request failed with error:
Send project invitation to user.
requires authentication
Example request:
curl -X POST \
"http://err.com:8080/api/userinvitations/project/send" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"parisian.elvera@example.com","name":"repudiandae","project_id":19,"project_role":"in"}'
const url = new URL(
"http://err.com:8080/api/userinvitations/project/send"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "parisian.elvera@example.com",
"name": "repudiandae",
"project_id": 19,
"project_role": "in"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"email": "ernestine.zieme@gmail.com",
"user_id": 1,
"agency_id": 2,
"project_id": 9,
"project_role_id": 2,
"status": "sent"
}
}
Received response:
Request failed with error: