Device
Device Management
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
Ok
application/json
get
/device/v1/devicesGET /device/v1/devices HTTP/1.1
Host: api.dev.hyphen.at/
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200
Ok
{
"devices": [
{
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
}
]
}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
publicKeystringRequired
Body
Make all properties in T optional
sdkVersionstringOptionalExample:
1.0.0idstringOptionalExample:
deadbeef-dead-beef-cafe-deadbeefcafepushTokenstringOptionalExample:
Firebase Push Registration ID. Should be regularly updated if changes.
bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...namestringOptionalExample:
iPhone 14osNamestringOptionalExample:
iOSosVersionstringOptionalExample:
16.2deviceManufacturerstringOptionalExample:
AppledeviceModelstringOptionalExample:
SM-265NlangstringOptionalExample:
enResponses
200
Ok
application/json
put
/device/v1/devices/{publicKey}PUT /device/v1/devices/{publicKey} HTTP/1.1
Host: api.dev.hyphen.at/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 244
{
"sdkVersion": "1.0.0",
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en"
}200
Ok
{
"device": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
}
}2FA (Two-Factor Authorization)
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Responses
200
Ok
application/json
get
/device/v1/2fa/{id}GET /device/v1/2fa/{id} HTTP/1.1
Host: api.dev.hyphen.at/
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200
Ok
{
"twoFactorAuth": {
"id": "text",
"accountId": "text",
"request": {
"id": "faceb00c-cafe-babe-badd-deadbeef1234",
"app": {
"appId": "swirl-dev",
"appName": "Swirl"
},
"userOpInfo": {
"type": "sign-in",
"signIn": {
"email": "[email protected]",
"ip": "127.0.0.1",
"location": "Seoul, KR"
}
},
"srcDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"destDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"message": "deadbeefdeadbeefdeadbeef",
"requestedAt": "2021-01-01T00:00:00Z"
},
"status": "pending",
"extra": null,
"result": {
"txId": "text"
},
"expiresAt": "2021-01-01T00:00:00Z"
}
}Updates existing 2FA request, such as requesting to the other device.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Body
destDeviceIdstringRequired
Responses
200
Ok
application/json
put
/device/v1/2fa/{id}PUT /device/v1/2fa/{id} HTTP/1.1
Host: api.dev.hyphen.at/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"destDeviceId": "text"
}200
Ok
{
"twoFactorAuth": {
"id": "text",
"accountId": "text",
"request": {
"id": "faceb00c-cafe-babe-badd-deadbeef1234",
"app": {
"appId": "swirl-dev",
"appName": "Swirl"
},
"userOpInfo": {
"type": "sign-in",
"signIn": {
"email": "[email protected]",
"ip": "127.0.0.1",
"location": "Seoul, KR"
}
},
"srcDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"destDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"message": "deadbeefdeadbeefdeadbeef",
"requestedAt": "2021-01-01T00:00:00Z"
},
"status": "pending",
"extra": null,
"result": {
"txId": "text"
},
"expiresAt": "2021-01-01T00:00:00Z"
}
}Rejects 2FA request.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Responses
204Success
application/json
delete
/device/v1/2fa/{id}DELETE /device/v1/2fa/{id} HTTP/1.1
Host: api.dev.hyphen.at/
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204Success
{
"twoFactorAuth": {
"id": "text",
"accountId": "text",
"request": {
"id": "faceb00c-cafe-babe-badd-deadbeef1234",
"app": {
"appId": "swirl-dev",
"appName": "Swirl"
},
"userOpInfo": {
"type": "sign-in",
"signIn": {
"email": "[email protected]",
"ip": "127.0.0.1",
"location": "Seoul, KR"
}
},
"srcDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"destDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"message": "deadbeefdeadbeefdeadbeef",
"requestedAt": "2021-01-01T00:00:00Z"
},
"status": "pending",
"extra": null,
"result": {
"txId": "text"
},
"expiresAt": "2021-01-01T00:00:00Z"
}
}Approves 2FA request. The client should sign the message from the request with the device key, and provide it to the signature field in the request.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Body
txIdstringRequiredExample:
The transaction ID of the transaction that the user signed.
deadbeef...deadbeefResponses
204Success
application/json
post
/device/v1/2fa/{id}/approvePOST /device/v1/2fa/{id}/approve HTTP/1.1
Host: api.dev.hyphen.at/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"txId": "deadbeef...deadbeef"
}204Success
{
"twoFactorAuth": {
"id": "text",
"accountId": "text",
"request": {
"id": "faceb00c-cafe-babe-badd-deadbeef1234",
"app": {
"appId": "swirl-dev",
"appName": "Swirl"
},
"userOpInfo": {
"type": "sign-in",
"signIn": {
"email": "[email protected]",
"ip": "127.0.0.1",
"location": "Seoul, KR"
}
},
"srcDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"destDevice": {
"id": "deadbeef-dead-beef-cafe-deadbeefcafe",
"publicKey": "faceb00ccafebabedeadbeefbadf00defaceb00ccafebabedeadbeefbadf00de",
"sdkVersion": "1.0.0",
"pushToken": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"name": "iPhone 14",
"osName": "iOS",
"osVersion": "16.2",
"deviceManufacturer": "Apple",
"deviceModel": "SM-265N",
"lang": "en",
"type": "mobile"
},
"message": "deadbeefdeadbeefdeadbeef",
"requestedAt": "2021-01-01T00:00:00Z"
},
"status": "pending",
"extra": null,
"result": {
"txId": "text"
},
"expiresAt": "2021-01-01T00:00:00Z"
}
}Last updated
Was this helpful?