# Update an application

> **PATCH** `https://api.us.nylas.com/v3/applications`

Source: https://developer.nylas.com/docs/reference/api/applications/update_application/

Updates a Nylas application using the client ID associated with the specified API key.

<div id="admonition-warning">⚠️ <b>This endpoint will be removed in the future when application settings are available in the Nylas Dashboard</b>.</div>

When you make a `PATCH` request, Nylas replaces all data in the nested object with the information
included in your request. For more information, see
[Updating objects](/docs/reference/api/#updating-objects).

**Authentication:** NYLAS_API_KEY

## Request body

Content-Type: application/json

- `application_id` (string) - Application ID
- `organization_id` (string) - ID of organization
- `region` (string) - Region identifier
- `environment` (string) - Environment identifier
- `default_workspace_id` (string) - The ID of the application's default [workspace](/docs/reference/api/workspaces/), if one exists.
Nylas manages this value, and ignores it in create and update requests.
- `v2_application_id` (string) - Linked v2 Application ID
- `branding` (object)
  - `name` (string) - Name of the application
  - `icon_url` (string) - URL points to application icon.
  - `website_url` (string) - Application / publisher website URL
  - `description` (string) - Description of the application.
- `hosted_authentication` (object)
  - `background_image_url` (string) - URL of the background image
  - `alignment` (string) - Alignment of background image
  - `color_primary` (string) - Primary color
  - `color_secondary` (string) - Secondary color
  - `title` (string) - Title
  - `subtitle` (string) - Subtitle
  - `background_color` (string) - Background color
  - `spacing` (integer) - CSS spacing attribute in px
- `callback_uris` (array) - A list of your application's callback URIs.

## Responses

### 200 - Returns application object

- `success` (boolean)
- `data` (object)
  - `application_id` (string) - Application ID
  - `organization_id` (string) - ID of organization
  - `region` (string) - Region identifier
  - `environment` (string) - Environment identifier
  - `default_workspace_id` (string) - The ID of the application's default [workspace](/docs/reference/api/workspaces/), if one exists.
Nylas manages this value, and ignores it in create and update requests.
  - `v2_application_id` (string) - Linked v2 Application ID
  - `branding` (object)
    - `name` (string) - Name of the application
    - `icon_url` (string) - URL points to application icon.
    - `website_url` (string) - Application / publisher website URL
    - `description` (string) - Description of the application.
  - `hosted_authentication` (object)
    - `background_image_url` (string) - URL of the background image
    - `alignment` (string) - Alignment of background image
    - `color_primary` (string) - Primary color
    - `color_secondary` (string) - Secondary color
    - `title` (string) - Title
    - `subtitle` (string) - Subtitle
    - `background_color` (string) - Background color
    - `spacing` (integer) - CSS spacing attribute in px
  - `callback_uris` (array) - A list of your application's callback URIs.

### 400 - Bad Request

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

### 401 - Not Authenticated

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

### 404 - Not Found

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.us.nylas.com/v3/applications' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --data '{
    "branding": {
      "name": "<APPLICATION_NAME>",
      "icon_url": "<ICON_URL>",
      "website_url": "<WEBSITE_URL>",
      "description": "<APPLICATION_DESCRIPTION>"
    },
    "hosted_authentication": {
      "background_image_url": "<BACKGROUND_IMAGE_URL>",
      "alignment": "<ALIGNMENT>",
      "color_primary": "<COLOR_PRIMARY>",
      "color_secondary": "<COLOR_SECONDARY>",
      "title": "<TITLE>",
      "subtitle": "<SUBTITLE>",
      "background_color": "<BACKGROUND_COLOR>",
      "spacing": 10
    },
    "callback_uris": [
      {
        "id": "<CALLBACK_URI_ID>",
        "url": "<CALLBACK_URL>",
        "platform": "<PLATFORM>",
        "settings": {
          "origin": "<ORIGIN>",
          "bundle_id": "<BUNDLE_ID>",
          "package_name": "<PACKAGE_NAME>",
          "sha1_certificate_fingerprint": "<SHA1_FINGERPRINT>"
        }
      }
    ]
  }'

```
