Oktopost
Account

Social Profiles

Get, list, update, and delete connected social profiles, and list LinkedIn targeting presets.

Social profiles are the social media accounts connected to Oktopost, including personal profiles, company pages, and groups from networks like LinkedIn, X (Twitter), Facebook, Instagram, and YouTube. These profiles are the publishing destinations for your posts and the sources for engagement data. Use these endpoints to retrieve profile information, check connection status, and manage your connected accounts.

Connect social profiles in the Oktopost platform before you access them through the API. Use these endpoints to retrieve and manage profiles that are already connected.

Get Social Profile

Retrieve a single social profile by ID.

GET /v2/credential/:credentialId

Parameters

Prop

Type

Example Request

curl -X GET "https://api.oktopost.com/v2/credential/003-001000000000001-10795428XXXXXXXXX" \
  -u ACCOUNT_ID:API_KEY

Example Response

{
    "Result":true,
    "Credential":{
        "Id":"003-001000000000001-10795428XXXXXXXXX",
        "Created":"2015-10-26 21:02:30",
        "Name":"Oktopost's Twitter",
        "DisplayName":"Oktopost",
        "Status":"valid",
        "Network":"Twitter",
        "ImageLink":"valid",
        "NetworkUsername":"oktopost",
        "NetworkAccountId":"10795428XXXXXXXXX",
        "NativePostsEnabled":0
    }
}

NetworkAccountId is the profile's ID on the social network. For a LinkedIn page, this is the organization ID.

List Social Profiles

Retrieve all social profiles, optionally filtered by network.

GET /v2/credential

Parameters

Prop

Type

Example Request

curl -X GET "https://api.oktopost.com/v2/credential?network=Twitter&includeInvalid=0" \
  -u ACCOUNT_ID:API_KEY

Example Response

{
"Result":true,
    "Items":[{
        "Id":"003-001000000000001-10795428XXXXXXXXX",
        "Created":"2015-10-26 21:02:30",
        "Name":"Oktopost's Twitter",
        "DisplayName":"Oktopost",
        "Status":"valid",
        "Network":"Twitter",
        "ImageLink":"valid",
        "NetworkUsername":"oktopost",
        "NetworkAccountId":"10795428XXXXXXXXX",
        "NativePostsEnabled":0
    },
    ...
    ],
    "Total":21
}

Update a Social Profile

Update a single social profile by ID.

PUT /v2/credential/:credentialId

Parameters

Prop

Type

Example Request

curl -X PUT "https://api.oktopost.com/v2/credential/003-001000000000001-10795428XXXXXXXXX" \
  -u ACCOUNT_ID:API_KEY \
  -d displayName="Oktopost Twitter" \
  -d nativePostsEnabled=1

Example Response

{
    "Result": true,
    "Credential": {...}
}

Delete a Social Profile

Delete a single social profile by ID.

DELETE /v2/credential/:credentialId

Deleting a profile deletes all scheduled posts that use it.

Parameters

Prop

Type

Example Request

curl -X DELETE "https://api.oktopost.com/v2/credential/003-001000000000001-10795428XXXXXXXXX" \
  -u ACCOUNT_ID:API_KEY

List Targeting Presets

Retrieve the targeting presets available for a LinkedIn Company Page credential.

GET /v2/credential/:credentialId/targeting-presets

Presets define audience targeting criteria (company size, industry, job function, seniority, geography, and language). Apply a preset when you create or update posts by passing its ID as targetingPresetId. If the credential is not a LinkedIn Company Page, the endpoint returns 400 Bad Request.

Parameters

Prop

Type

See Pagination for shared behavior.

Example Request

curl -X GET "https://api.oktopost.com/v2/credential/003-001000000000001-12345678/targeting-presets" \
  -u ACCOUNT_ID:API_KEY

Example Response

{
    "Result": true,
    "Items": [
        {
            "Id": "0tp000000000001",
            "CredentialId": "003-001000000000001-12345678",
            "AccountId": "001000000000001",
            "Name": "Enterprise Decision Makers",
            "CompanySize": ["10001+"],
            "Industry": ["Software"],
            "Function": ["Engineering"],
            "Seniority": ["Director", "VP"],
            "Geography": ["United States"],
            "Language": ["en"]
        }
    ],
    "Total": 1
}