Knowledge Base

API Reference Documentation for The Facebook Connector Profile Creation

Create Profile

Creates a new profile to enable integration with Facebook advertising.

Endpoint

POST https://facebook.narrativeconnectors.com/profiles

Request

FieldTypeRequiredDescription
ad_account_idstringYesYour Facebook Ad Account ID (e.g., act_<ID>).
descriptionstringNoAn optional description for the profile.
namestringYesA descriptive name for the Facebook profile.
tokenstringYesA valid OAuth token for the Facebook Business/Ad Account. Acquired via Narrative’s UI or Facebook’s OAuth.

Example Request

POST /profiles HTTP/1.1
Host: facebook.narrativeconnectors.com
Content-Type: application/json

{
    "ad_account_id": "act_your_ad_account_id",
    "description": "profile description",
    "name": "name of profile",
    "token": "EAAH4..."
}

Response

Status Code: 201 Created
{
    "id": "980415....",
    "ad_account": {
        "id": "act_your_ad_account_id",
        "business": {
            "id": "46587....",
            "name": "your company name"
        },
        "name": "name of profile",
        "supports_custom_audiences": true,
        "user_accepted_custom_audience_tos": true
    },
    "audience": null,
    "description": "profile ",
    "created_at": "2025-...",
    "company_id": your_company_id,
    "name": "name of profile",
    "status": "disabled",
    "token": {
        "is_valid": true,
        "issued_at": "2025-...",
        "scopes": [
            "ads_management",
            "business_management",
            "public_profile"
        ],
        "user": {
            "id": "2785...",
            "name": "your name"
        }
    },
    "updated_at": "2025-..."
}

Notes

  • OAuth Token: A valid token is required to authenticate requests. You can either fetch this token through Narrative’s UI (where you’ll be redirected to Facebook for authorization) or by obtaining it directly from Facebook’s OAuth process.
  • Status: New profiles often start as disabled until additional setup or permissions are verified.
  • Scopes: The token’s granted scopes (e.g., ads_management, business_management, public_profile) determine what actions you can perform on the Facebook side.
  • Ad Account Details: In the response, supports_custom_audiences and user_accepted_custom_audience_tos inform whether custom audience functionality is available for your ad account.

Contact / Support

For any questions or support related to these endpoints, please reach out to your Narrative representative or consult the official Narrative documentation.


< Back
Rosetta

Hi! I’m Rosetta, your big data assistant. Ask me anything! If you want to talk to one of our wonderful human team members, let me know! I can schedule a call for you.