POST
/
api
/
users
/
devices
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.users.createDevice({ ipAddress: '123.456.789.012' });

  console.log(response.id);
}

main();
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "websiteId": "123e4567-e89b-12d3-a456-426614174001",
  "organizationId": "123e4567-e89b-12d3-a456-426614174002",
  "ipAddress": "123.456.789.012",
  "deviceIdentifier": "<string>",
  "source": "<string>",
  "createdAt": "2023-10-01T12:34:56Z"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
Body

Schema for a create user device schema

ipAddress
string
required

IP address of the user device

Example:

"123.456.789.012"

userId
string
walletAddress
string
deviceIdentifier
string

Device identifier of the user device

Response

200
application/json
200

Schema for a user device

id
string
required

Unique identifier for the user device

Example:

"123e4567-e89b-12d3-a456-426614174000"

websiteId
string
required

Unique identifier for the website

Example:

"123e4567-e89b-12d3-a456-426614174001"

organizationId
string
required

Unique identifier for the organization

Example:

"123e4567-e89b-12d3-a456-426614174002"

ipAddress
string
required

IP address of the user device

Example:

"123.456.789.012"

source
string
required

Source of the user device

createdAt
string
required

Timestamp when the wallet was created

Example:

"2023-10-01T12:34:56Z"

deviceIdentifier
string

Device identifier of the user device