View all methods

users.links.setNotApplicable

Mark a source as not applicable for a user who does not use that tool, or clear the mark.

Facts

Method POST https://api.getdx.com/users.links.setNotApplicable
Required scope users:write

Arguments

Required arguments

Name Type Description
token Token Auth token passed as an HTTP header.
user_id Text The DX user ID, as returned in id by users.list.
source Text The tool to mark. See Sources.
not_applicable Boolean true to mark the source not applicable for the user, or false to clear the mark.

Usage info

This method requires DX Data Cloud. If you use a personal access token, you must also have Data Cloud access.

A user who is marked not applicable for a source is left out of that tool’s unlinked count, so you can tell people who have not been linked yet from people who do not use the tool. users.links.list returns the marked sources in not_applicable_sources.

Marking a source that the user already has a linked account for fails with accounts_linked. To mark it anyway, unlink the accounts first with users.links.set or users.links.delete, then call this method.

A not applicable mark does not stop a link from being made later. If an account is linked to the user for that source, the link replaces the mark and the source is reported as linked. This happens when:

  • DX links an account automatically because its email address or username matches the user.
  • You link an account with users.links.set or users.links.create.
  • Someone links an account on the User linking page or the user’s Linked accounts tab.

Marking a source that is already marked, or clearing a mark that does not exist, succeeds without making a change.

Example request

This is a typical request:

curl -X POST https://api.getdx.com/users.links.setNotApplicable \
  -H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_id": "NTEyMDUw",
    "source": "cursor",
    "not_applicable": true
  }'

Example response

This is a typical success response:

{
  "ok": true
}

Errors

This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok param in the response.

Error Description
not_authed No authentication token provided, or Data Cloud is not enabled for the account.
not_authorized The bearer token does not include users:write, or the personal access token owner cannot access Data Cloud.
not_found The user was not found.
user_not_in_datacloud The user has not synced to Data Cloud yet.
accounts_linked The user already has a linked account for the source. Unlink the accounts before marking it not applicable.
link_update_in_progress Another request for the same user and source did not finish in time. Retry the request.
query_timeout Data Cloud did not respond in time. Retry the request.
Invalid parameter: ... source is not supported, or not_applicable is not true or false.
Missing required parameter: ... user_id or not_applicable was not provided.