All available operations for manipulating users and their information
Check out our integration guide to understand how user syncing fits in your backend workflow
This endpoint creates or updates a user:
PUT https://api.cord.com/v1/users/<ID>
For more information about IDs, check out our Identifiers concept breakdown.
Listed below are the fields of the request body to be added as part of the HTTP PUT request.
%20
. We recommend using your programming language's standard URL encoding function, such as encodeURI
in Javascript.curl "https://api.cord.com/v1/users/123" \
-X PUT \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Bender Bending Rodriguez",
"profilePictureURL": "https://cord.com/favicon-32x32.png"
}'
If successful, the response will be:
{
"success": true
}
This endpoint lists all users created in the context of your application.
GET https://api.cord.com/v1/users?limit=25
This REST endpoint has no request body.
The endpoint supports the following query request parameters:
pagination
object of a previous response.This is an object with the following fields:
The response is a JSON object with the following fields:
This is an array of objects, each of which has the following fields:
%20
. We recommend using your programming language's standard URL encoding function, such as encodeURI
in Javascript.This is an object with the following fields:
curl "https://api.cord.com/v1/users" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
If successful, the response will be:
[
users: [
{
"id": "3001",
"name": "Philip J Fry",
"email": "delivery@planetexpress.nny",
},
{
"id": "123",
"name": "Bender Bending Rodriguez",
"email": "bending@planetexpress.nny"
}
],
pagination: {
token: "eTJhbGciOiJIUzI1NiIsInR5cCI63kpXVC09=",
total: 200,
remaining: 175
}
This endpoint fetches the information about a user that has been stored in Cord's backend. The data you retrieve here contains the same values that would be displayed in Cord's UI components when that user loads your application.
GET https://api.cord.com/v1/users/<ID>
This REST endpoint has no request body.
The response is a JSON Object with the following fields:
%20
. We recommend using your programming language's standard URL encoding function, such as encodeURI
in Javascript.curl "https://api.cord.com/v1/users/3001" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
If successful, the response will be:
{
"id": "3001",
"name": "Philip J Fry",
"email": "delivery@planetexpress.nny",
"organizations": ["org1", "org2"]
}
This endpoint will permanently delete a user and all associated data.
DELETE https://api.cord.com/v1/users/<ID>
The request body contains only one field:
curl "https://api.cord.com/v1/users/h349f0s-kjsf20-sdk0e3" \
-X DELETE
-H "Authorization: Bearer <ACCESS_TOKEN>"
-d '{
"permanently_delete": true
}'
If the request is successful and the user is now deleted, the response payload will be of the form:
{
"success": true,
"message": "User deleted.",
"userID": "h349f0s-kjsf20-sdk0e3",
}