Link copied to clipboard!
Mobile navigation button - closed state

Users

All available operations for manipulating users and their information


Check out our integration guide to understand how user syncing fits in your backend workflow

Create or update a user

This endpoint creates or updates a user:

  • if the user does not exist in the Cord backend (based on its ID), it will be created; some fields are required.
  • if the user exists, it will be updated; all fields are optional, only the fields provided will be updated.

HTTP Request

PUT https://api.cord.com/v1/users/<ID>

Request Body

Field
email string required on create
Email address
name string optional
Full user name
short_name string optional
Short user name. In most cases, this will be preferred over name when set.
status string optional
(active OR deleted)
profile_picture_url string optional
Profile picture URL
first_name string optional deprecated
User's first name. This field is deprecated and has no effect.
last_name string optional deprecated
User's last name. This field is deprecated and has no effect.

Example request:

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",
    "profile_picture_url": "https://cord.com/favicon-32x32.png"
  }'

If successful, the response will be:

{
  "success": true
}

List users

This endpoint lists all users created in the context of your application.

HTTP Request

GET https://api.cord.com/v1/users

Example request to gets the list of users:

curl "https://api.cord.com/v1/users" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

Example response:

[
  {
    "id": "3001",
    "name": "Philip J Fry",
    "email": "delivery@planetexpress.nny",
    "first_name": "Philip",
    "last_name": "Fry"
  },
  {
    "id": "123",
    "name": "Bender Bending Rodriguez",
    "email": "bending@planetexpress.nny"
  }
]

Get user details

HTTP Request

GET https://api.cord.com/v1/users/<ID>

Example request to get details for a user:

curl "https://api.cord.com/v1/users/3001" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

If the user exists, the response will be:

{
  "id": "3001",
  "name": "Philip J Fry",
  "email": "delivery@planetexpress.nny",
  "first_name": "Philip",
  "last_name": "Fry",
  "organizations": ["org1", "org2"]
}

Next up