All available operations for manipulating organizations and their information
Check out our integration guide to understand how user syncing fits in your backend workflow
This endpoint creates or updates an organization:
members
list, the list is treated as exhaustive: all member user IDs must be included, previous members who are not in the list will be removed.PUT https://api.cord.com/v1/organizations/<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.
curl "https://api.cord.com/v1/organizations/456" \
-X PUT \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Planet Express",
"members": ["4", "42"]
}'
If successful, the response will be:
{
"success": true
}
Use this endpoint to add and/or remove members from an organization.
Requests to add a user that is already a member of that organization, or remove a user that is not a member, will have no effect (but will not return an error).
Note: It is an error to add and remove the same user in a single request.
POST https://api.cord.com/v1/organizations/<ID>/members
Listed below are the fields of the request body to be added as part of the HTTP POST request.
curl "https://api.cord.com/v1/organizations/456/members" \
-X POST \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"add": ["4"],
"remove": ["42"]
}'
If successful, the response will be:
[
{
"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"
}
]
Use this endpoint to list all organizations that you have created within your Cord application.
GET https://api.cord.com/v1/organizations
This endpoint does not require a request body.
curl "https://api.cord.com/v1/organizations" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
If successful, the response will be:
[
{
"id": "10",
"name": "Planet Express"
}
]
GET https://api.cord.com/v1/organizations/<ID>
For more information about IDs, check out our Identifiers concept breakdown.
This endpoint does not require a request body.
curl "https://api.cord.com/v1/organizations" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
If the request is successful and the organization exists, the response payload will be of the form:
{
"id": "10",
"name": "Planet Express",
"members": ["4", "42"]
}
This endpoint will permanently delete an organization and associated data. This operation will delete all threads and message associated with the organization. Please only use this endpoint if you are okay with that. Users will not be deleted because users can be in multiple organizations. However, deleting the organization also removes all users from the organization.
DELETE https://api.cord.com/v1/organizations/<ID>
For more information about IDs, check out our Identifiers concept breakdown.
This endpoint does not require a request body.
curl -X DELETE "https://api.cord.com/v1/organizations/<id>" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
If the request is successful and the organization is now deleted, the response payload will be of the form:
{
"success": true,
}