Abound enables developers to associate a user records with a unique, customer-specific ID, known as a foreignId.

This allows developers lookup and retrieve a user record ( and subsequently resources connected to that userId) with the ease of using their own in-house indentifiers and the promise of uniqnuess.


Uniqueness

Foreign IDs _ must be_ unique. If a foreign ID is not unique, a 409 Error will occur.

Below is an example error response when a uniqueness conflict occurs:

JSON
1{
2 "message": "Expected foreignId to be unique"
3}

Examples

Here are a few example of working with foreign IDs.

Adding a foreignId to a user record

cURL
1curl \
2 --request POST \
3 --url https://sandbox-api.withabound.com/v4/users \
4 --header 'Authorization: Bearer appId_test48e7eaa3175a66354e00626542d2.appSecret_testf54672359db6693429e1d3e14e2c' \
5 --header 'Content-Type: application/json' \
6 --data '{
7 "email": "your-users-email@domain.com",
8 "foreignId": "your_foreign_id"
9 }'
JSON
1{
2 "id": "userId_sampleXGMFnhOpeR",
3 "createdAt": "2023-10-09T21:14:01.109Z",
4 "email": "your-users-email@domain.com",
5 foreignId": "your_foreign_id"
6}

Retrieving a user record by foreignId

cURL
1curl \
2 --request GET \
3 --url https://sandbox-api.withabound.com/v4/users?foreignId=your_foreign_id \
4 --header 'Authorization: Bearer appId_test48e7eaa3175a66354e00626542d2.appSecret_testf54672359db6693429e1d3e14e2c' \
5 --header 'Content-Type: application/json'
JSON
1[
2 {
3 "id": "userId_sampleXGMFnhOpeR",
4 "createdAt": "2023-10-09T21:14:01.109Z",
5 "email": "your-users-email@domain.com",
6 "foreignId": "your_foreign_id"
7 }
8]