PUT /account/identity/{id}

Update the details of an existing identity.

To learn how to use the endpoints together take a look at our account API step-by-step page

An HTTPS PUT request sent to:

https://api.datasift.com/v1.3/account/identity/{id}

A successful call to this endpoint returns: 200 OK plus a JSON object.

Parameters

Parameter Description
label
optional

The new label for this identity.

Default: if you omit this parameter, the existing setting is retained.

status
optional

The new status for this identity:

  • active
  • disabled

Default: if you omit this parameter, the existing setting is retained.

master
optional

A Boolean value that indicates whether this is your master identity.

Default: if you omit this parameter, the existing setting is retained.

Examples

  1. Update the details of an identity with the label 'test' that already exists. Change its name and make it your master identity. If you already have an identity with a master value set to true, that value will be reset to false:

curl -X PUT https://api.datasift.com/v1.3/account/identity/1234567890abcdef1234567890abcdef 
    -d '{"label": "test2","master": true}' 
    -H 'Content-type: application/json' 
    -H 'Authorization: username:api_key'

The output looks like this:

HTTP/1.1 200 OK
Content-type: application/json

{
    "id": "<id>",
    "api_key": "<api_key>",
    "label": "<label>",
    "status": "<active|disabled>",
    "master": <boolean>,
    "created_at": <timestamp>,
    "updated_at": <timestamp>,
    "expires_at": <timestamp>
}

Output Fields

Property Type Description
id string The identity of the account you made changes to. A 32-character alphanumeric hash.
api_key string The API key for this identity.
label string The new label you applied to this identity (or the old value if you did not supply this parameter in your API call).
status string The new status you applied to this identity (or the old value if you did not supply this parameter in your API call). Can be:
  • active
  • disabled
master boolean The new indication of whether this is your master id or a client id (or the old value if you did not supply this parameter in your API call).
created_at int Unix timestamp.
updated_at int Unix timestamp.
expires_at int Unix timestamp. Can be null.

Responses

Response code Description
Status 200 OK <div> The identity was successfully created.
Status 404 Not Found

Occurs if you specify an identity_id that does not exist.

{ "error": "An Identity with the supplied id was not found" }

Status 409 Conflict

Occurs if you have already used that label.

{
  "error": "An Identity with the label \"<label>\" already exists"
}

Notes

  1. All calls to the API must be properly authenticated with a DataSift username and API key.
  2. All calls to the API must be versioned. The current version is v1.3.
  3. All POST and PUT requests require Content-type: application/json.

Resource information

Rate limit cost: 5

Requires authentication: Yes

Response formats: JSON, JSONP