Pages

Resource Fields

Name Type Read-only Description
uuid string
title string
image_url string
account Account
brand Brand
route_posts boolean If enabled, automatically convert page post to a conversation

Default: true
route_messages boolean If enabled, automatically convert page conversations to a conversation

Default: true
is_enabled boolean
status string AVAILABLE, UNAVAILABLE, NOT_AUTHORIZED

Default: AVAILABLE
last_synced_at timestamp ISO-8601 Format
created_at timestamp ISO-8601 Format
updated_at timestamp ISO-8601 Format

Metadata




 
 




Actions

Retrieve all pages

GET /api/v1/facebook/pages.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Ordered by id (ascending)

Arguments

Name Type Mandatory Description
account_id integer
state string IMPORTED, AVAILABLE, ALL

Default: IMPORTED

IMPORTED: Facebook pages already linked in helpdesk
AVAILABLE: Facebook pages that are not already linked in helpdesk

Response

    {
        "status": 200,
        "data": [
            {
    "id": "876423285750729",

    "uuid": "f5ec41e8-fda2-4835-98fb-ea33bc474ce5",
    "title": "Brewfictus the world of better coffee",
    "image_url": null,
    "account": {
    "id": 1,

    "resource_type": "facebook_account"

}
,
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "route_posts": true,
    "route_messages": true,
    "is_enabled": true,
    "status": "AVAILABLE",
    "last_synced_at": "2015-07-26T06:40:32+05:00",
    "created_at": "2015-07-26T06:40:32+05:00",
    "updated_at": "2015-07-26T06:40:32+05:00",

    "resource_type": "facebook_page"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/facebook/pages/876423285750729"

}

        ],
        "resource": "facebook_page",
        "offset": 0,
        "limit": 10,
        "total_count": 1
    }

Retrieve a page

GET /api/v1/facebook/pages/:id.json

Information

Allowed for Collaborators, Agents, Admins & Owners

Response

    {
        "status": 200,
        "data": {
    "id": "876423285750729",

    "uuid": "f5ec41e8-fda2-4835-98fb-ea33bc474ce5",
    "title": "Brewfictus the world of better coffee",
    "image_url": null,
    "account": {
    "id": 1,

    "resource_type": "facebook_account"

}
,
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "route_posts": true,
    "route_messages": true,
    "is_enabled": true,
    "status": "AVAILABLE",
    "last_synced_at": "2015-07-26T06:40:32+05:00",
    "created_at": "2015-07-26T06:40:32+05:00",
    "updated_at": "2015-07-26T06:40:32+05:00",

    "resource_type": "facebook_page"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/facebook/pages/876423285750729"

}
,
        "resource": "facebook_page"
    }

Add pages

POST /api/v1/facebook/pages.json

Information

Allowed for Admins & Owners

Parameters

Name Type Mandatory Description
page_ids string
Comma separated Facebook page ids

Response

    {
        "status": 201,
        "data": [
            {
    "id": "876423285750729",

    "uuid": "f5ec41e8-fda2-4835-98fb-ea33bc474ce5",
    "title": "Brewfictus the world of better coffee",
    "image_url": null,
    "account": {
    "id": 1,

    "resource_type": "facebook_account"

}
,
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "route_posts": true,
    "route_messages": true,
    "is_enabled": true,
    "status": "AVAILABLE",
    "last_synced_at": "2015-07-26T06:40:32+05:00",
    "created_at": "2015-07-26T06:40:32+05:00",
    "updated_at": "2015-07-26T06:40:32+05:00",

    "resource_type": "facebook_page"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/facebook/pages/876423285750729"

}

        ],
        "resource": "facebook_page",
        "total_count": 1
    }

Update a page

PUT /api/v1/facebook/pages/:id.json

Information

Allowed for Admins & Owners

Parameters

Name Type Mandatory Description
brand_id integer
route_posts boolean
route_messages boolean
is_enabled boolean

Response

    {
        "status": 200,
        "data": {
    "id": "876423285750729",

    "uuid": "f5ec41e8-fda2-4835-98fb-ea33bc474ce5",
    "title": "Brewfictus the world of better coffee",
    "image_url": null,
    "account": {
    "id": 1,

    "resource_type": "facebook_account"

}
,
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "route_posts": true,
    "route_messages": true,
    "is_enabled": true,
    "status": "AVAILABLE",
    "last_synced_at": "2015-07-26T06:40:32+05:00",
    "created_at": "2015-07-26T06:40:32+05:00",
    "updated_at": "2015-07-26T06:40:32+05:00",

    "resource_type": "facebook_page"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/facebook/pages/876423285750729"

}
,
        "resource": "facebook_page"
    }

Update pages

PUT /api/v1/facebook/pages.json

Information

Allowed for Admins & Owners

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Parameters

Name Type Mandatory Description
brand_id integer
route_posts boolean
route_messages boolean
is_enabled boolean

Response

{
    "status": 200,
    "total_count": 2
}

Delete a page

DELETE /api/v1/facebook/pages/:id.json

Information

Allowed for Admins & Owners

Response

{
    "status": 200
}

Delete pages

DELETE /api/v1/facebook/pages.json

Information

Allowed for Admins & Owners

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Response

{
    "status": 200,
    "total_count": 2
}