Applications

All available operations for manipulating applications and their information


Create an application

This endpoint creates an application that can then be viewed and managed within the Cord Console.

Note: To be able to use this endpoint, you'll have to create an application management authentication token using your customer ID and secret. This token is a customer-level server auth token used only for the applications REST API.

HTTP Request

POST https://api.cord.com/v1/applications
Copy

Request Body

Listed below are the fields of the request body to be added as part of the HTTP POST request.


name

required
string
Name of the application

iconURL

optional
string
format: uri
URL for the application icon. It should be a square image of 256x256. This will be used as the avatar for messages and emails coming from your application.

Example Request

curl "https://api.cord.com/v1/applications" \
  -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Planet Express"
  }'
Copy

If the request succeeds, the response will be:

{
    "success": true,
    "message": "Application created",
    "applicationID": "<APPLICATION_ID>",
    "secret": "<SECRET_KEY>"
}
Copy

The application secret that you created above is extremely sensitive. You should protect it just like you would a password or other sensitive credential. This token is used for server-to-server communication and should never be used in the browser. For more information, check out our Authentication reference guide

If the request does not succeed, the response will instead contain an error and message explaining what went wrong:

{
  "error": "<ERROR_CODE>",
  "message": "An explanation of the error code."
}
Copy

Update an application

This endpoint lets you update various properties of your application.

HTTP Request

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

Request Body

The request body will be a JSON object with two optional fields.


name

string
Name of the application

iconURL

string
format: uri
URL for the application icon. It should be a square image of 256x256. This will be used as the avatar for messages and emails coming from your application.

Example Request

curl "https://api.cord.com/v1/applications/<ID>" \
  -X PUT \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Planet Express, Inc"
  }'
Copy

If the request succeeds, the response will be:

{
    "success": true,
    "message": "✅ You successfully updated application <ID>",
}
Copy

List applications

This endpoint lists all your applications.

HTTP Request

GET https://api.cord.com/v1/applications
Copy

Request Body

This REST endpoint has no request body.

Example Request

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

If successful, the response will be similar to:

[
  {
    "id": "124",
    "name": "Planet Express"
  },
  {
    "id": "123",
    "name": "Awesome Express",
  }
]
Copy

Delete an application

This endpoint lets you delete your application and any associated data.This operation will permanently delete the application along with any organizations, users, threads and messages associated with that application. Please only use if you are okay with that.

HTTP Request

DELETE https://api.cord.com/v1/applications/<ID>
Copy

Request Body

The request body contains only one field:


secret

required
string
Secret key of the application that you want to delete. This can be found within the Cord Console.

Example Request

curl "https://api.cord.com/v1/applications/<ID>" \
  -X DELETE \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
    "secret": <SECRET_KEY>
  }'
    
Copy

If the request succeeds, the response will be:

{
    "success": true,
    "message": "💀 You successfully deleted application <ID>",
}
Copy