Guides
Accounts

Accounts and roles

Discover the member's accounts, read and search ad accounts, the roles on accounts and organizations, create accounts and manage users.

After OAuth, your integration needs to know which ad accounts the member can act on, with which role, and which company pages they can post for and read leads of.

1. The member's accounts

bash
curl -s 'https://linkedin-ads.mimicr.dev/rest/adAccountUsers?q=authenticatedUser' \
  --header 'Authorization: Bearer <token>' --header 'LinkedIn-Version: 202610' --header 'X-Restli-Protocol-Version: 2.0.0'
json
{
  "elements": [
    { "account": "urn:li:sponsoredAccount:521119150", "user": "urn:li:person:yLp4Ms3J8-", "role": "ACCOUNT_BILLING_ADMIN" },
    { "account": "urn:li:sponsoredAccount:521134988", "user": "urn:li:person:yLp4Ms3J8-", "role": "ACCOUNT_BILLING_ADMIN" }
  ],
  "paging": { "start": 0, "count": 10, "links": [], "total": 2 }
}

This is the bootstrap call: a member with no accounts (persona no_accounts) gets elements: [].

2. Account details

Search only the active, non-test ones:

bash
curl -s 'https://linkedin-ads.mimicr.dev/rest/adAccounts?q=search&search=(status:(values:List(ACTIVE)),test:false)' \
  --header 'Authorization: Bearer <token>' --header 'LinkedIn-Version: 202610' --header 'X-Restli-Protocol-Version: 2.0.0'
json
{
  "elements": [
    {
      "id": 521119150, "name": "Conta Principal", "currency": "BRL", "type": "BUSINESS", "status": "ACTIVE",
      "reference": "urn:li:organization:48720492", "test": false, "servingStatuses": ["RUNNABLE"],
      "notifiedOnCreativeApproval": false, "version": { "versionTag": "1" }
    }
  ],
  "metadata": {}
}

Or get one account with fields=id,name,currency,reference,referenceInfo,servingStatuses to also get the organization's name in referenceInfo. An account the member has no role on answers 404, not 403.

servingStatuses says whether the account can deliver: RUNNABLE, or one or more holds (STOPPED, BILLING_HOLD, ACCOUNT_TOTAL_BUDGET_HOLD, ACCOUNT_END_DATE_HOLD, RESTRICTED_HOLD, INTERNAL_HOLD). It is computed on read and can't be written.

3. Company pages

bash
curl -s 'https://linkedin-ads.mimicr.dev/rest/organizationAcls?q=roleAssignee' \
  --header 'Authorization: Bearer <token>' --header 'LinkedIn-Version: 202610' --header 'X-Restli-Protocol-Version: 2.0.0'
json
{ "elements": [ { "roleAssignee": "urn:li:person:yLp4Ms3J8-", "role": "ADMINISTRATOR", "organization": "urn:li:organization:48720492", "state": "APPROVED" } ], "paging": { "start": 0, "count": 10, "links": [], "total": 1 } }

Dark posts on behalf of the organization need ADMINISTRATOR, DIRECT_SPONSORED_CONTENT_POSTER or CONTENT_ADMINISTRATOR. Reading leads needs a role on the account and on the account's organization. Scope r_organization_admin.

Roles

Account roleCan
VIEWEROnly read, even with rw_ads
CREATIVE_MANAGERCreate and edit creatives (and subscribe to lead webhooks)
CAMPAIGN_MANAGERAlso groups and campaigns
ACCOUNT_MANAGERAlso the account and its users
ACCOUNT_BILLING_ADMINEverything, plus billing and deletion. One per account

Conversions take any role but VIEWER. A role that is too low answers:

json
{ "status": 403, "serviceErrorCode": 100, "code": "NO_PERMISSION_ON_ENTITY", "message": "Viewer may not have permission UPDATE_ACCOUNT on entity urn:li:sponsoredAccount:521119150" }

Create accounts

POST /rest/adAccounts creates a BUSINESS account; the member becomes ACCOUNT_BILLING_ADMIN and the account comes with its "Default Campaign Group".

bash
curl -si https://linkedin-ads.mimicr.dev/rest/adAccounts \
  --header 'Authorization: Bearer <token>' --header 'LinkedIn-Version: 202610' --header 'X-Restli-Protocol-Version: 2.0.0' \
  --header 'Content-Type: application/json' \
  --data '{ "name": "Conta Agência", "type": "BUSINESS", "currency": "BRL", "reference": "urn:li:organization:48720492" }'
# 201, x-restli-id: 521150826
  • type ENTERPRISE answers 400 INVALID_VALUE_FOR_FIELD; an unsupported currency, CURRENCY_NOT_SUPPORTED; a blank name, BLANK_ACCOUNT_NAME.
  • test: true only on create, and at most one test account per app (TEST_ACCOUNT_LIMIT_REACHED).
  • In the development tier, Mimicr adds the new account to the list of 5 writable accounts while there is room; writing to an account outside the list answers 403.

Account statuses: DRAFT → ACTIVE and ACTIVE → PENDING_DELETION (only ACCOUNT_BILLING_ADMIN; it becomes REMOVED 24 hours later). CANCELED comes from LinkedIn (in Mimicr, the account.set_status action), is terminal and cancels groups and campaigns. DELETE only deletes DRAFT accounts.

Account users

bash
curl -si 'https://linkedin-ads.mimicr.dev/rest/adAccountUsers/(account:urn%3Ali%3AsponsoredAccount%3A521119150,user:urn%3Ali%3Aperson%3A6oaVq9ep8A)' \
  --request PUT \
  --header 'Authorization: Bearer <token>' --header 'LinkedIn-Version: 202610' --header 'X-Restli-Protocol-Version: 2.0.0' \
  --header 'Content-Type: application/json' \
  --data '{ "account": "urn:li:sponsoredAccount:521119150", "user": "urn:li:person:6oaVq9ep8A", "role": "CAMPAIGN_MANAGER" }'
# 204

The compound key carries both URNs encoded. PUT creates or replaces; a POST with X-RestLi-Method: PARTIAL_UPDATE changes the role (and answers 200); DELETE removes it. Managing users needs ACCOUNT_MANAGER or higher. The body must match the key, and there can be only one ACCOUNT_BILLING_ADMIN (MULTIPLE_VALUES_NOT_ALLOWED). Users of an account lists who has a role on an account.

New members (to give roles to or to match conversions by email) are created with the member.create action.